draw.io is a JavaScript, client-side editor for general diagramming.
26.0.15 release
David Benson4b63b08d1e9a
diff --git a/ChangeLog b/ChangeLogindex fda6ae91f..c19543092 100644--- a/ChangeLog+++ b/ChangeLog@@ -1,3 +1,18 @@+19-FEB-2025: 26.0.15++- Adds default dark mode support for SVG images+- Shows word wrap option for non-resizable cells [jgraph/drawio-desktop#1994]+- Adds word wrapping to attributes section of entity shape [jgraph/drawio-desktop#1994]+- [conf cloud] Fixes Aura compatibility [DID-14484]++14-FEB-2025: 26.0.14++- Fixes change of line height for wrapped text [jgraph/drawio#4902]+- Adds support for older browsers with no light-dark colors+- Improves compatibility of exported SVG+- Improves handling of ignored stroke-widths in clipSvgDataUri+- Fixes handling of single color values in SVG with editable CSS rules+12-FEB-2025: 26.0.13- Adds appearance option in publish and embed dialogsdiff --git a/VERSION b/VERSIONindex db67b2404..4ba5bdf2d 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-26.0.13\ No newline at end of file+26.0.15\ No newline at end of filediff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.jsindex ed6a0454d..24c739085 100644--- a/src/main/webapp/js/app.min.js+++ b/src/main/webapp/js/app.min.js@@ -64,7 +64,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"26.0.13",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.15",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),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||@@ -2003,10 +2003,10 @@ Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFiEditor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(f,h){b.undoableEditHappened(h.getProperty("edit"))};var e=mxUtils.bind(this,function(f,h){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(f,h){f=h.getProperty("edit").changes;f=a.getSelectionCellsForChanges(f);h=!1;if(0<f.length){for(var d=[],g=0;g<f.length;g++)null!=a.view.getState(f[g])&&(d.push(f[g]),h||(a.scrollCellToVisible(f[g]),h=!0));a.setSelectionCells(d)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};-function Dialog(a,b,e,f,h,d,g,m,p,k,u){this.editorUi=a;var w=p?57:0,z=e,C=f,E=p?0:64,D=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(D.height=window.innerHeight);var G=D.height;D=Math.max(1,Math.round((D.width-e-E)/2));var K=Math.max(1,Math.round((G-f-a.footerHeight)/3));b.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-E):e;f=Math.min(f,G-E);0<a.dialogs.length&&-(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var L=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=L.x+"px";this.bg.style.top=L.y+"px";D+=L.x;K+=L.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",K+=a.embedViewport.y,D+=a.embedViewport.x);-h&&document.body.appendChild(this.bg);var Q=a.createDiv(p?"geTransDialog":"geDialog");h=this.getPosition(D,K,e,f);D=h.x;K=h.y;Q.style.width=e+"px";Q.style.height=f+"px";Q.style.left=D+"px";Q.style.top=K+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")),-d.className="geDialogClose",d.style.top=K+14+"px",d.style.left=D+e+38-w+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!u)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(U){N=!0}),null,mxUtils.bind(this,function(U){N&&(a.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var U=k();null!=U&&(z=e=U.w,C=f=U.h)}U=Editor.inlineFullscreen||+function Dialog(a,b,e,f,h,d,g,m,p,k,u){this.editorUi=a;var w=p?57:0,z=e,C=f,E=p?0:64,D=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(D.height=window.innerHeight);var G=D.height;D=Math.max(1,Math.round((D.width-e-E)/2));var J=Math.max(1,Math.round((G-f-a.footerHeight)/3));b.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-E):e;f=Math.min(f,G-E);0<a.dialogs.length&&+(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var L=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=L.x+"px";this.bg.style.top=L.y+"px";D+=L.x;J+=L.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",J+=a.embedViewport.y,D+=a.embedViewport.x);+h&&document.body.appendChild(this.bg);var Q=a.createDiv(p?"geTransDialog":"geDialog");h=this.getPosition(D,J,e,f);D=h.x;J=h.y;Q.style.width=e+"px";Q.style.height=f+"px";Q.style.left=D+"px";Q.style.top=J+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")),+d.className="geDialogClose",d.style.top=J+14+"px",d.style.left=D+e+38-w+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!u)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(U){N=!0}),null,mxUtils.bind(this,function(U){N&&(a.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var U=k();null!=U&&(z=e=U.w,C=f=U.h)}U=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);G=U.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");e=null!=document.body?Math.min(z,document.body.scrollWidth-E):z;f=Math.min(C,G-E);U=Math.max(1,Math.round((U.width-e-E)/2));var Y=Math.max(1,Math.round((G-f-a.footerHeight)/3));Y=this.getPosition(U,Y,e,f);U=Y.x;Y=Y.y;var P=mxUtils.getDocumentScrollOrigin(document);U+=P.x;Y+=P.y;Editor.inlineFullscreen||null==a.embedViewport||(Y+=a.embedViewport.y,U+=a.embedViewport.x);Q.style.left=U+"px";Q.style.top=Y+"px";Q.style.width=e+"px";Q.style.height=f+"px";!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Y+14+"px",this.dialogImg.style.left=U+e+38-w+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=g;this.container=Q;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;@@ -2019,8 +2019,8 @@ this.container.parentNode.removeChild(this.container)};var ErrorDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);w.appendChild(z)}b=document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));var C=mxUtils.button(f,function(){p&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e){this.create(a,b,e)};-PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,K=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(K=mxUtils.getScaleForPageCount(L,e,G))}var Q=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);K*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,Q-=D.y*G.height):-E=!0;E=PrintDialog.createPrintPreview(e,K,G,0,L,Q,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));+PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,J=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(J=mxUtils.getScaleForPageCount(L,e,G))}var Q=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);J*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,Q-=D.y*G.height):+E=!0;E=PrintDialog.createPrintPreview(e,J,G,0,L,Q,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));m.appendChild(p);mxEvent.addListener(p,"click",function(C){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(C)});mxEvent.addListener(g,"change",function(){k.checked=!g.checked});d.appendChild(m);h.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("posterPrint")+":");m.appendChild(p);mxEvent.addListener(p,"click",function(C){k.checked=!k.checked;g.checked=!k.checked;mxEvent.consume(C)});d.appendChild(m);var u=document.createElement("input");u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.setAttribute("size","4");u.setAttribute("disabled","disabled");u.style.width="50px";m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(u);mxUtils.write(m," "+mxResources.get("pages")+" (max)");d.appendChild(m);h.appendChild(d);mxEvent.addListener(k,"change",function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");g.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";m.appendChild(w);d.appendChild(m);h.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;@@ -2032,14 +2032,14 @@ var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrvar d=document.createElement("tr");var g=document.createElement("td");g.style.verticalAlign="top";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("paperSize")+":");d.appendChild(g);g=document.createElement("td");g.style.verticalAlign="top";g.style.fontSize="10pt";var m=PageSetupDialog.addPageFormatPanel(g,"pagesetupdialog",e.pageFormat);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");mxUtils.write(g,mxResources.get("gridSize")+":");d.appendChild(g);g=document.createElement("td");g.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();g.appendChild(p);mxEvent.addListener(p,"change",function(){var D=parseInt(p.value);p.value=Math.max(1,isNaN(D)?e.getGridSize():D)});d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");mxUtils.write(g,mxResources.get("background")+":");d.appendChild(g);g=document.createElement("td");var k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="middle";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="contain";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.height="32px";-u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,z=e.background,C=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(G,K,L,Q){K||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),w=G,C=Q);z=L;b()},w,z,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();g.appendChild(u);g.appendChild(k);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");+u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,z=e.background,C=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(G,J,L,Q){J||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),w=G,C=Q);z=L;b()},w,z,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();g.appendChild(u);g.appendChild(k);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="16px";g.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&g.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,w,m.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=C&&(D.shadowVisible=C);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});E.className="geBtn gePrimaryBtn";g.appendChild(E);a.editor.cancelFirst||g.appendChild(k);d.appendChild(g);h.appendChild(d);f.appendChild(h);this.container=f};PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var h=document.createElement("input");h.setAttribute("name",b);h.setAttribute("type","radio");h.setAttribute("value","portrait");var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="4px";g.style.borderRadius="4px";g.style.borderWidth="1px";g.style.borderStyle="solid";g.style.boxSizing="border-box";g.style.padding="2px";g.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";h.style.marginRight="6px";m.appendChild(h);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var p=document.createElement("span");p.style.width="100px";mxUtils.write(p,mxResources.get("landscape"));m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign="right";k.appendChild(w);var z=document.createElement("select");z.style.marginLeft="4px";z.style.maxWidth="78px";z.style.width="78px";for(var C=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],E=0;E<C.length;E++){var D=document.createElement("option");D.setAttribute("value",C[E].unit);mxUtils.write(D,C[E].label);z.appendChild(D)}z.value=Editor.pageSizeUnit;k.appendChild(z);m.style.display=-"none";k.style.display="none";var G={},K=PageSetupDialog.getFormats();for(E=0;E<K.length;E++)C=K[E],G[C.key]=C,D=document.createElement("option"),D.setAttribute("value",C.key),mxUtils.write(D,C.title),g.appendChild(D);var L=function(){g.value="custom";for(var N=0;N<K.length;N++){var U=K[N];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=+"none";k.style.display="none";var G={},J=PageSetupDialog.getFormats();for(E=0;E<J.length;E++)C=J[E],G[C.key]=C,D=document.createElement("option"),D.setAttribute("value",C.key),mxUtils.write(D,C.title),g.appendChild(D);var L=function(){g.value="custom";for(var N=0;N<J.length;N++){var U=J[N];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==U.format.width&&e.height==U.format.height?(g.value=U.key,h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==U.format.height&&e.height==U.format.width&&(g.value=U.key,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==g.value?(u.value=Editor.toUnit(e.width,z.value),w.value=Editor.toUnit(e.height,z.value),h.setAttribute("checked","checked"),g.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};L();a.appendChild(g);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var Q=function(N,U){N=G[g.value];null!=N.format?(u.value=Editor.toUnit(d.checked?N.format.height:N.format.width,z.value),w.value=Editor.toUnit(d.checked?N.format.width:N.format.height,z.value),k.style.display="none",m.style.display=""):(m.style.display="none",k.style.display="");N=parseFloat(u.value);if(isNaN(N)||0>=N)u.value=Editor.toUnit(e.width,z.value);N=parseFloat(w.value);if(isNaN(N)||0>=N)w.value=Editor.toUnit(e.height,z.value);N=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),z.value)));U||N.width==e.width&&N.height==e.height||(e=N,null!=f&&f(e))};mxEvent.addListener(b,"click",function(N){h.checked=!0;Q(N);mxEvent.consume(N)});@@ -2050,11 +2050,11 @@ format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",fo{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};var FilenameDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),z=document.createElement("div");z.style.width="100%";z.style.display="grid";z.style.gap="5px 8px";z.style.gridAutoColumns="auto 1fr";z.style.boxSizing="border-box";z.style.padding="3px";var C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.justifyContent="flex-end";C.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";E.style.textOverflow="ellipsis";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.fontSize="10pt";E.style.padding="2px 0";E.setAttribute("title",h||mxResources.get("filename"));mxUtils.write(E,(h||mxResources.get("filename"))+":");C.appendChild(E);z.appendChild(C);var D=document.createElement("input");D.setAttribute("value",b||"");D.style.flexGrow="1";var G=mxUtils.button(e,function(){if(null==d||d(D.value))p&&a.hideDialog(),f(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=-h||null==g)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var K=z.parentNode;if(null!=K){var L=null;mxEvent.addListener(K,"dragleave",function(Q){null!=L&&(L.style.backgroundColor="",L=null);Q.stopPropagation();Q.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=D,L.style.backgroundColor=-"#ebf2f9");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Q.dataTransfer.getData("text/uri-list")),G.click());Q.stopPropagation();Q.preventDefault()}))}}};C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.gap="4px";C.style.whiteSpace="nowrap";C.appendChild(D);z.appendChild(C);+h||null==g)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var J=z.parentNode;if(null!=J){var L=null;mxEvent.addListener(J,"dragleave",function(Q){null!=L&&(L.style.backgroundColor="",L=null);Q.stopPropagation();Q.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(Q){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=D,L.style.backgroundColor=+"#ebf2f9");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(Q){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Q.dataTransfer.getData("text/uri-list")),G.click());Q.stopPropagation();Q.preventDefault()}))}}};C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.gap="4px";C.style.whiteSpace="nowrap";C.appendChild(D);z.appendChild(C);null==h&&null!=g||null==u||null==a.editor.diagramFileTypes||(C=document.createElement("div"),C.style.display="inline-flex",C.style.alignItems="center",C.style.textOverflow="ellipsis",C.style.justifyContent="flex-end",C.style.fontSize="10pt",mxUtils.write(C,mxResources.get("type")+":"),z.appendChild(C),C=document.createElement("div"),C.style.display="inline-flex",C.style.alignItems="center",C.style.whiteSpace="nowrap",z.appendChild(C),b=FilenameDialog.createFileTypes(a,D,a.editor.diagramFileTypes),b.style.width="100%",C.appendChild(b));null!=g&&z.appendChild(g);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=u?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});C.className="geBtn";null==m||a.isOffline()||row.appendChild(a.createHelpIcon(m));-a.editor.cancelFirst&&row.appendChild(C);mxEvent.addListener(D,"keypress",function(K){13==K.keyCode&&G.click()});row.appendChild(G);a.editor.cancelFirst||row.appendChild(C);z.appendChild(row);w.appendChild(z);this.container=w};FilenameDialog.filenameHelpLink=null;+a.editor.cancelFirst&&row.appendChild(C);mxEvent.addListener(D,"keypress",function(J){13==J.keyCode&&G.click()});row.appendChild(G);a.editor.cancelFirst||row.appendChild(C);z.appendChild(row);w.appendChild(z);this.container=w};FilenameDialog.filenameHelpLink=null;FilenameDialog.createFileTypes=function(a,b,e){var f=document.createElement("select");for(a=0;a<e.length;a++){var h=document.createElement("option");h.setAttribute("value",a);mxUtils.write(h,mxResources.get(e[a].description)+" (."+e[a].extension+")");f.appendChild(h)}mxEvent.addListener(f,"change",function(d){d=e[f.value].extension;var g=b.value.lastIndexOf(".drawio.");g=0<g?g:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<g?b.value.substring(0,g+1)+d:b.value+"."+d;"createEvent"indocument?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var g=0,m=0;m<e.length;m++){var p=e[m].extension,k=null;"drawio"!=p&&(k=p,p=".drawio."+p);if(d.substring(d.length-p.length-1)=="."+p||null!=k&&d.substring(d.length-k.length-1)=="."+k){g=m;break}}f.value=g};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return f};var WrapperWindow=function(a,b,e,f,h,d,g){var m=a.createSidebarContainer();g(m);this.window=new mxWindow(b,m,e,f,h,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(p){null==p&&(p=window.event);return null!=p&&a.isSelectionAllowed(p)}))};@@ -2062,43 +2062,43 @@ var WrapperWindow=function(a,b,e,f,h,d,g){var m=a.createSidebarContainer();g(m);this.backgroundPageShape.init(g.container),p.style.position="absolute",g.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){g.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=g.tooltipHandler&&g.tooltipHandler.isHideOnHover()&&g.tooltipHandler.hide();g.isMouseDown&&!mxEvent.isConsumed(k)&&g.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=-10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,K=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*-this.scale-z+m,E)+K*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=+10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,J=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*+this.scale-z+m,E)+J*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme="none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,"1"==urlParams.transparent?k.container.style.background="transparent":!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*p;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,w=-this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,K=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(Q){if(null!=Q){for(var N=Q==this.horizontalPageBreaks?D:G,U=-0;U<=N;U++){var Y=Q==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(K),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=Q[U]?(Q[U].points=Y,Q[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),Q[U]=Y)}for(U=N;U<+this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,J=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(Q){if(null!=Q){for(var N=Q==this.horizontalPageBreaks?D:G,U=+0;U<=N;U++){var Y=Q==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(J),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=Q[U]?(Q[U].points=Y,Q[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),Q[U]=Y)}for(U=N;U<Q.length;U++)null!=Q[U]&&Q[U].destroy();Q.splice(N,Q.length-N)}});g(this.horizontalPageBreaks);g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var g=e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var z=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,w){var z=h.apply(this,arguments);null==w||w||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var w=this.graph.isCellSelected(p);u=u||w;if(w||!u&&(this.graph.isTableCell(g)||-this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var J=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Z=this.view.translate,ia=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((Z.x+V.x)*ia,(Z.y+V.y)*ia,V.width*ia,V.height*ia))}return J};h.useCssTransforms&&-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(J,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=-0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(J){for(var V=J.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(J.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(J){try{h.getModel().isEdge(J)?-p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(J,!1),Z=[],ia=[],oa;for(oa in V)Z.push(V[oa]),ia.push(oa);h.getModel().isEdge(J)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",Z,"cells",[J],"force",!0));h.getModel().isEdge(J)?p=h.pasteEdgeStyle=!0:m=!0}catch(sa){this.handleError(sa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=p=h.pasteEdgeStyle=-!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};h.addListener("cellsInserted",function(J,V){h.pasteCellStyles(h.includeDescendants(V.getProperty("cells")))});h.addListener("textInserted",function(J,V){h.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(J){null==J&&(J=window.event);return h.isEditing()||null!=J&&this.isSelectionAllowed(J)});this.container!=document.body||this.editor.chromeless&&+this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var K=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Z=this.view.translate,ia=this.view.scale;K=mxRectangle.fromRectangle(K);K.add(new mxRectangle((Z.x+V.x)*ia,(Z.y+V.y)*ia,V.width*ia,V.height*ia))}return K};h.useCssTransforms&&+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(K,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=+0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(K){for(var V=K.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(K.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(K){try{h.getModel().isEdge(K)?+p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(K,!1),Z=[],ia=[],oa;for(oa in V)Z.push(V[oa]),ia.push(oa);h.getModel().isEdge(K)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",Z,"cells",[K],"force",!0));h.getModel().isEdge(K)?p=h.pasteEdgeStyle=!0:m=!0}catch(sa){this.handleError(sa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=p=h.pasteEdgeStyle=+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};h.addListener("cellsInserted",function(K,V){h.pasteCellStyles(h.includeDescendants(V.getProperty("cells")))});h.addListener("textInserted",function(K,V){h.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(K){null==K&&(K=window.event);return h.isEditing()||null!=K&&this.isSelectionAllowed(K)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=-k),mxClient.IS_IOS&&(b=function(){var J=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{J=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(Z){}}return J}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,-"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(J){if(null!=J){var V=mxEvent.getSource(J);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return k(J)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,+k),mxClient.IS_IOS&&(b=function(){var K=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{K=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(Z){}}return K}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,+"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(K){if(null!=K){var V=mxEvent.getSource(K);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return k(K)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):h.panningHandler.usePopupTrigger=!1;h.init(this.diagramContainer);mxClient.IS_SVG&&null!=h.view.getDrawPane()&&(b=h.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=h.graphHandler){var u=h.graphHandler.start;h.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,-function(J){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(J)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(J)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(J,V){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(J){16==J.which?this.shiftDown=-!0:32!=J.which||h.isEditing()?mxEvent.isConsumed(J)||27!=J.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),h.container.style.cursor="move",h.isEditing()||mxEvent.getSource(J)!=h.container||mxEvent.consume(J))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(J){h.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=h.panningHandler.isForcePanningEvent;-h.panningHandler.isForcePanningEvent=function(J){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(J.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(J.getEvent()))&&(!mxEvent.isControlDown(J.getEvent())&&mxEvent.isRightMouseButton(J.getEvent())||mxEvent.isMiddleMouseButton(J.getEvent()))};var C=h.cellEditor.isStopEditingEvent;h.cellEditor.isStopEditingEvent=function(J){return C.apply(this,arguments)||13==J.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(J)||mxClient.IS_MAC&&-mxEvent.isMetaDown(J)||mxClient.IS_SF&&mxEvent.isShiftDown(J))};var E=h.isZoomWheelEvent;h.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=!1,G=null,K=null,L=null,Q=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=h.cellEditor.isContentEditing()){for(var J=this.toolbar.container.firstChild,V=[];null!=J;){var Z=J.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,J)&&(J.parentNode.removeChild(J),V.push(J));J=Z}J=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;-if(null==L)this.toolbar.createTextToolbar();else{for(var ia=0;ia<L.length;ia++)this.toolbar.container.appendChild(L[ia]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=K}D=h.cellEditor.isContentEditing();G=J;K=Z;L=V}}),N=h.cellEditor.startEditing;h.cellEditor.startEditing=function(){N.apply(this,arguments);Q();if(h.cellEditor.isContentEditing()){var J=!1,V=function(){J||(J=!0,window.setTimeout(function(){var Z=h.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=f.toolbar&&-(f.toolbar.setFontName(mxUtils.getCssFontFamily(Z.fontFamily)),f.toolbar.setFontSize(parseInt(Z.fontSize))));J=!1},0))};mxEvent.addListener(h.cellEditor.textarea,"input",V);mxEvent.addListener(h.cellEditor.textarea,"touchend",V);mxEvent.addListener(h.cellEditor.textarea,"mouseup",V);mxEvent.addListener(h.cellEditor.textarea,"keyup",V);V()}};var U=h.cellEditor.stopEditing;h.cellEditor.stopEditing=function(J,V){try{U.apply(this,arguments),Q()}catch(Z){f.handleError(Z)}};h.container.setAttribute("tabindex",-"0");h.container.style.cursor="default";if(window.self===window.top&&null!=h.container.parentNode)try{h.container.focus()}catch(J){}var Y=h.fireMouseEvent;h.fireMouseEvent=function(J,V,Z){try{J==mxEvent.MOUSE_DOWN&&this.container.focus(),Y.apply(this,arguments)}catch(ia){f.handleError(ia)}};var P=h.foldCells;h.foldCells=function(J,V,Z,ia,oa){try{P.apply(this,arguments)}catch(sa){f.handleError(sa)}};h.popupMenuHandler.autoExpand=!0;null!=this.menus&&(h.popupMenuHandler.factoryMethod=mxUtils.bind(this,-function(J,V,Z){this.menus.createPopupMenu(J,V,Z)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(J){h.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};h.connectionHandler.addListener(mxEvent.CONNECT,function(J,V){var Z=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(Z.push(V.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(h.view.getState(Z[Z.length--1]))},0));h.pasteCellStyles(Z)});this.addListener("styleChanged",mxUtils.bind(this,function(J,V){J=V.getProperty("force");(this.updateDefaultStyle||J)&&h.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),h.currentVertexStyle,h.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(h.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(h.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&+function(K){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(K)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(K)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(K,V){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(K){16==K.which?this.shiftDown=+!0:32!=K.which||h.isEditing()?mxEvent.isConsumed(K)||27!=K.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),h.container.style.cursor="move",h.isEditing()||mxEvent.getSource(K)!=h.container||mxEvent.consume(K))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(K){h.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=h.panningHandler.isForcePanningEvent;+h.panningHandler.isForcePanningEvent=function(K){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(K.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(K.getEvent()))&&(!mxEvent.isControlDown(K.getEvent())&&mxEvent.isRightMouseButton(K.getEvent())||mxEvent.isMiddleMouseButton(K.getEvent()))};var C=h.cellEditor.isStopEditingEvent;h.cellEditor.isStopEditingEvent=function(K){return C.apply(this,arguments)||13==K.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(K)||mxClient.IS_MAC&&+mxEvent.isMetaDown(K)||mxClient.IS_SF&&mxEvent.isShiftDown(K))};var E=h.isZoomWheelEvent;h.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=!1,G=null,J=null,L=null,Q=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=h.cellEditor.isContentEditing()){for(var K=this.toolbar.container.firstChild,V=[];null!=K;){var Z=K.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,K)&&(K.parentNode.removeChild(K),V.push(K));K=Z}K=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;+if(null==L)this.toolbar.createTextToolbar();else{for(var ia=0;ia<L.length;ia++)this.toolbar.container.appendChild(L[ia]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=J}D=h.cellEditor.isContentEditing();G=K;J=Z;L=V}}),N=h.cellEditor.startEditing;h.cellEditor.startEditing=function(){N.apply(this,arguments);Q();if(h.cellEditor.isContentEditing()){var K=!1,V=function(){K||(K=!0,window.setTimeout(function(){var Z=h.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=f.toolbar&&+(f.toolbar.setFontName(mxUtils.getCssFontFamily(Z.fontFamily)),f.toolbar.setFontSize(parseInt(Z.fontSize))));K=!1},0))};mxEvent.addListener(h.cellEditor.textarea,"input",V);mxEvent.addListener(h.cellEditor.textarea,"touchend",V);mxEvent.addListener(h.cellEditor.textarea,"mouseup",V);mxEvent.addListener(h.cellEditor.textarea,"keyup",V);V()}};var U=h.cellEditor.stopEditing;h.cellEditor.stopEditing=function(K,V){try{U.apply(this,arguments),Q()}catch(Z){f.handleError(Z)}};h.container.setAttribute("tabindex",+"0");h.container.style.cursor="default";if(window.self===window.top&&null!=h.container.parentNode)try{h.container.focus()}catch(K){}var Y=h.fireMouseEvent;h.fireMouseEvent=function(K,V,Z){try{K==mxEvent.MOUSE_DOWN&&this.container.focus(),Y.apply(this,arguments)}catch(ia){f.handleError(ia)}};var P=h.foldCells;h.foldCells=function(K,V,Z,ia,oa){try{P.apply(this,arguments)}catch(sa){f.handleError(sa)}};h.popupMenuHandler.autoExpand=!0;null!=this.menus&&(h.popupMenuHandler.factoryMethod=mxUtils.bind(this,+function(K,V,Z){this.menus.createPopupMenu(K,V,Z)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(K){h.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};h.connectionHandler.addListener(mxEvent.CONNECT,function(K,V){var Z=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(Z.push(V.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(h.view.getState(Z[Z.length-+1]))},0));h.pasteCellStyles(Z)});this.addListener("styleChanged",mxUtils.bind(this,function(K,V){K=V.getProperty("force");(this.updateDefaultStyle||K)&&h.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),h.currentVertexStyle,h.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(h.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(h.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(V=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="orthogonalEdgeStyle"==h.currentEdgeStyle.edgeStyle&&"1"==h.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==h.currentEdgeStyle.edgeStyle||"none"==h.currentEdgeStyle.edgeStyle||null==h.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==h.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(V=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="link"==h.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==h.currentEdgeStyle.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&-(a=mxUtils.bind(this,function(){var J=h.currentVertexStyle.fontFamily||"Helvetica",V=String(h.currentVertexStyle.fontSize||"12"),Z=h.getView().getState(h.getSelectionCell());null!=Z&&(J=Z.style[mxConstants.STYLE_FONTFAMILY]||J,V=Z.style[mxConstants.STYLE_FONTSIZE]||V,10<J.length&&(J=J.substring(0,8)+"..."));this.toolbar.setFontName(J);this.toolbar.setFontSize(V)}),h.getSelectionModel().addListener(mxEvent.CHANGE,a),h.getModel().addListener(mxEvent.CHANGE,a));h.addListener(mxEvent.CELLS_ADDED,function(J,-V){J=V.getProperty("cells");V=V.getProperty("parent");null!=V&&h.getModel().isLayer(V)&&!h.isCellVisible(V)&&null!=J&&0<J.length&&h.getModel().setVisible(V,!0)});Graph.selectParentLayer&&h.selectionModel.addListener(mxEvent.CHANGE,function(){if(h.isEnabled()&&!h.isSelectionEmpty()){var J=h.getLayerForCells(h.getSelectionCells());null!=J&&h.setDefaultParent(J)}});this.gestureHandler=mxUtils.bind(this,function(J){null!=this.currentMenu&&mxEvent.getSource(J)!=this.currentMenu.div&&this.hideCurrentMenu()});+(a=mxUtils.bind(this,function(){var K=h.currentVertexStyle.fontFamily||"Helvetica",V=String(h.currentVertexStyle.fontSize||"12"),Z=h.getView().getState(h.getSelectionCell());null!=Z&&(K=Z.style[mxConstants.STYLE_FONTFAMILY]||K,V=Z.style[mxConstants.STYLE_FONTSIZE]||V,10<K.length&&(K=K.substring(0,8)+"..."));this.toolbar.setFontName(K);this.toolbar.setFontSize(V)}),h.getSelectionModel().addListener(mxEvent.CHANGE,a),h.getModel().addListener(mxEvent.CHANGE,a));h.addListener(mxEvent.CELLS_ADDED,function(K,+V){K=V.getProperty("cells");V=V.getProperty("parent");null!=V&&h.getModel().isLayer(V)&&!h.isCellVisible(V)&&null!=K&&0<K.length&&h.getModel().setVisible(V,!0)});Graph.selectParentLayer&&h.selectionModel.addListener(mxEvent.CHANGE,function(){if(h.isEnabled()&&!h.isSelectionEmpty()){var K=h.getLayerForCells(h.getSelectionCells());null!=K&&h.setDefaultParent(K)}});this.gestureHandler=mxUtils.bind(this,function(K){null!=this.currentMenu&&mxEvent.getSource(K)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var T=null;this.resizeHandler=mxUtils.bind(this,function(){null!=T&&window.clearTimeout(T);T=window.setTimeout(mxUtils.bind(this,function(){T=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));h.addListener("gridSizeChanged",mxUtils.bind(this,function(){h.isGridEnabled()&&h.view.validateBackground()}));this.editor.resetGraph()}this.init();h.standalone||this.open()};EditorUi.compactUi=!0;@@ -2124,14 +2124,14 @@ EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.popupMenuHandler.isMenuShowing=function(){return f.apply(this,arguments)||null!=b.shapePicker||null!=b.currentMenu};var h=a.dblClick;a.dblClick=function(p,k){if(this.isEnabled())if(null!=k||null==b.sidebar||mxEvent.isShiftDown(p)||a.isCellLocked(a.getDefaultParent()))h.apply(this,arguments);else{var u=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));mxEvent.consume(p);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.x,u.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var g=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?g.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(z,C,E){var D=a.getCompositeParent(p.cell);z=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=z&&z.relative;)cell=D,D=a.model.getParent(cell),z=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(G){E(G);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(G))}),k)}),30)}),mxUtils.bind(this,function(z){this.graph.selectCellsForConnectVertex(z,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=-k.getProperty("arrow"),w=k.getProperty("direction"),z=k.getProperty("event");u=u.getBoundingClientRect();var C=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-C.x;C=a.container.scrollTop+u.y-C.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=b.showShapePicker(E,C,D,mxUtils.bind(this,function(K){null!=K&&a.connectVertex(D,w,a.defaultEdgeLength,z,!0,!1,function(L,Q,N){N(K);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(K))},+k.getProperty("arrow"),w=k.getProperty("direction"),z=k.getProperty("event");u=u.getBoundingClientRect();var C=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-C.x;C=a.container.scrollTop+u.y-C.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=b.showShapePicker(E,C,D,mxUtils.bind(this,function(J){null!=J&&a.connectVertex(D,w,a.defaultEdgeLength,z,!0,!1,function(L,Q,N){N(J);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(J))},function(L){a.selectCellsForConnectVertex(L)},z,this.hoverIcons)}),w,!0);null!=G&&(this.centerShapePicker(G,u,E,C,w),mxUtils.setOpacity(G,30),mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)}),mxEvent.addListener(G,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};EditorUi.prototype.centerShapePicker=function(a,b,e,f,h){if(h==mxConstants.DIRECTION_EAST||h==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();h==mxConstants.DIRECTION_NORTH?(e-=d.width/2-10,f-=d.height+6):h==mxConstants.DIRECTION_SOUTH?(e-=d.width/2-10,f+=b.height+6):h==mxConstants.DIRECTION_WEST?(e-=d.width+6,f-=d.height/2-10):h==mxConstants.DIRECTION_EAST&&(e+=b.width+6,f-=d.height/2-10);a.style.left=e+"px";a.style.top=f+"px"};EditorUi.prototype.showShapePicker=function(a,b,e,f,h,d,g,m,p){var k=null;this.editor.graph.freehand.isDrawing()||(m=m||null==e,k=this.createShapePicker(a,b,e,f,h,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,d,m),d,g,m,p),null!=k&&(null==this.hoverIcons||d||this.hoverIcons.reset(),a=this.editor.graph,a.popupMenuHandler.hideMenu(),a.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=f,this.shapePicker=k));return k};-EditorUi.prototype.createShapePicker=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,z=null;p=null!=p?p:function(D){D=D[0];var G=0,K=0,L=D.geometry;null!=L&&(w.model.isEdge(D)&&(D=L.getTerminalPoint(!1),L=new mxRectangle(0,0,D.x,D.y)),G=L.width/2,K=L.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-G),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-K))};if(null!=g&&0<g.length){var C=this;w=this.editor.graph;z=document.createElement("div");+EditorUi.prototype.createShapePicker=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,z=null;p=null!=p?p:function(D){D=D[0];var G=0,J=0,L=D.geometry;null!=L&&(w.model.isEdge(D)&&(D=L.getTerminalPoint(!1),L=new mxRectangle(0,0,D.x,D.y)),G=L.width/2,J=L.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-G),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-J))};if(null!=g&&0<g.length){var C=this;w=this.editor.graph;z=document.createElement("div");h=w.view.getState(e);var E=null==e||null!=h&&w.isTransparentState(h)?null:w.copyStyle(e);h=6>g.length?35*g.length:140;z.className="geToolbarContainer geSidebarContainer geShapePicker";z.setAttribute("title",mxResources.get("sidebarTooltip"));z.style.left=Math.round(a)+"px";z.style.top=Math.round(b)+"px";z.style.width=h+"px";mxClient.IS_POINTER&&(z.style.touchAction="none");m||mxUtils.setPrefixedStyle(z.style,"transform","translate(-22px,-22px)");w.container.appendChild(z);h=mxUtils.bind(this,function(D){var G=-document.createElement("a");G.className="geToolbarButton";G.style.display="inline-block";G.style.position="relative";G.style.overflow="hidden";G.style.cursor="pointer";G.style.width="30px";G.style.height="30px";G.style.padding="1px";z.appendChild(G);null!=E&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var K=D.geometry;w.model.isEdge(D)&&(K=K.getTerminalPoint(!1),K=new mxRectangle(0,0,K.x,K.y));null!=K&&-G.appendChild(this.sidebar.createVertexTemplateFromCells([D],K.width,K.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isShiftDown(L)||null==e&&w.isSelectionEmpty()){var Q=w.cloneCell(D);if(null!=f)f(Q);else{var N=p([Q]);w.model.isEdge(Q)?Q.geometry.translate(N.x,N.y):(Q.geometry.x=N.x,Q.geometry.y=N.y);w.model.beginUpdate();try{w.addCell(Q),w.model.isVertex(Q)&&w.isAutoSizeCell(Q)&&w.updateCellSize(Q)}finally{w.model.endUpdate()}w.setSelectionCell(Q);w.scrollCellToVisible(Q);u&&+document.createElement("a");G.className="geToolbarButton";G.style.display="inline-block";G.style.position="relative";G.style.overflow="hidden";G.style.cursor="pointer";G.style.width="30px";G.style.height="30px";G.style.padding="1px";z.appendChild(G);null!=E&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var J=D.geometry;w.model.isEdge(D)&&(J=J.getTerminalPoint(!1),J=new mxRectangle(0,0,J.x,J.y));null!=J&&+G.appendChild(this.sidebar.createVertexTemplateFromCells([D],J.width,J.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isShiftDown(L)||null==e&&w.isSelectionEmpty()){var Q=w.cloneCell(D);if(null!=f)f(Q);else{var N=p([Q]);w.model.isEdge(Q)?Q.geometry.translate(N.x,N.y):(Q.geometry.x=N.x,Q.geometry.y=N.y);w.model.beginUpdate();try{w.addCell(Q),w.model.isVertex(Q)&&w.isAutoSizeCell(Q)&&w.updateCellSize(Q)}finally{w.model.endUpdate()}w.setSelectionCell(Q);w.scrollCellToVisible(Q);u&&w.startEditing(Q);null!=C.hoverIcons&&C.hoverIcons.update(w.view.getState(Q))}}else Q=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(D,Q);null!=d&&d(L);mxEvent.consume(L)}),25,25,null,null,e))});for(k=0;k<(m?Math.min(g.length,4):g.length);k++)h(g[k]);g=z.offsetTop+z.clientHeight-(w.container.scrollTop+w.container.offsetHeight);0<g&&(z.style.top=Math.max(w.container.scrollTop+22,b-g)+"px");g=z.offsetLeft+z.clientWidth-(w.container.scrollLeft+w.container.offsetWidth);0<g&&(z.style.left=Math.max(w.container.scrollLeft+22,a-g)+"px")}return z};EditorUi.prototype.getCellsForShapePicker=function(a,b,e){var f=this.editor.graph,h=mxUtils.bind(this,function(d,g,m,p){return f.createVertex(null,null,p||"",0,0,g||120,m||60,d,!1)});b=mxUtils.bind(this,function(d,g,m){d=new mxCell(m||"",new mxGeometry(0,0,f.defaultEdgeLength+20,0),d);d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,null!=g?g:0),!1);d.geometry.points=null!=g?[new mxPoint(d.geometry.width/2,g)]:[];d.geometry.relative=!0;d.edge=@@ -2168,18 +2168,18 @@ p.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.m(u.style.display="none",p.style.display="none",k.style.display="none");w()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(H){var ea=new mxPopupMenu(C.funct);ea.div.className+=" geMenubarMenu";ea.smartSeparators=!0;ea.showDisabled=!0;ea.autoExpand=!0;ea.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(ea,arguments);ea.destroy()});var ra=mxUtils.getOffset(k);ea.popup(ra.x,ra.y+k.offsetHeight,null,H);mxEvent.addListener(ea.div,"mouseleave",mxUtils.bind(this,function(){ea.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(H)}),Editor.zoomFitImage,mxResources.get("fit"));var E=null,D=null,G=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);E=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);E=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),-600)}),H||200)}),K=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&+600)}),H||200)}),J=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ea=L.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=ea.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));ea=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=ea.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){L.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(H){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var N=this.lightboxToolbarActions[z];N.elem=d(N.fn,N.icon,N.tooltip)}if(null!=h.refreshBtn){var U=null==h.refreshBtn.url?null:Graph.sanitizeLink(h.refreshBtn.url);d(mxUtils.bind(this,function(H){null!=U?window.location.href=U:window.location.reload();mxEvent.consume(H)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=h.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(H){h.fullscreenBtn.url?a.openLink(h.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(H)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!h.noCloseBtn&&(h.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,function(H){"1"==urlParams.close||h.closeBtn?window.close():(this.destroy(),mxEvent.consume(H))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||-(mxEvent.isShiftDown(H)||K(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?G():K(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?G():K(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||K(30)}));var Y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,ea){this.startX=ea.getGraphX();this.startY=ea.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,ea){},mouseUp:function(H,ea){mxEvent.isTouchEvent(ea.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Y&&Math.abs(this.scrollTop-a.container.scrollTop)<-Y&&Math.abs(this.startX-ea.getGraphX())<Y&&Math.abs(this.startY-ea.getGraphY())<Y&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():K(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate,T=new mxPoint,J=!1,V=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&V!=e.currentPage){V=e.currentPage;J=!0;var H=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==+(mxEvent.isShiftDown(H)||J(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?G():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?G():J(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,+"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||J(30)}));var Y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,ea){this.startX=ea.getGraphX();this.startY=ea.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,ea){},mouseUp:function(H,ea){mxEvent.isTouchEvent(ea.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Y&&Math.abs(this.scrollTop-a.container.scrollTop)<+Y&&Math.abs(this.startX-ea.getGraphX())<Y&&Math.abs(this.startY-ea.getGraphY())<Y&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate,T=new mxPoint,K=!1,V=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&V!=e.currentPage){V=e.currentPage;K=!0;var H=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==H&&(H=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));H=a.getPageLayout(H,T,1);var ea=a.getDefaultTranslate(H);this.x0=H.x;this.y0=H.y;if(ea.x!=this.translate.x||ea.y!=this.translate.y)this.invalidate(),this.translate.x=ea.x,this.translate.y=ea.y}ea=a.getPagePadding();var ra=a.getPageSize();H=ea.x-(this.x0||0)*ra.width;ea=ea.y-(this.y0||0)*ra.height;if(this.translate.x!=H||this.translate.y!=ea)this.invalidate(),this.translate.x=H,this.translate.y=ea}P.apply(this,-arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){var H=J;J=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var ea=this.getPageLayout(),ra=this.getDefaultTranslate(ea),qa=this.view.translate.x,Pa=this.view.translate.y;if(ra.x!=qa||ra.y!=Pa){this.view.x0=ea.x;this.view.y0=ea.y;this.autoTranslate=!0;this.view.setTranslate(ra.x,ra.y);this.autoTranslate=!1;H||(this.container.scrollLeft+=Math.round((ra.x-qa)*+arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){var H=K;K=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var ea=this.getPageLayout(),ra=this.getDefaultTranslate(ea),qa=this.view.translate.x,Pa=this.view.translate.y;if(ra.x!=qa||ra.y!=Pa){this.view.x0=ea.x;this.view.y0=ea.y;this.autoTranslate=!0;this.view.setTranslate(ra.x,ra.y);this.autoTranslate=!1;H||(this.container.scrollLeft+=Math.round((ra.x-qa)*this.view.scale),this.container.scrollTop+=Math.round((ra.y-Pa)*this.view.scale));return}}Z.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ia=a.view.getBackgroundPane(),oa=a.view.getDrawPane();a.cumulativeZoomFactor=1;var sa=null,O=null,X=null,ba=null,da=null,ca=function(H){null!=sa&&window.clearTimeout(sa);0<=H&&window.setTimeout(function(){if(!a.isMouseDown||ba)sa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),oa.style.transformOrigin="",ia.style.transformOrigin="",mxClient.IS_SF?(oa.style.transform="scale(1)",ia.style.transform="scale(1)",window.setTimeout(function(){oa.style.transform="";ia.style.transform=""},0)):(oa.style.transform="",ia.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ea=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ra=mxUtils.getOffset(a.container),qa=a.view.scale,Pa=0,ma=0;null!=O&&(Pa=a.container.offsetWidth/2-O.x+ra.x,ma=a.container.offsetHeight/2-O.y+ra.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=qa&&(null!=X&&(Pa+=ea.x-X.x,ma+=ea.y-X.y),null!=b&&e.chromelessResize(!1,null,Pa*(a.cumulativeZoomFactor-1),ma*(a.cumulativeZoomFactor-@@ -2279,8 +2279,8 @@ EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bEditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};EditorUi.prototype.createKeyHandler=function(a){function b(w,z,C){if(!f.isSelectionEmpty()&&f.isEnabled()){z=null!=z?z:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(C){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var G=f.getCellGeometry(E[D]);null!=G&&(G=G.clone(),37==w?G.width=Math.max(0,G.width-z):38==w?G.height=Math.max(0,G.height-z):39==w?G.width+=z:40==w&&(G.height+=z),f.getModel().setGeometry(E[D],-G))}}finally{f.getModel().endUpdate()}}else{G=f.model.getParent(D);var K=f.getView().scale;C=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(C=f.layoutManager.getLayout(G));if(null!=C&&C.constructor==mxStackLayout)z=G.getIndex(D),37==w||38==w?f.model.add(G,D,Math.max(0,z-1)):(39==w||40==w)&&f.model.add(G,D,Math.min(f.model.getChildCount(G),z+1));else{var L=f.graphHandler;null!=L&&(null==L.first&&L.start(D,0,0,f.getMovableCells(E)),null!=L.first&&(D=-E=0,37==w?E=-z:38==w?D=-z:39==w?E=z:40==w&&(D=z),L.currentDx+=E*K,L.currentDy+=D*K,L.checkPreview(),L.updatePreview()),null!=g&&window.clearTimeout(g),g=window.setTimeout(function(){if(null!=L.first){var Q=L.roundLength(L.currentDx/K),N=L.roundLength(L.currentDy/K);L.moveCells(L.cells,Q,N);L.reset()}},400))}}}}var e=this,f=this.editor.graph,h=new mxKeyHandler(f),d=h.isEventIgnored;h.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||+G))}}finally{f.getModel().endUpdate()}}else{G=f.model.getParent(D);var J=f.getView().scale;C=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(C=f.layoutManager.getLayout(G));if(null!=C&&C.constructor==mxStackLayout)z=G.getIndex(D),37==w||38==w?f.model.add(G,D,Math.max(0,z-1)):(39==w||40==w)&&f.model.add(G,D,Math.min(f.model.getChildCount(G),z+1));else{var L=f.graphHandler;null!=L&&(null==L.first&&L.start(D,0,0,f.getMovableCells(E)),null!=L.first&&(D=+E=0,37==w?E=-z:38==w?D=-z:39==w?E=z:40==w&&(D=z),L.currentDx+=E*J,L.currentDy+=D*J,L.checkPreview(),L.updatePreview()),null!=g&&window.clearTimeout(g),g=window.setTimeout(function(){if(null!=L.first){var Q=L.roundLength(L.currentDx/J),N=L.roundLength(L.currentDy/J);L.moveCells(L.cells,Q,N);L.reset()}},400))}}}}var e=this,f=this.editor.graph,h=new mxKeyHandler(f),d=h.isEventIgnored;h.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||90!=w.keyCode&&89!=w.keyCode&&188!=w.keyCode&&190!=w.keyCode&&85!=w.keyCode&&83!=w.keyCode)&&(66!=w.keyCode&&73!=w.keyCode||!this.isControlDown(w)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=w.keyCode&&107!=w.keyCode||!this.isControlDown(w)&&!mxEvent.isShiftDown(w)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};h.isEnabledForEvent=function(w){return!mxEvent.isConsumed(w)&&this.isGraphEvent(w)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};h.isControlDown=function(w){return mxEvent.isControlDown(w)||mxClient.IS_MAC&&w.metaKey};var g=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=h.getFunction;mxKeyHandler.prototype.getFunction=function(w){if(f.isEnabled()){var z=null;mxEvent.isShiftDown(w)&&this.isControlDown(w)&&mxEvent.isAltDown(w)?z=e.actions.get(e.ctrlAltShiftActions[w.keyCode]):mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)?z=e.actions.get(e.altShiftActions[w.keyCode]):this.isControlDown(w)&&mxEvent.isAltDown(w)&&(z=e.actions.get(e.ctrlAltActions[w.keyCode]));if(null!=z)return z.funct;if(null!=m[w.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(w)&&mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)){if(f.model.isVertex(f.getSelectionCell()))return function(){var C=f.connectVertex(f.getSelectionCell(),m[w.keyCode],f.defaultEdgeLength,w,!0);null!=C&&0<C.length&&(1==C.length&&f.model.isEdge(C[0])?f.setSelectionCell(f.model.getTerminal(C[0],@@ -2337,13 +2337,13 @@ Sidebar.prototype.searchEntries=function(a,b,e,f,h,d){if(null!=this.taglist&&nuld)&&(m.push(C),k==g.length-1&&m.length==h))){f(m.slice(e*b,h),h,!0,g);return}}}else m=[];a=u;p++}}d=m.length;f(m.slice(e*b,(e+1)*b),d,!1,g)}else f([],null,null,g)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],e={},f=0;f<a.length;f++)null==e[a[f]]&&(e[a[f]]="1",b.push(a[f]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,e){};Sidebar.prototype.addSearchPalette=function(a){function b(){g.setAttribute("src",Editor.magnifyImage);g.setAttribute("title",mxResources.get("search"));p.style.display="none";k=d.value="";D()}var e=document.createElement("div");e.style.visibility="hidden";this.appendChild(e);var f=document.createElement("div");f.className="geSidebar geSearchSidebar";a||(f.style.display="none");var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.textOverflow="clip";h.style.paddingBottom="8px";h.style.cursor="default";var d=document.createElement("input");d.setAttribute("placeholder",mxResources.get("searchShapes"));d.setAttribute("type","text");h.appendChild(d);var g=document.createElement("img");g.setAttribute("src",Editor.magnifyImage);g.setAttribute("title",mxResources.get("search"));g.className="geAdaptiveAsset";g.style.position="relative";g.style.cursor="pointer";g.style.opacity="0.5";g.style.height="16px";g.style.left="-20px";g.style.top="4px";g.style.background="url('"+this.editorUi.editor.transparentImage+-"')";h.appendChild(g);f.appendChild(h);var m=document.createElement("center"),p=mxUtils.button(mxResources.get("moreResults"),function(){G()});p.style.display="none";p.style.lineHeight="normal";p.style.fontSize="12px";p.style.padding="6px 12px 6px 12px";p.style.marginTop="4px";p.style.marginBottom="8px";m.style.paddingTop="4px";m.style.paddingBottom="4px";m.appendChild(p);f.appendChild(m);var k="",u=!1,w=!1,z=0,C={},E=12,D=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var K=f.firstChild;null!=-K;){var L=K.nextSibling;K!=h&&K!=m&&K.parentNode.removeChild(K);K=L}});mxEvent.addListener(g,"click",function(){g.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){E=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(D(),k=d.value,C={},w=!1,z=0),!u&&!w)){p.setAttribute("disabled","true");p.style.display="";p.style.cursor="wait";p.innerHTML=mxResources.get("loading")+-"...";u=!0;var K={};this.currentSearch=K;try{this.searchEntries(k,E,z,mxUtils.bind(this,function(L,Q,N,U){if(this.currentSearch==K){L=null!=L?L:[];u=!1;z++;this.insertSearchHint(f,k,E,z,L,Q,N,U);0==L.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(Q=0;Q<L.length;Q++)mxUtils.bind(this,function(Y){try{var P=Y();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(Y,!1)&&(P.style.opacity=this.closedLibraryOpacity);null==C[P.innerHTML]?(C[P.innerHTML]=-null!=Y.parentLibraries?Y.parentLibraries.slice():[],f.appendChild(P)):null!=Y.parentLibraries&&(C[P.innerHTML]=C[P.innerHTML].concat(Y.parentLibraries));mxEvent.addGestureListeners(P,null,null,mxUtils.bind(this,function(T){var J=C[P.innerHTML];mxEvent.isPopupTrigger(T)&&this.showPopupMenuForEntry(P,J,T)}));mxEvent.disableContextMenu(P)}catch(T){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(T.stack)):console.error(T))}})(L[Q]);N?(p.removeAttribute("disabled"),-p.innerHTML=mxResources.get("moreResults")):(p.innerHTML=mxResources.get("reset"),p.style.display="none",w=!0);p.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){p.style.cursor=""}),this.searchClosedLibraries)}catch(L){this.editorUi.handleError(L)}}}else D(),k=d.value="",C={},p.style.display="none",w=!1,d.focus()});this.searchShapes=function(K){d.value=K;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(K){13==K.keyCode?(G(),mxEvent.consume(K)):27==K.keyCode&&b()}));+"')";h.appendChild(g);f.appendChild(h);var m=document.createElement("center"),p=mxUtils.button(mxResources.get("moreResults"),function(){G()});p.style.display="none";p.style.lineHeight="normal";p.style.fontSize="12px";p.style.padding="6px 12px 6px 12px";p.style.marginTop="4px";p.style.marginBottom="8px";m.style.paddingTop="4px";m.style.paddingBottom="4px";m.appendChild(p);f.appendChild(m);var k="",u=!1,w=!1,z=0,C={},E=12,D=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var J=f.firstChild;null!=+J;){var L=J.nextSibling;J!=h&&J!=m&&J.parentNode.removeChild(J);J=L}});mxEvent.addListener(g,"click",function(){g.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){E=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(D(),k=d.value,C={},w=!1,z=0),!u&&!w)){p.setAttribute("disabled","true");p.style.display="";p.style.cursor="wait";p.innerHTML=mxResources.get("loading")++"...";u=!0;var J={};this.currentSearch=J;try{this.searchEntries(k,E,z,mxUtils.bind(this,function(L,Q,N,U){if(this.currentSearch==J){L=null!=L?L:[];u=!1;z++;this.insertSearchHint(f,k,E,z,L,Q,N,U);0==L.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(Q=0;Q<L.length;Q++)mxUtils.bind(this,function(Y){try{var P=Y();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(Y,!1)&&(P.style.opacity=this.closedLibraryOpacity);null==C[P.innerHTML]?(C[P.innerHTML]=+null!=Y.parentLibraries?Y.parentLibraries.slice():[],f.appendChild(P)):null!=Y.parentLibraries&&(C[P.innerHTML]=C[P.innerHTML].concat(Y.parentLibraries));mxEvent.addGestureListeners(P,null,null,mxUtils.bind(this,function(T){var K=C[P.innerHTML];mxEvent.isPopupTrigger(T)&&this.showPopupMenuForEntry(P,K,T)}));mxEvent.disableContextMenu(P)}catch(T){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(T.stack)):console.error(T))}})(L[Q]);N?(p.removeAttribute("disabled"),+p.innerHTML=mxResources.get("moreResults")):(p.innerHTML=mxResources.get("reset"),p.style.display="none",w=!0);p.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){p.style.cursor=""}),this.searchClosedLibraries)}catch(L){this.editorUi.handleError(L)}}}else D(),k=d.value="",C={},p.style.display="none",w=!1,d.focus()});this.searchShapes=function(J){d.value=J;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(J){13==J.keyCode?(G(),mxEvent.consume(J)):27==J.keyCode&&b()}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==d.value?(g.setAttribute("src",Editor.magnifyImage),g.setAttribute("title",mxResources.get("search"))):(g.setAttribute("src",Editor.crossImage),g.setAttribute("title",mxResources.get("reset")));""==d.value?(w=!0,p.style.display="none"):d.value!=k?(p.style.display="none",w=!1):u||(p.style.display=w?"none":"")}),0)});mxEvent.addListener(d,"keyup",a);mxEvent.addListener(d,"paste",a);mxEvent.addListener(d,"cut",a);mxEvent.addListener(d,-"mousedown",function(K){K.stopPropagation&&K.stopPropagation();K.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(K){K.stopPropagation&&K.stopPropagation();K.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};+"mousedown",function(J){J.stopPropagation&&J.stopPropagation();J.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(J){J.stopPropagation&&J.stopPropagation();J.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};Sidebar.prototype.insertSearchHint=function(a,b,e,f,h,d,g,m){0==h.length&&1==f&&(e=document.createElement("div"),e.className="geTitle",e.style.cssText="background-color:transparent;border-color:transparent;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important;font-size:11px;font-weight:normal;",mxUtils.write(e,mxResources.get("noResultsFor",[b])),a.appendChild(e))};Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this.editorUi.editor.graph,e=this,f=parseInt(this.initialDefaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var h=b.appendFontSize("edgeLabel;resizable=0;html=1;",b.edgeFontSize),d=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;"+f);d.vertex=!0;b=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry(b.appendFontSize("text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",b.vertexFontSize),60,30,"Text","Text",null,null,"text textbox textarea label"),this.createVertexTemplateEntry("text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;",@@ -2454,18 +2454,18 @@ a.height))/100,this.graph.view.scaleAndTranslate(k,(b-a.width*k)/2/k-a.x,(e-a.hek.style.overflow=null!=w?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=h&&0!=g&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,h),f.appendChild(b));return a};Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};-Sidebar.prototype.createItem=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a");E.className="geItem";E.style.overflow="hidden";var D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";E.style.padding=this.thumbPadding+"px";mxEvent.addListener(E,"click",function(K){mxEvent.consume(K)});var G=new mxRectangle(0,0,h,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),+Sidebar.prototype.createItem=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a");E.className="geItem";E.style.overflow="hidden";var D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";E.style.padding=this.thumbPadding+"px";mxEvent.addListener(E,"click",function(J){mxEvent.consume(J)});var G=new mxRectangle(0,0,h,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),null!=w?(E.style.backgroundImage="url("+w+")",E.style.backgroundRepeat="no-repeat",E.style.backgroundPosition="center",E.style.backgroundSize="24px 24px"):this.createThumb(D,k,u,E,b,e,f,h,d),1<a.length||a[0].vertex?(f=this.createDragSource(E,this.createDropHandler(a,!0,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p,z),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):-null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(K){mxEvent.isMouseEvent(K)&&this.showTooltip(E,a,G.width,G.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};+null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(J){mxEvent.isMouseEvent(J)&&this.showTooltip(E,a,G.width,G.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};Sidebar.prototype.createDropHandler=function(a,b,e,f,h,d){e=null!=e?e:!0;return mxUtils.bind(this,function(g,m,p,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();w=null==p||mxEvent.isAltDown(m)?!1:g.isValidDropTarget(p,a,m);var z=null;null==p||w||(p=null);if(!g.isCellLocked(p||-g.getDefaultParent())){g.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&g.isSplitTarget(p,a,m)){var C=g.view.scale,E=g.view.translate,D=(k+E.x)*C,G=(u+E.y)*C,K=g.cloneCells(a);g.splitEdge(p,K,null,k-f.width/2,u-f.height/2,D,G);z=K}else if(0<a.length&&(z=g.importCells(a,k,u,p),g.model.isVertex(d)&&1==z.length&&g.model.isVertex(z[0]))){var L=g.insertEdge(g.model.getParent(d),null,"",d,z[0],g.createCurrentEdgeStyle());g.applyNewEdgeStyle(d,[L]);z.push(L);g.connectionHandler.insertBeforeSource&&+g.getDefaultParent())){g.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&g.isSplitTarget(p,a,m)){var C=g.view.scale,E=g.view.translate,D=(k+E.x)*C,G=(u+E.y)*C,J=g.cloneCells(a);g.splitEdge(p,J,null,k-f.width/2,u-f.height/2,D,G);z=J}else if(0<a.length&&(z=g.importCells(a,k,u,p),g.model.isVertex(d)&&1==z.length&&g.model.isVertex(z[0]))){var L=g.insertEdge(g.model.getParent(d),null,"",d,z[0],g.createCurrentEdgeStyle());g.applyNewEdgeStyle(d,[L]);z.push(L);g.connectionHandler.insertBeforeSource&&g.insertEdgeBeforeCell(L,d)}if(null!=g.layoutManager){var Q=g.layoutManager.getLayout(p);if(null!=Q){C=g.view.scale;E=g.view.translate;D=(k+E.x)*C;G=(u+E.y)*C;for(var N=0;N<z.length;N++)Q.moveCell(z[N],D,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||g.fireEvent(new mxEventObject("cellsInserted","cells",z));for(N=0;N<z.length;N++)g.model.isVertex(z[N])&&g.isAutoSizeCell(z[N])&&g.updateCellSize(z[N])}catch(U){this.editorUi.handleError(U)}finally{g.model.endUpdate()}null!=z&&0<z.length&&(g.scrollCellToVisible(z[0]),g.setSelectionCells(z));(h||g.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=z&&1==z.length)&&window.setTimeout(function(){g.startEditing(z[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};-Sidebar.prototype.dropAndConnect=function(a,b,e,f,h,d,g){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:g;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(C);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=D=0;if(null!=k){var K=k.origin;D=K.x;-G=K.y}var L=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),Q=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(J,V,Z){return!m.isContainer(J.cell)});if(null!=Q&&Q!=C)k=m.view.getState(Q),null!=k&&(K=k.origin,C=Q,L=!0,m.model.isEdge(a)||(p.x-=K.x-D,p.y-=K.y-G));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=G;D=z.x;G=z.y;m.model.isEdge(b[f])&&(G=D=0);k=b=m.importCells(b,p.x-(L?D:0),p.y-(L?+Sidebar.prototype.dropAndConnect=function(a,b,e,f,h,d,g){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:g;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(C);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=D=0;if(null!=k){var J=k.origin;D=J.x;+G=J.y}var L=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),Q=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(K,V,Z){return!m.isContainer(K.cell)});if(null!=Q&&Q!=C)k=m.view.getState(Q),null!=k&&(J=k.origin,C=Q,L=!0,m.model.isEdge(a)||(p.x-=J.x-D,p.y-=J.y-G));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=G;D=z.x;G=z.y;m.model.isEdge(b[f])&&(G=D=0);k=b=m.importCells(b,p.x-(L?D:0),p.y-(L?G:0),L?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=g&&null!=d&&(m.model.remove(b[g]),m.updateShapes(b[g],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var N=m.getCellGeometry(b[f]),U=null!=N?N.getTerminalPoint(!0):null;N.points=null;if(null!=U)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var Y=m.getCellGeometry(b[e]),P=null!=Y?Y.getTerminalPoint(!0):null;null!=P&&P.x==U.x&&P.y==U.y&&m.model.setTerminal(b[e],a,-!0)}if(null!=N.getTerminalPoint(!1))N.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(L&&m.model.isVertex(C)){var T=m.view.getState(C);K=T.cell!=m.view.currentRoot?T.origin:new mxPoint(0,0);m.cellsMoved(b,K.x,K.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),D=p.x-Math.round(z.x),G=p.y-Math.round(z.y),p.x=Math.round(z.x),p.y=Math.round(z.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=g?m.model.setTerminal(b[g],a,!0):b.push(m.insertEdge(null,-null,"",a,b[f],m.createCurrentEdgeStyle())));null!=h&&mxEvent.isShiftDown(h)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(J){this.editorUi.handleError(J)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=h&&mxEvent.isMouseEvent(h)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=g&&1<k.length&&k.splice(g,1);return k};+!0)}if(null!=N.getTerminalPoint(!1))N.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(L&&m.model.isVertex(C)){var T=m.view.getState(C);J=T.cell!=m.view.currentRoot?T.origin:new mxPoint(0,0);m.cellsMoved(b,J.x,J.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),D=p.x-Math.round(z.x),G=p.y-Math.round(z.y),p.x=Math.round(z.x),p.y=Math.round(z.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=g?m.model.setTerminal(b[g],a,!0):b.push(m.insertEdge(null,+null,"",a,b[f],m.createCurrentEdgeStyle())));null!=h&&mxEvent.isShiftDown(h)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(K){this.editorUi.handleError(K)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=h&&mxEvent.isMouseEvent(h)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=g&&1<k.length&&k.splice(g,1);return k};Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var h=this.editorUi.editor.graph,d=h.view,g=1<f.length,m=h.view.getState(a),p=h.getCellGeometry(a);f=h.getCellGeometry(b);null!=m&&null!=p&&null!=f&&(f=f.clone(),h.model.isEdge(a)?(p=m.absolutePoints,b=p[0],h=p[p.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=h.x/d.scale-d.translate.x-f.width/2,f.y=h.y/d.scale-d.translate.y-f.height/2)):(p.relative&&(p=p.clone(),p.x=(m.x-d.translate.x)/d.scale,p.y=(m.y-d.translate.y)/d.scale),d=h.defaultEdgeLength,h.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),h=f.getTerminalPoint(!1),d=h.x-b.x,b=h.y-b.y,d=Math.sqrt(d*d+b*b),f.x=p.getCenterX(),f.y=p.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=p.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=p.x+p.width,f.setTerminalPoint(new mxPoint(f.x+f.width,f.y),!1)):e==mxConstants.DIRECTION_SOUTH?(f.height=d,f.y=p.y+p.height,f.setTerminalPoint(new mxPoint(f.x,f.y+f.height),!1)):e==mxConstants.DIRECTION_WEST&&(f.width=d,f.x=p.x-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1))):(!g&&45<f.width&&45<f.height&&45<p.width&&45<p.height&&(f.width*=p.height/f.height,f.height=p.height),f.x=p.x+p.width/2-f.width/2,f.y=p.y+p.height/2-f.height/2,e==mxConstants.DIRECTION_NORTH?f.y=f.y-p.height/2-f.height/2-d:e==mxConstants.DIRECTION_EAST?f.x=f.x+p.width/2+@@ -2476,7 +2476,7 @@ Sidebar.prototype.createDragSource=function(a,b,e,f,h,d){function g(ma,Ba){var Cp.editor.graph,u=null,w=null,z=this;d=0;for(var C=this.livePreview,E=0;E<f.length&&C;E++)d+=k.model.getDescendants(f[E]).length,C=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==w&&k.model.isVertex(f[E])?w=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==w||null==u);E++);var D=this.isDropStyleEnabled(f,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(ma,Ba,Ca,Ja,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=N&&O==V){var Da=ma.isCellSelected(N.cell)?ma.getSelectionCells():[N.cell];ma.updateShapes(ma.model.isEdge(N.cell)?f[0]:f[w],Da,!0);ma.setSelectionCells(Da)}else null!=f&&null!=O&&null!=L&&O!=V?(Da=ma.model.isEdge(L.cell)||null==u?w:u,ma.setSelectionCells(this.dropAndConnect(L.cell,f,sa,Da,Ba,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(ma.view.getState(ma.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),G.createPreviewElement=mxUtils.bind(this,function(ma){var Ba=document.createElement("a");Ba.className="geItem";Ba.style.overflow="visible";ma=ma.view.scale;Ba.style.width=ma*Math.max(1,h.width)+"px";Ba.style.height=ma*Math.max(1,h.height)+"px";mxUtils.setOpacity(Ba,50);var Ca=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Ca),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(Ca,ma*Math.max(1,h.width),ma*Math.max(1,h.height),Ba,null,null,null,null,null,k.shapeBackgroundColor,-0,ma);return Ba}));var K=G.mouseDown;G.mouseDown=function(ma){mxEvent.isPopupTrigger(ma)||mxEvent.isMultiTouchEvent(ma)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),K.apply(this,arguments))};var L=null,Q=null,N=null,U=!1,Y=g(this.triangleUp,mxResources.get("connect")),P=g(this.triangleRight,mxResources.get("connect")),T=g(this.triangleDown,mxResources.get("connect")),J=g(this.triangleLeft,mxResources.get("connect")),V=g(this.refreshTarget,mxResources.get("replace")),Z=null,ia=g(this.roundDrop),+0,ma);return Ba}));var J=G.mouseDown;G.mouseDown=function(ma){mxEvent.isPopupTrigger(ma)||mxEvent.isMultiTouchEvent(ma)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),J.apply(this,arguments))};var L=null,Q=null,N=null,U=!1,Y=g(this.triangleUp,mxResources.get("connect")),P=g(this.triangleRight,mxResources.get("connect")),T=g(this.triangleDown,mxResources.get("connect")),K=g(this.triangleLeft,mxResources.get("connect")),V=g(this.refreshTarget,mxResources.get("replace")),Z=null,ia=g(this.roundDrop),oa=g(this.roundDrop),sa=mxConstants.DIRECTION_NORTH,O=null,X=G.createPreviewElement;G.createPreviewElement=function(ma){var Ba=X.apply(this,arguments);mxClient.IS_SVG&&(Ba.style.pointerEvents="none");this.previewElementWidth=Ba.style.width;this.previewElementHeight=Ba.style.height;return Ba};var ba=G.dragEnter;G.dragEnter=function(ma,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ba.apply(this,arguments)};var da=G.dragExit;G.dragExit=function(ma,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");da.apply(this,arguments)};G.dragOver=function(ma,Ba){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=O&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var Ca=ma.view;if(null!=N&&O==V)this.previewElement.style.display="none";else if(null!=L&&null!=O){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ja=ma.model.isEdge(L.cell)||null!=w?w:u,Ia=z.getDropAndConnectGeometry(L.cell,f[Ja],sa,f),Da=ma.model.isEdge(L.cell)?null:ma.getCellGeometry(L.cell),Ga=ma.getCellGeometry(f[Ja]),ta=ma.model.getParent(L.cell),La=Ca.translate.x*Ca.scale,Xa=Ca.translate.y*Ca.scale;null!=Da&&!Da.relative&&ma.model.isVertex(ta)&&ta!=Ca.currentRoot&&(Xa=Ca.getState(ta),La=Xa.x,Xa=Xa.y);Da=Ga.x;Ga=Ga.y;ma.model.isEdge(f[Ja])&&(Ga=Da=0);this.previewElement.style.left=(Ia.x-Da)*Ca.scale+La+"px";this.previewElement.style.top=(Ia.y-Ga)*Ca.scale+Xa+"px";1==f.length&&(this.previewElement.style.width=Ia.width*Ca.scale+"px",this.previewElement.style.height=@@ -2489,12 +2489,12 @@ mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==m2,this.refreshTarget.width,this.refreshTarget.height),m(Ba,Ca,ta,V));if(U&&null!=L&&!mxEvent.isAltDown(Ja)&&null==O){Da=mxRectangle.fromRectangle(L);if(ma.model.isEdge(L.cell)){var La=L.absolutePoints;null!=ia.parentNode&&(ta=La[0],Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.roundDrop.width/2,ta.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ia)));null!=oa.parentNode&&(La=La[La.length-1],Da.add(m(Ba,Ca,new mxRectangle(La.x-this.roundDrop.width/2,La.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),oa)))}else ta=mxRectangle.fromRectangle(L),null!=L.shape&&null!=L.shape.boundingBox&&(ta=mxRectangle.fromRectangle(L.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(L.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Da.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleUp.width/2,ta.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Y)),Da.add(m(Ba,Ca,new mxRectangle(ta.x+ta.width,L.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),P)),Da.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleDown.width/2,ta.y+ta.height,this.triangleDown.width,-this.triangleDown.height),T)),Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.triangleLeft.width,L.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),J));null!=Da&&Da.grow(10)}sa=mxConstants.DIRECTION_NORTH;O==P?sa=mxConstants.DIRECTION_EAST:O==T||O==oa?sa=mxConstants.DIRECTION_SOUTH:O==J&&(sa=mxConstants.DIRECTION_WEST);null!=N&&O==V&&(Ga=N);ta=(null==w||ma.isCellConnectable(f[w]))&&(ma.model.isEdge(Ia)&&null!=w||ma.model.isVertex(Ia)&&ma.isCellConnectable(Ia));if(null!=-L&&5E3<=H||L!=Ga&&(null==Da||!mxUtils.contains(Da,Ba,Ca)||500<H&&null==O&&ta))if(U=!1,L=5E3>H&&H>this.dropTargetDelay||ma.model.isEdge(Ia)?Ga:null,null!=L&&ta){Da=[ia,oa,Y,P,T,J];for(ta=0;ta<Da.length;ta++)null!=Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);ma.model.isEdge(Ia)?(La=Ga.absolutePoints,null!=La&&(ta=La[0],La=La[La.length-1],ia.style.left=Math.floor(ta.x-this.roundDrop.width/2)+"px",ia.style.top=Math.floor(ta.y-this.roundDrop.height/2)+"px",oa.style.left=Math.floor(La.x-this.roundDrop.width/+this.triangleDown.height),T)),Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.triangleLeft.width,L.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),K));null!=Da&&Da.grow(10)}sa=mxConstants.DIRECTION_NORTH;O==P?sa=mxConstants.DIRECTION_EAST:O==T||O==oa?sa=mxConstants.DIRECTION_SOUTH:O==K&&(sa=mxConstants.DIRECTION_WEST);null!=N&&O==V&&(Ga=N);ta=(null==w||ma.isCellConnectable(f[w]))&&(ma.model.isEdge(Ia)&&null!=w||ma.model.isVertex(Ia)&&ma.isCellConnectable(Ia));if(null!=+L&&5E3<=H||L!=Ga&&(null==Da||!mxUtils.contains(Da,Ba,Ca)||500<H&&null==O&&ta))if(U=!1,L=5E3>H&&H>this.dropTargetDelay||ma.model.isEdge(Ia)?Ga:null,null!=L&&ta){Da=[ia,oa,Y,P,T,K];for(ta=0;ta<Da.length;ta++)null!=Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);ma.model.isEdge(Ia)?(La=Ga.absolutePoints,null!=La&&(ta=La[0],La=La[La.length-1],ia.style.left=Math.floor(ta.x-this.roundDrop.width/2)+"px",ia.style.top=Math.floor(ta.y-this.roundDrop.height/2)+"px",oa.style.left=Math.floor(La.x-this.roundDrop.width/2)+"px",oa.style.top=Math.floor(La.y-this.roundDrop.height/2)+"px",null==ma.model.getTerminal(Ia,!0)&&ma.container.appendChild(ia),null==ma.model.getTerminal(Ia,!1)&&ma.container.appendChild(oa))):(ta=mxRectangle.fromRectangle(Ga),null!=Ga.shape&&null!=Ga.shape.boundingBox&&(ta=mxRectangle.fromRectangle(Ga.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(Ga.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Y.style.left=Math.floor(Ga.getCenterX()-this.triangleUp.width/2)+"px",Y.style.top=Math.floor(ta.y-this.triangleUp.height)+"px",P.style.left=Math.floor(ta.x+ta.width)+"px",P.style.top=Math.floor(Ga.getCenterY()--this.triangleRight.height/2)+"px",T.style.left=Y.style.left,T.style.top=Math.floor(ta.y+ta.height)+"px",J.style.left=Math.floor(ta.x-this.triangleLeft.width)+"px",J.style.top=P.style.top,"eastwest"!=Ga.style.portConstraint&&(ma.container.appendChild(Y),ma.container.appendChild(T)),ma.container.appendChild(P),ma.container.appendChild(J));null!=Ga&&(Q=ma.selectionCellsHandler.getHandler(Ga.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));U=!0}else for(Da=[ia,oa,Y,P,T,J],ta=0;ta<Da.length;ta++)null!=-Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);U||null==Q||Q.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=N&&O==V?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Ia||null==O&&ma.isSplitTarget(Ia,f,Ja)||(Ia=ma.getDropTarget(f,Ja,Ia,!0));return Ia});var qa=G.startDrag;G.startDrag=function(ma){z.activeDragSource=this;qa.apply(this,arguments)};var Pa=G.stopDrag;G.stopDrag=function(){Pa.apply(this,arguments);for(var ma=[ia,oa,V,Y,P,T,J],+this.triangleRight.height/2)+"px",T.style.left=Y.style.left,T.style.top=Math.floor(ta.y+ta.height)+"px",K.style.left=Math.floor(ta.x-this.triangleLeft.width)+"px",K.style.top=P.style.top,"eastwest"!=Ga.style.portConstraint&&(ma.container.appendChild(Y),ma.container.appendChild(T)),ma.container.appendChild(P),ma.container.appendChild(K));null!=Ga&&(Q=ma.selectionCellsHandler.getHandler(Ga.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));U=!0}else for(Da=[ia,oa,Y,P,T,K],ta=0;ta<Da.length;ta++)null!=+Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);U||null==Q||Q.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=N&&O==V?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Ia||null==O&&ma.isSplitTarget(Ia,f,Ja)||(Ia=ma.getDropTarget(f,Ja,Ia,!0));return Ia});var qa=G.startDrag;G.startDrag=function(ma){z.activeDragSource=this;qa.apply(this,arguments)};var Pa=G.stopDrag;G.stopDrag=function(){Pa.apply(this,arguments);for(var ma=[ia,oa,V,Y,P,T,K],Ba=0;Ba<ma.length;Ba++)null!=ma[Ba].parentNode&&ma[Ba].parentNode.removeChild(ma[Ba]);null!=L&&null!=Q&&Q.reset();O=Z=N=L=Q=z.activeDragSource=null};return G};Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()&&f.model.isVertex(f.getSelectionCell())){b=null;for(var h=0;h<a.length&&null==b;h++)f.model.isVertex(a[h])&&(b=h);null!=b&&(f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,b,e)),f.scrollCellToVisible(f.getSelectionCell()))}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};@@ -2515,7 +2515,7 @@ null)}),200)}),0)):(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),wiSidebar.prototype.addImagePalette=function(a,b,e,f,h,d,g){for(var m=[],p=0;p<h.length;p++)mxUtils.bind(this,function(k,u,w){if(null==w&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){w=k.lastIndexOf("/");var z=k.lastIndexOf(".");w=k.substring(0<=w?w+1:0,0<=z?z:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(w)))})(h[p],null!=d?d[p]:null,null!=g?g[h[p]]:null);this.addPaletteFunctions(a,b,!1,m)};Sidebar.prototype.getTagsForStencil=function(a,b,e){a=a.split(".");for(var f=1;f<a.length;f++)a[f]=a[f].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=e&&a.push(e);return a.slice(1,a.length)};Sidebar.prototype.addStencilPalette=function(a,b,e,f,h,d,g,m,p,k){g=null!=g?g:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,z,C,E,D){if(null==h||0>mxUtils.indexOf(h,z)){C=this.getTagsForStencil(w,z);var G=null!=m?m[z]:null;null!=G&&C.push(G);u.push(this.createVertexTemplateEntry("shape="+w+z.toLowerCase()+f,Math.round(E*g),Math.round(D*g),"",z.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),-!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var z=0;z<p.length;z++)p[z](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(C,E,D,G,K){(null==h||0>mxUtils.indexOf(h,E))&&w.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+f,Math.round(G*g),Math.round(K*g),"",E.replace(/_/g," "),!0))}),!0)}))};+!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var z=0;z<p.length;z++)p[z](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(C,E,D,G,J){(null==h||0>mxUtils.indexOf(h,E))&&w.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+f,Math.round(G*g),Math.round(J*g),"",E.replace(/_/g," "),!0))}),!0)}))};Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.escapeListener&&(this.editorUi.editor.graph.removeListener(this.escapeListener),this.escapeListener=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var h=0;h<a.length;h++)f=f.replace(new RegExp("&"+a[h][0]+";","g"),"&#"+a[h][1]+";");return b(f)};var e=mxUtils.getSizeForString;mxUtils.getSizeForString=function(f,h,d,g){return e(Graph.sanitizeHtml(f),h,d,g)}})();Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});@@ -2524,7 +2524,7 @@ arguments[2])}var m=Number(h.length);m=isNaN(m)?0:0!==m&&isFinite(m)?(0<m?1:-1)*mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();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="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,e){return null};-mxImageShape.prototype.getImageDataUri=function(){var a=String(this.image);if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a,!0),this.clippedImage=a;a=this.clippedSvg}return a};+mxImageShape.prototype.getImageDataUri=function(){var a=String(this.image);if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a),this.clippedImage=a;a=this.clippedSvg}return a};(function(){var a=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(b,e,f,h,d){return"default"==h&&null!=d?"fillcolor"==f.nodeName?d.shapeBackgroundColor:d.shapeForegroundColor:a.apply(this,arguments)}})();(function(){var a=mxResources.get;mxResources.get=function(b,e,f){null==f&&(f=b);return a.apply(this,[b,e,f])}})();(function(){var a=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,e,f,h,d,g,m,p){var k=a.apply(this,arguments);if(null!=e){var u=k.getElementsByTagName("img");0<u.length&&(u[0].className="geToolbarButton geAdaptiveAsset",u[0].style.margin="4px",u[0].style.width="18px")}return k}})();Graph=function(a,b,e,f,h,d){mxGraph.call(this,a,b,e,f);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(O){O=this.getCurrentCellStyle(O);@@ -2548,11 +2548,11 @@ X&&(O.lastLabelValue=X,O.lastSanitizedLabelValue=Graph.sanitizeHtml(X),z.innerHTda;da=this.graph.view.translate;for(var H=this.graph.view.scale,ea=this.graph.getPageLayout(),ra=0;ra<ea.width;ra++)X.push(new mxRectangle(((ea.x+ra)*ca+da.x)*H,(ea.y*ba+da.y)*H,ca*H,ba*H));for(ra=1;ra<ea.height;ra++)X.push(new mxRectangle((ea.x*ca+da.x)*H,((ea.y+ra)*ba+da.y)*H,ca*H,ba*H));O=X.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,X){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(O){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var X=E.apply(this,arguments),ba=new mxDictionary,da=[],ca=0;ca<X.length;ca++){var H=this.graph.isTableCell(O)&&this.graph.isTableCell(X[ca])&&this.graph.isCellSelected(X[ca])?this.graph.model.getParent(X[ca]):this.graph.isTableRow(O)&&this.graph.isTableRow(X[ca])&&this.graph.isCellSelected(X[ca])?X[ca]:this.graph.getCompositeParent(X[ca]);null==H||ba.get(H)||(ba.put(H,!0),da.push(H))}return da};var D=this.graphHandler.start;this.graphHandler.start=function(O,X,ba,da){var ca=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?ca=!0:O=this.graph.model.getParent(O));ca||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,X){X=this.graph.getCompositeParent(X);-return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(O,X,ba,da,ca,H){var ea=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=da&&this.graph.applyNewEdgeStyle(da,[ea]);return ea};var G=new mxRubberband(this);this.getRubberband=function(){return G};var K=(new Date).getTime(),L=0,Q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;Q.apply(this,arguments);O!=this.currentState?-(K=(new Date).getTime(),L=0):L=(new Date).getTime()-K};var N=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=this.currentState&&O.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&N.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(O){return U.apply(this,+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(O,X,ba,da,ca,H){var ea=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=da&&this.graph.applyNewEdgeStyle(da,[ea]);return ea};var G=new mxRubberband(this);this.getRubberband=function(){return G};var J=(new Date).getTime(),L=0,Q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;Q.apply(this,arguments);O!=this.currentState?+(J=(new Date).getTime(),L=0):L=(new Date).getTime()-J};var N=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=this.currentState&&O.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&N.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(O){return U.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var Y=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(O){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==O.getState()&&mxEvent.isTouchEvent(O.getEvent())};var P=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(P=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=P)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(O){return mxEvent.isMouseEvent(O.getEvent())};var T=this.click;this.click=function(O){var X=null==O.state&&null!=O.sourceState&&this.isCellLocked(this.getLayerForCell(O.sourceState.cell));if(this.isEnabled()&&!X||O.isConsumed())return T.apply(this,arguments);var ba=X?O.sourceState.cell:-O.getCell();if(null!=ba){var da=this.getClickableLinkForCell(ba);null!=da?this.isCustomLink(da)?this.customLinkClicked(da,ba):this.openLink(da):X&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var J=this.tooltipHandler.show;this.tooltipHandler.show=function(){J.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),X=0;X<O.length;X++)null!=O[X].getAttribute("href")&&null==O[X].getAttribute("target")&&O[X].setAttribute("target",+O.getCell();if(null!=ba){var da=this.getClickableLinkForCell(ba);null!=da?this.isCustomLink(da)?this.customLinkClicked(da,ba):this.openLink(da):X&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),X=0;X<O.length;X++)null!=O[X].getAttribute("href")&&null==O[X].getAttribute("target")&&O[X].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var X=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(X?O.sourceState.cell:O.getCell())};var V=this.getCursorForCell;this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return V.apply(this,arguments)};this.selectRegion=function(O,X){var ba=mxEvent.isAltDown(X)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,ba,null,!0);if(this.isToggleEvent(X))for(ba=0;ba<O.length;ba++)this.selectCellForEvent(O[ba],X);else this.selectCellsForEvent(O,X);return O};var Z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,X,ba){return this.graph.isCellSelected(O)?!1:Z.apply(this,arguments)};var ia=this.updateMouseEvent;this.updateMouseEvent=function(O){O=ia.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),O.getGraphY(),null,null,null,mxUtils.bind(this,function(X,ba,da){return O.state==X||this.isCellLocked(this.getLayerForCell(X.cell))&&null==this.getLinkForCell(X.cell)}))):O.state=null);return O};var oa=this.isCellSelectable;this.isCellSelectable=function(O){return oa.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};@@ -2584,24 +2584,24 @@ Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var e=a.bGraph.arrayBufferIndexOfString=function(a,b,e){var f=b.charCodeAt(0),h=1,d=-1;for(e=e||0;e<a.byteLength;e++)if(a[e]==f){d=e;break}for(e=d+1;-1<d&&e<a.byteLength&&e<d+b.length-1;e++){if(a[e]!=b.charCodeAt(h))return Graph.arrayBufferIndexOfString(a,b,d+1);h++}return h==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};Graph.fadeNodes=function(a,b,e,f,h){h=null!=h?h:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+h+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},h)},0)};-Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,h){function d(u,w){if(u.getModel().isVertex(w)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=w.referenceCell||w;u.getModel().beginUpdate();try{for(var E=w.referenceCell||w,D=f.model.getCell(E.sourceCellId),G=f.getEdges(D,null,!0,!0,!1,!0),K=[],L=0;L<G.length;L++)null!=G[L].getTerminal(!0)&&null!=G[L].getTerminal(!1)&&f.isCellVisible(G[L])&&-!f.isEdgeIgnored(G[L])&&f.isCellVisible(G[L].getTerminal(!0))&&f.isCellVisible(G[L].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[L]))&&K.push(G[L]);K=G=K;if(null!=w.startIndex||0<pageSize&&G.length>pageSize){var Q=w.startIndex||0;K=G.slice(Math.max(0,Q),Math.min(G.length,Q+pageSize))}K=f.getOpposites(K,D).concat(K);var N=u.cloneCells(K);for(L=0;L<K.length;L++)if(N[L].sourceCellId=K[L].id,u.model.isEdge(N[L]))for(N[L].geometry.x=0,N[L].geometry.y=0,N[L].geometry.points=null,N[L].setStyle(N[L].getStyle()++Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,h){function d(u,w){if(u.getModel().isVertex(w)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=w.referenceCell||w;u.getModel().beginUpdate();try{for(var E=w.referenceCell||w,D=f.model.getCell(E.sourceCellId),G=f.getEdges(D,null,!0,!0,!1,!0),J=[],L=0;L<G.length;L++)null!=G[L].getTerminal(!0)&&null!=G[L].getTerminal(!1)&&f.isCellVisible(G[L])&&+!f.isEdgeIgnored(G[L])&&f.isCellVisible(G[L].getTerminal(!0))&&f.isCellVisible(G[L].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[L]))&&J.push(G[L]);J=G=J;if(null!=w.startIndex||0<pageSize&&G.length>pageSize){var Q=w.startIndex||0;J=G.slice(Math.max(0,Q),Math.min(G.length,Q+pageSize))}J=f.getOpposites(J,D).concat(J);var N=u.cloneCells(J);for(L=0;L<J.length;L++)if(N[L].sourceCellId=J[L].id,u.model.isEdge(N[L]))for(N[L].geometry.x=0,N[L].geometry.y=0,N[L].geometry.points=null,N[L].setStyle(N[L].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),N[L].setTerminal(E,null==N[L].getTerminal(!0)),D=0;D<N[L].getChildCount();D++){var U=N[L].getChildAt(D);null!=U.geometry&&U.geometry.relative&&(U.setStyle(U.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),U.geometry.offset=new mxPoint(0,0),U.geometry.y=0,U.geometry.x=.5>U.geometry.x?-.8:.5<U.geometry.x?.8:0)}if(0<w.startIndex){var Y=u.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((w.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Y.referenceCell=E;Y.startIndex=Math.max(0,(w.startIndex||0)-pageSize);N.splice(0,0,Y)}if(G.length>(w.startIndex||0)+pageSize){var P=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((w.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");P.referenceCell=-E;P.startIndex=(w.startIndex||0)+pageSize;N.splice(0,0,P)}for(var T in u.getModel().cells){var J=u.getModel().getCell(T);J!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,J)&&u.getModel().isVertex(J)&&u.removeCells([J])}u.addCells(N);var V=u.getModel().getGeometry(u.rootCell);null!=V&&(V=V.clone(),V.x=z-V.width/2,V.y=C-V.height/3,u.getModel().setGeometry(u.rootCell,V));w=[];for(T in u.getModel().cells)J=u.getModel().getCell(T),J!=u.rootCell&&u.getModel().isVertex(J)&&u.getModel().getParent(J)==u.getDefaultParent()&&-(w.push(J),V=u.getModel().getGeometry(J),null!=V&&(V.x=z-V.width/2,V.y=C-V.height/2));var Z=w.length,ia=2*Math.PI/Z,oa=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<Z;z++)V=u.getModel().getGeometry(w[z]),null!=V&&(V=V.clone(),V.x+=oa*Math.sin(z*ia),V.y+=oa*Math.cos(z*ia),u.getModel().setGeometry(w[z],V))}finally{u.getModel().endUpdate()}}}var g=document.createElement("div");g.style.position="absolute";g.style.display="block";g.style.background=+E;P.startIndex=(w.startIndex||0)+pageSize;N.splice(0,0,P)}for(var T in u.getModel().cells){var K=u.getModel().getCell(T);K!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,K)&&u.getModel().isVertex(K)&&u.removeCells([K])}u.addCells(N);var V=u.getModel().getGeometry(u.rootCell);null!=V&&(V=V.clone(),V.x=z-V.width/2,V.y=C-V.height/3,u.getModel().setGeometry(u.rootCell,V));w=[];for(T in u.getModel().cells)K=u.getModel().getCell(T),K!=u.rootCell&&u.getModel().isVertex(K)&&u.getModel().getParent(K)==u.getDefaultParent()&&+(w.push(K),V=u.getModel().getGeometry(K),null!=V&&(V.x=z-V.width/2,V.y=C-V.height/2));var Z=w.length,ia=2*Math.PI/Z,oa=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<Z;z++)V=u.getModel().getGeometry(w[z]),null!=V&&(V=V.clone(),V.x+=oa*Math.sin(z*ia),V.y+=oa*Math.cos(z*ia),u.getModel().setGeometry(w[z],V))}finally{u.getModel().endUpdate()}}}var g=document.createElement("div");g.style.position="absolute";g.style.display="block";g.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.style.width="100%";g.style.height="100%";g.style.left="0px";g.style.top="0px";g.style.zIndex=2;var m=document.createElement("img");m.setAttribute("src",Editor.closeBlackImage);m.style.position="absolute";m.style.cursor="pointer";m.style.right="10px";m.style.top="10px";g.appendChild(m);var p=document.createElement("div");p.style.position="absolute";p.style.cursor="pointer";p.style.right="38px";p.style.top="14px";p.style.textAlign="right";p.style.verticalAlign=-"top";mxUtils.write(p,mxResources.get("close"));g.appendChild(p);document.body.appendChild(g);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var w=new Graph(u);w.keepEdgesInBackground=!0;w.isCellResizable=function(){return!1};w.isCellRotatable=function(){return!1};w.getCursorForCell=function(K){return this.model.isVertex(K)?"pointer":null};w.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,-"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(h)};mxEvent.addListener(m,"click",z);mxEvent.addListener(p,"click",z);w.setEnabled(!1);var C=w.click;w.click=function(K){var L=K.getCell(),Q=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&w.rootCell!=L&&0<w.getEdges(Q).length?d(w,L):C.apply(this,arguments)};z=w.container.scrollWidth/2;var E=w.container.scrollHeight/3;w.model.beginUpdate();var D=w.importCells([h])[0];D.sourceCellId=h.id;D.geometry.x=z-D.geometry.width/2;-D.geometry.y=E-D.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(K,L){G||(K=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,K,function(){var Q=new mxParallelEdgeLayout(w);Q.spacing=60;var N=Q.layout;Q.layout=function(U){Q.spacing=Math.min(60,Math.max(30,60-5*U.length));N.apply(this,arguments)};Q.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;+"top";mxUtils.write(p,mxResources.get("close"));g.appendChild(p);document.body.appendChild(g);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var w=new Graph(u);w.keepEdgesInBackground=!0;w.isCellResizable=function(){return!1};w.isCellRotatable=function(){return!1};w.getCursorForCell=function(J){return this.model.isVertex(J)?"pointer":null};w.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,+"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(h)};mxEvent.addListener(m,"click",z);mxEvent.addListener(p,"click",z);w.setEnabled(!1);var C=w.click;w.click=function(J){var L=J.getCell(),Q=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&w.rootCell!=L&&0<w.getEdges(Q).length?d(w,L):C.apply(this,arguments)};z=w.container.scrollWidth/2;var E=w.container.scrollHeight/3;w.model.beginUpdate();var D=w.importCells([h])[0];D.sourceCellId=h.id;D.geometry.x=z-D.geometry.width/2;+D.geometry.y=E-D.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(J,L){G||(J=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,J,function(){var Q=new mxParallelEdgeLayout(w);Q.spacing=60;var N=Q.layout;Q.layout=function(U){Q.spacing=Math.min(60,Math.max(30,60-5*U.length));N.apply(this,arguments)};Q.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;w.tooltipHandler.hide();w.refresh();G=!1}))});d(w,D)}else mxUtils.error("Browser is not supported!",200,!1)})(g)})(a,b)};Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==e.className&&a.parentNode.insertBefore(a.ownerDocument.createElement("br"),a);a.parentNode.removeChild(a)}!b&&null!=a.innerHTML&&0<=a.innerHTML.indexOf("\t")&&(f=Graph.createTabNode(4),a.innerHTML=a.innerHTML.replace(/\t/g,f.outerHTML))}a=e}};Graph.createTabNode=function(a){var b="\t";if(null!=a)for(b="";0<a;)b+=" ",a--;a=document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(b));return a};Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){if(null==a)return null;var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};-Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var f=decodeURIComponent(escape(atob(a.substring(26)))),h=f.indexOf("<svg");if(0<=h){e.innerHTML=Graph.sanitizeHtml(f.substring(h));var d=e.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(e);try{f=b=-1;var g=d[0].getAttribute("width"),m=d[0].getAttribute("height");g=null!=g&&"%"!=g.charAt(g.length-1)?parseFloat(g):NaN;m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN;var p=d[0].getAttribute("viewBox");h=null;if(null!=p&&!isNaN(g)&&!isNaN(m)){var k=p.split(" ");4<=p.length&&(b=parseFloat(k[2])/g,f=parseFloat(k[3])/m,h=new mxRectangle(parseFloat(k[0]),parseFloat(k[1]),parseFloat(k[2]),parseFloat(k[3])))}var u=d[0].getBBox();0<u.width&&0<u.height&&(null==h||u.width*u.height<h.width*h.height*-.7)&&(e.getElementsByTagName("svg")[0].setAttribute("viewBox",u.x+" "+u.y+" "+u.width+" "+u.height),e.getElementsByTagName("svg")[0].setAttribute("width",u.width/b),e.getElementsByTagName("svg")[0].setAttribute("height",u.height/f))}catch(w){}finally{document.body.removeChild(e)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(w){}return a};+Graph.clipSvgDataUri=function(a){if(null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var b=document.createElement("div");b.style.position="absolute";b.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),f=e.indexOf("<svg");if(0<=f){b.innerHTML=Graph.sanitizeHtml(e.substring(f));var h=b.getElementsByTagName("svg");if(0<h.length){document.body.appendChild(b);try{f=e=1;var d=h[0].getAttribute("width"),g=h[0].getAttribute("height");d=null!=d&&"%"!=d.charAt(d.length-+1)?parseFloat(d):NaN;g=null!=g&&"%"!=g.charAt(g.length-1)?parseFloat(g):NaN;var m=h[0].getAttribute("viewBox");if(null!=m&&!isNaN(d)&&!isNaN(g)){var p=m.split(" ");4<=m.length&&(e=parseFloat(p[2])/d,f=parseFloat(p[3])/g,new mxRectangle(parseFloat(p[0]),parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])))}var k=h[0].getBBox();if(0<k.width&&0<k.height){d=0;var u=h[0].querySelectorAll("[stroke-width]");for(g=0;g<u.length;g++)d=Math.max(d,parseFloat(u[g].getAttribute("stroke-width")));k=new mxRectangle(k.x,+k.y,k.width,k.height);k.grow(d/2);b.getElementsByTagName("svg")[0].setAttribute("viewBox",k.x+" "+k.y+" "+k.width+" "+k.height);b.getElementsByTagName("svg")[0].setAttribute("width",k.width/e);b.getElementsByTagName("svg")[0].setAttribute("height",k.height/f)}}catch(w){}finally{document.body.removeChild(b)}a=Editor.createSvgDataUri(mxUtils.getXml(h[0]))}}}catch(w){}return a};Graph.createRemoveIcon=function(a,b){var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",a);e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";mxEvent.addListener(e,"click",b);return e};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.rewritePageLinks=function(a,b){function e(h,d){var g=h.getAttribute(d);if(null!=g){Graph.isPageLink(g)&&(g="#"+g.substring(g.indexOf(":")+1));var m=d;b&&"xlink:href"==d&&(h.removeAttribute(d),m="href");h.setAttribute(m,g)}}a=a.getElementsByTagName("a");if(null!=a)for(var f=0;f<a.length;f++)e(a[f],"href"),e(a[f],"xlink:href")};Graph.isLink=function(a){return null!=a&&a.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;@@ -2622,8 +2622,8 @@ Graph.prototype.mergeStyle=function(g,m,p){if(null!=g){var k={},u;for(u in g){va0)));if(this.isTableRow(g)&&(!this.isSwimlane(g)||0==m)&&""==this.getLabel(g)&&0<this.model.getChildCount(g))for(m=0;m<this.model.getChildCount(g);m++){var p=this.model.getChildAt(g,m);if(this.isCellEditable(p)){g=p;break}}return g};Graph.prototype.copyStyle=function(g){return this.getCellStyle(g,!1)};Graph.prototype.pasteStyle=function(g,m,p,k){null!=g&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(g,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(g,m))};Graph.prototype.copyCellStyles=function(g,m,p,k,u,w,z){var C=!1,E=!1;if(0<g.length)for(var D=0;D<g.length&&(C=this.getModel().isVertex(g[D])||C,!(E=this.getModel().isEdge(g[D])||E)||!C);D++);else E=C=!0;C=C&&!w;E=E&&!z;for(D=0;D<m.length;D++)if(g=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(C||g)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||g)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=function(g){for(var m=[],p=0;p<g.length;p++)m=m.concat(this.model.getDescendants(g[p]));return m};Graph.prototype.pasteCellStyles=function(g,m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<g.length;w++){var z=g[w],C=this.model.getStyle(z),E=!1;null!=z.style&&(pairs=z.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var G=-null!=C?C.split(";"):[],K=0;K<G.length;K++){var L=G[K],Q=L.indexOf("=");if(0<=Q){var N=L.substring(0,Q),U=mxUtils.indexOf(D,N);0<=U&&D.splice(U,1);for(E=0;E<Graph.cellStyleGroups.length;E++){var Y=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(Y,N))for(var P=0;P<Y.length;P++){var T=mxUtils.indexOf(D,Y[P]);0<=T&&D.splice(T,1)}}}}var J=this.model.isEdge(z);E=J?p:m;for(K=0;K<D.length;K++){N=D[K];var V=E[N];null!=V&&("edgeStyle"!=N||u)&&(J||!J&&0>mxUtils.indexOf(Graph.edgeStyles,N))&&(C=mxUtils.setStyle(C,-N,V),"fontFamily"==N&&null==E.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),J&&"rounded"==N&&"1"==V&&null==E.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return g};Graph.prototype.updateCellStyles=function(g,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],+null!=C?C.split(";"):[],J=0;J<G.length;J++){var L=G[J],Q=L.indexOf("=");if(0<=Q){var N=L.substring(0,Q),U=mxUtils.indexOf(D,N);0<=U&&D.splice(U,1);for(E=0;E<Graph.cellStyleGroups.length;E++){var Y=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(Y,N))for(var P=0;P<Y.length;P++){var T=mxUtils.indexOf(D,Y[P]);0<=T&&D.splice(T,1)}}}}var K=this.model.isEdge(z);E=K?p:m;for(J=0;J<D.length;J++){N=D[J];var V=E[N];null!=V&&("edgeStyle"!=N||u)&&(K||!K&&0>mxUtils.indexOf(Graph.edgeStyles,N))&&(C=mxUtils.setStyle(C,+N,V),"fontFamily"==N&&null==E.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),K&&"rounded"==N&&"1"==V&&null==E.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return g};Graph.prototype.updateCellStyles=function(g,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],!1),u=k[mxConstants.STYLE_PERIMETER],w=!1;for(C in g){var z=g[C];if(k[C]!=z){if(C==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[C]&&"umlLifeline"!=z){w=!0;var C="participant"}this.setCellStyles(C,z,[m[p]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}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(g,m,p,k,u,w){this.useCssTransforms&&(g=g/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(g,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var z=this.model.getChildCount(p)-1;0<=z;z--){var C=this.model.getChildAt(p,z),E=this.getScaledCellAt(g,m,C,k,u,w);if(null!=E)return E;if(this.isCellVisible(C)&&(u&&this.model.isEdge(C)||k&&this.model.isVertex(C))&&(E=this.view.getState(C),null!=E&&(null==w||!w(E,g,m))&&this.intersects(E,g,m)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(g){return!this.isSwimlane(g.cell)&&0<this.model.getChildCount(g.cell)&&!this.isCellCollapsed(g.cell)&&"1"==mxUtils.getValue(g.style,"recursiveResize",@@ -2664,10 +2664,10 @@ Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mGraph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};Graph.prototype.formatDate=function(a,b,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 f=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,g=function(K,L){K=String(K);for(L=L||2;K.length<L;)K="0"+K;return K};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||+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 f=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,g=function(J,L){J=String(J);for(L=L||2;J.length<L;)J="0"+J;return J};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),z=a[m+"Hours"](),C=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),G={d:p,dd:g(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:g(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+-12],yy:String(w).slice(2),yyyy:w,h:z%12||12,hh:g(z%12||12),H:z,HH:g(z),M:C,MM:g(C),s:E,ss:g(E),l:g(m,3),L:g(99<m?Math.round(m/10):m),t:12>z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+g(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(K){return K in G?G[K]:K.slice(1,-K.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};+12],yy:String(w).slice(2),yyyy:w,h:z%12||12,hh:g(z%12||12),H:z,HH:g(z),M:C,MM:g(C),s:E,ss:g(E),l:g(m,3),L:g(99<m?Math.round(m/10):m),t:12>z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+g(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(J){return J in G?G[J]:J.slice(1,+J.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};Graph.prototype.createLayersDialog=function(a,b){var e=document.createElement("div");e.style.position="absolute";for(var f=this.getModel(),h=f.getChildCount(f.root),d=0;d<h;d++)mxUtils.bind(this,function(g){function m(){f.isVisible(g)?(u.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(u.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var p=this.convertValueToString(g)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(f.isVisible(g)?"hideIt":"show",[p]));var u=document.createElement("img");u.setAttribute("draggable","false");u.setAttribute("align","absmiddle");u.setAttribute("border","0");u.style.position="relative";u.style.width="16px";u.style.padding="0px 6px 0 4px";b&&(u.style.filter="invert(100%)",u.style.top="-2px");k.appendChild(u);mxUtils.write(k,p);e.appendChild(k);mxEvent.addListener(k,"click",function(){f.setVisible(g,!f.isVisible(g));m();null!=a&&a(g)});m()})(f.getChildAt(f.root,d));return e};@@ -2685,11 +2685,11 @@ Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.moGraph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=a.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==a.parent&&(b=e.parent.getIndex(e),this.model.add(e.parent,a,b))};Graph.prototype.connectVertex=function(a,b,e,f,h,d,g,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var p=this.isCloneConnectSource(a),k=p?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var z=this.view.translate;k=z.x*e;z=z.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,z=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,z+u.y*e)).grow(40*e);d=null!=d?-this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var C=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==C||d[D]==this.model.getParent(a)))C=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var G=this.view.getState(d[D]);null==w||null==G||mxUtils.intersects(w,G)||(E=d[D])}}var K=-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||h;K&&("1"!=urlParams.sketch||h)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var L=[],Q=E;E=C;h=mxUtils.bind(this,function(N){if(null==g||null!=N||null==E&&p){this.model.beginUpdate();try{if(null==Q&&K){var U=this.getAbsoluteParent(null!=N?N:a);U=p?a:this.getCompositeParent(U);Q=null!=N?N:this.duplicateCells([U],-!1)[0];null!=N&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var Y=this.getCellGeometry(Q);null!=Y&&(null!=N&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=Y.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=Y.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-Y.width/2:u.x+Y.width/2),Y.x=u.x-Y.width/2,Y.y=u.y-Y.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),E=null):K&&!p&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(f)&&-mxEvent.isShiftDown(f)&&K||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());null!=P&&(L.push(P),this.applyNewEdgeStyle(a,[P],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(P,a));if(null==E&&null!=Q&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var T=a.parent.getIndex(a);this.model.add(a.parent,Q,T)}null==E&&null!=Q&&L.push(Q);null==Q&&null!=P&&P.geometry.setTerminalPoint(u,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[P]))}finally{this.model.endUpdate()}}if(null!=m)m(L);else return L});if(null==g||null!=Q||!K||null==E&&p)return h(Q);g(k+u.x*e,z+u.y*e,h)};+this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var C=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==C||d[D]==this.model.getParent(a)))C=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var G=this.view.getState(d[D]);null==w||null==G||mxUtils.intersects(w,G)||(E=d[D])}}var J=+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||h;J&&("1"!=urlParams.sketch||h)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var L=[],Q=E;E=C;h=mxUtils.bind(this,function(N){if(null==g||null!=N||null==E&&p){this.model.beginUpdate();try{if(null==Q&&J){var U=this.getAbsoluteParent(null!=N?N:a);U=p?a:this.getCompositeParent(U);Q=null!=N?N:this.duplicateCells([U],+!1)[0];null!=N&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var Y=this.getCellGeometry(Q);null!=Y&&(null!=N&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=Y.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=Y.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-Y.width/2:u.x+Y.width/2),Y.x=u.x-Y.width/2,Y.y=u.y-Y.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),E=null):J&&!p&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(f)&&+mxEvent.isShiftDown(f)&&J||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());null!=P&&(L.push(P),this.applyNewEdgeStyle(a,[P],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(P,a));if(null==E&&null!=Q&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var T=a.parent.getIndex(a);this.model.add(a.parent,Q,T)}null==E&&null!=Q&&L.push(Q);null==Q&&null!=P&&P.geometry.setTerminalPoint(u,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[P]))}finally{this.model.endUpdate()}}if(null!=m)m(L);else return L});if(null==g||null!=Q||!J||null==E&&p)return h(Q);g(k+u.x*e,z+u.y*e,h)};Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,h=0;h<a.length;h++)if(f=a[h],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};@@ -2776,22 +2776,22 @@ TableLayout.prototype.layoutRow=function(a,b,e,f){var h=this.graph.getModel(),d=0,k.width,k.height),h.setGeometry(d[p],k))}return m};TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),h="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var g=this.graph.getModel(),m=0;g.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=g.getChildCells(a,!0),w=0;w<u.length;w++)g.setVisible(u[w],!0);var z=this.getSize(u,!1);if(0<p&&0<k&&0<u.length&&0<z){if(h){var C=this.graph.getCellGeometry(u[u.length-1]);null!=C&&(C=C.clone(),C.height=p-z+C.height,g.setGeometry(u[u.length-1],C))}var E=d?null:this.getRowLayout(u[0],k),D=[],G=b.y;for(w=0;w<u.length;w++)C=this.graph.getCellGeometry(u[w]),null!=C&&(C=C.clone(),C.x=b.x,C.width=k,C.y=Math.round(G),G=h||f?G+C.height:G+C.height/z*p,C.height=Math.round(G)-C.y,g.setGeometry(u[w],C)),m=Math.max(m,this.layoutRow(u[w],E,C.height,k,D));f&&p<z&&(e=e.clone(),e.height=G+b.height,g.setGeometry(a,-e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,g.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(K){g.setVisible(K.cell,K.actual.cell==K.cell);if(K.actual.cell!=K.cell){if(K.actual.row==K.row){var L=null!=K.geo.alternateBounds?K.geo.alternateBounds:K.geo;K.actual.geo.width+=L.width}K.actual.col==K.col&&(L=null!=K.geo.alternateBounds?K.geo.alternateBounds:K.geo,K.actual.geo.height+=L.height)}}))}else for(w=0;w<u.length;w++)g.setVisible(u[w],+e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,g.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(J){g.setVisible(J.cell,J.actual.cell==J.cell);if(J.actual.cell!=J.cell){if(J.actual.row==J.row){var L=null!=J.geo.alternateBounds?J.geo.alternateBounds:J.geo;J.actual.geo.width+=L.width}J.actual.col==J.col&&(L=null!=J.geo.alternateBounds?J.geo.alternateBounds:J.geo,J.actual.geo.height+=L.height)}}))}else for(w=0;w<u.length;w++)g.setVisible(u[w],!1)}finally{g.endUpdate()}}};(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(w,z){z=null!=z?z:!0;var C=this.getState(w);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&!C.invalid&&this.updateLineJumps(C)&&this.graph.cellRenderer.redraw(C,!1,this.isRendering());C=b.apply(this,arguments);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(C);return C};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var w=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=w)for(var z=0;z<w.length;z++)if("hidden"!=w[z].getAttribute("visibility"))return w[z];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var h=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,z){return h.apply(this,arguments)||null!=w.routedPoints&&null!=z.routedPoints&&!mxUtils.equalPoints(z.routedPoints,w.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var z=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,E=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var D=function(oa,sa,O){var X=new mxPoint(sa,O);X.type=oa;E.push(X);X=null!=w.routedPoints?w.routedPoints[E.length-1]:null;return null==X||X.type!=oa||X.x!=sa||X.y!=O},G=.5*this.scale;-C=!1;E=[];for(var K=0;K<z.length-1;K++){for(var L=z[K+1],Q=z[K],N=[],U=z[K+2];K<z.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,U.x,U.y,L.x,L.y)<1*this.scale*this.scale;)L=U,K++,U=z[K+2];C=D(0,Q.x,Q.y)||C;for(var Y=0;Y<this.validEdges.length;Y++){var P=this.validEdges[Y],T=P.absolutePoints;if(null!=T&&mxUtils.intersects(w,P)&&"1"!=P.style.noJump){var J=null;for(P=0;P<T.length-1;P++){var V=T[P+1],Z=T[P];for(U=T[P+2];P<T.length-2&&mxUtils.ptSegDistSq(Z.x,Z.y,U.x,U.y,V.x,V.y)<1*this.scale*this.scale;)V=U,P++,-U=T[P+2];var ia=mxUtils.intersection(Q.x,Q.y,L.x,L.y,Z.x,Z.y,V.x,V.y);if(null!=ia&&(Math.abs(ia.x-Q.x)>G||Math.abs(ia.y-Q.y)>G)&&(Math.abs(ia.x-L.x)>G||Math.abs(ia.y-L.y)>G)&&(null==J||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,J.x,J.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,Z.x,Z.y)>G)&&(null==U||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,U.x,U.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,V.x,V.y)>G)){U=ia.x-Q.x;J=ia.y-Q.y;ia={distSq:U*U+J*J,x:ia.x,y:ia.y};for(U=0;U<N.length;U++)if(N[U].distSq>ia.distSq){N.splice(U,-0,ia);ia=null;break}null==ia||0!=N.length&&N[N.length-1].x===ia.x&&N[N.length-1].y===ia.y||N.push(ia)}J=Z}}}for(P=0;P<N.length;P++)C=D(1,N[P].x,N[P].y)||C}ia=z[z.length-1];C=D(0,ia.x,ia.y)||C}w.routedPoints=E;return C}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){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)g.apply(this,-arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),K=!0,L=null,Q=null,N=[],U=null;w.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var P=this.state.routedPoints[Y],T=new mxPoint(P.x/this.scale,P.y/this.scale);0==Y?T=z[0]:Y==this.state.routedPoints.length-1&&(T=z[z.length-1]);var J=!1;if(null!=-L&&1==P.type){var V=this.state.routedPoints[Y+1];P=V.x/this.scale-T.x;V=V.y/this.scale-T.y;P=P*P+V*V;null==U&&(U=new mxPoint(T.x-L.x,T.y-L.y),Q=Math.sqrt(U.x*U.x+U.y*U.y),0<Q?(U.x=U.x*D/Q,U.y=U.y*D/Q):U=null);P>D*D&&0<Q&&(P=L.x-T.x,V=L.y-T.y,P=P*P+V*V,P>D*D&&(J=new mxPoint(T.x-U.x,T.y-U.y),P=new mxPoint(T.x+U.x,T.y+U.y),N.push(J),this.addPoints(w,N,C,E,!1,null,K),N=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,K=!1,"sharp"==G?(w.lineTo(J.x-U.y*N,J.y+U.x*N),w.lineTo(P.x-U.y*N,P.y+-U.x*N),w.lineTo(P.x,P.y)):"line"==G?(w.moveTo(J.x+U.y*N,J.y-U.x*N),w.lineTo(J.x-U.y*N,J.y+U.x*N),w.moveTo(P.x-U.y*N,P.y+U.x*N),w.lineTo(P.x+U.y*N,P.y-U.x*N),w.moveTo(P.x,P.y)):"arc"==G?(N*=1.3,w.curveTo(J.x-U.y*N,J.y+U.x*N,P.x-U.y*N,P.y+U.x*N,P.x,P.y)):(w.moveTo(P.x,P.y),K=!0),N=[P],J=!0))}else U=null;J||(N.push(T),L=T)}this.addPoints(w,N,C,E,!1,null,K);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,E){return null!=z&&"centerPerimeter"==-z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,z,C,E){if(null==z||null==w||"1"!=z.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{z=this.getTerminalPort(w,z,E);var D=this.getNextPoint(w,C,E),G=this.graph.isOrthogonal(w),K=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(z.getCenterX(),-z.getCenterY());if(0!=K){var Q=Math.cos(-K),N=Math.sin(-K);D=mxUtils.getRotatedPoint(D,Q,N,L)}Q=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);Q+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(z,D,0==K&&G,Q);0!=K&&(Q=Math.cos(K),N=Math.sin(K),D=mxUtils.getRotatedPoint(D,Q,N,L));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,z,C,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,z,-C,E,D){if(null!=z&&null!=w){w=this.graph.getAllConnectionConstraints(z);E=C=null;if(null!=w)for(var G=0;G<w.length;G++){var K=this.graph.getConnectionPoint(z,w[G]);if(null!=K){var L=(K.x-D.x)*(K.x-D.x)+(K.y-D.y)*(K.y-D.y);if(null==E||L<E)C=K,E=L}}null!=C&&(D=C)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,z,C){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&null!=C.state&&(E=C.state.view.graph.replacePlaceholders(C.state.cell,+C=!1;E=[];for(var J=0;J<z.length-1;J++){for(var L=z[J+1],Q=z[J],N=[],U=z[J+2];J<z.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,U.x,U.y,L.x,L.y)<1*this.scale*this.scale;)L=U,J++,U=z[J+2];C=D(0,Q.x,Q.y)||C;for(var Y=0;Y<this.validEdges.length;Y++){var P=this.validEdges[Y],T=P.absolutePoints;if(null!=T&&mxUtils.intersects(w,P)&&"1"!=P.style.noJump){var K=null;for(P=0;P<T.length-1;P++){var V=T[P+1],Z=T[P];for(U=T[P+2];P<T.length-2&&mxUtils.ptSegDistSq(Z.x,Z.y,U.x,U.y,V.x,V.y)<1*this.scale*this.scale;)V=U,P++,+U=T[P+2];var ia=mxUtils.intersection(Q.x,Q.y,L.x,L.y,Z.x,Z.y,V.x,V.y);if(null!=ia&&(Math.abs(ia.x-Q.x)>G||Math.abs(ia.y-Q.y)>G)&&(Math.abs(ia.x-L.x)>G||Math.abs(ia.y-L.y)>G)&&(null==K||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,K.x,K.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,Z.x,Z.y)>G)&&(null==U||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,U.x,U.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,V.x,V.y)>G)){U=ia.x-Q.x;K=ia.y-Q.y;ia={distSq:U*U+K*K,x:ia.x,y:ia.y};for(U=0;U<N.length;U++)if(N[U].distSq>ia.distSq){N.splice(U,+0,ia);ia=null;break}null==ia||0!=N.length&&N[N.length-1].x===ia.x&&N[N.length-1].y===ia.y||N.push(ia)}K=Z}}}for(P=0;P<N.length;P++)C=D(1,N[P].x,N[P].y)||C}ia=z[z.length-1];C=D(0,ia.x,ia.y)||C}w.routedPoints=E;return C}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){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)g.apply(this,+arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,L=null,Q=null,N=[],U=null;w.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var P=this.state.routedPoints[Y],T=new mxPoint(P.x/this.scale,P.y/this.scale);0==Y?T=z[0]:Y==this.state.routedPoints.length-1&&(T=z[z.length-1]);var K=!1;if(null!=+L&&1==P.type){var V=this.state.routedPoints[Y+1];P=V.x/this.scale-T.x;V=V.y/this.scale-T.y;P=P*P+V*V;null==U&&(U=new mxPoint(T.x-L.x,T.y-L.y),Q=Math.sqrt(U.x*U.x+U.y*U.y),0<Q?(U.x=U.x*D/Q,U.y=U.y*D/Q):U=null);P>D*D&&0<Q&&(P=L.x-T.x,V=L.y-T.y,P=P*P+V*V,P>D*D&&(K=new mxPoint(T.x-U.x,T.y-U.y),P=new mxPoint(T.x+U.x,T.y+U.y),N.push(K),this.addPoints(w,N,C,E,!1,null,J),N=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,J=!1,"sharp"==G?(w.lineTo(K.x-U.y*N,K.y+U.x*N),w.lineTo(P.x-U.y*N,P.y++U.x*N),w.lineTo(P.x,P.y)):"line"==G?(w.moveTo(K.x+U.y*N,K.y-U.x*N),w.lineTo(K.x-U.y*N,K.y+U.x*N),w.moveTo(P.x-U.y*N,P.y+U.x*N),w.lineTo(P.x+U.y*N,P.y-U.x*N),w.moveTo(P.x,P.y)):"arc"==G?(N*=1.3,w.curveTo(K.x-U.y*N,K.y+U.x*N,P.x-U.y*N,P.y+U.x*N,P.x,P.y)):(w.moveTo(P.x,P.y),J=!0),N=[P],K=!0))}else U=null;K||(N.push(T),L=T)}this.addPoints(w,N,C,E,!1,null,J);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,E){return null!=z&&"centerPerimeter"==+z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,z,C,E){if(null==z||null==w||"1"!=z.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{z=this.getTerminalPort(w,z,E);var D=this.getNextPoint(w,C,E),G=this.graph.isOrthogonal(w),J=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(z.getCenterX(),+z.getCenterY());if(0!=J){var Q=Math.cos(-J),N=Math.sin(-J);D=mxUtils.getRotatedPoint(D,Q,N,L)}Q=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);Q+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(z,D,0==J&&G,Q);0!=J&&(Q=Math.cos(J),N=Math.sin(J),D=mxUtils.getRotatedPoint(D,Q,N,L));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,z,C,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,z,+C,E,D){if(null!=z&&null!=w){w=this.graph.getAllConnectionConstraints(z);E=C=null;if(null!=w)for(var G=0;G<w.length;G++){var J=this.graph.getConnectionPoint(z,w[G]);if(null!=J){var L=(J.x-D.x)*(J.x-D.x)+(J.y-D.y)*(J.y-D.y);if(null==E||L<E)C=J,E=L}}null!=C&&(D=C)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,z,C){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&null!=C.state&&(E=C.state.view.graph.replacePlaceholders(C.state.cell,E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var z=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=z&&"string"===typeof z&&"stencil("==z.substring(0,8))try{var C=z.substring(8,z.length-1),E=mxUtils.parseXml(Graph.decompress(C));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var f=0;f<b.length;f++){var h=b[f];if(!mxStencilRegistry.isFileLoaded(h))if(mxStencilRegistry.setFileLoaded(h),".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,@@ -2903,7 +2903,7 @@ this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!return""!=q};mxCellEditor.prototype.insertTab=function(q){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);q=Graph.createTabNode(q);B.insertNode(q);B.setStartAfter(q);B.setEndAfter(q);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(q,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),M=null!=A&&mxEvent.isShiftDown(A);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(W){M||F||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(q)}F||document.execCommand("justify"+q.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var q=window.getSelection();if(q.getRangeAt&&q.rangeCount){for(var A=[],B=0,F=q.rangeCount;B<F;++B)A.push(q.getRangeAt(B));return A}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(q){try{if(q)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var A=0,B=q.length;A<B;++A)sel.addRange(q[A])}else document.selection&&q.select&&q.select()}catch(F){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=-function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var K=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?K.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;+function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?J.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(q,A){q=this.graph.getStartEditingCell(q,A);L.apply(this,arguments);var B=this.graph.view.getState(q);this.textarea.className=null!=B&&1==B.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(q)};mxCellEditor.prototype.toggleViewMode=function(){var q=this.graph.view.getState(this.editingCell);if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(q.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),M=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");@@ -2923,7 +2923,7 @@ function(q,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEthis.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(q,B)+", "+b(A,B);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&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Y=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(q,A){Y.apply(this,arguments);var B=this.graph.getCellStyle(q);if(null==B.childLayout){var F=this.graph.model.getParent(q),M=null!=F?this.graph.getCellGeometry(F):null;if(null!=M&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var R=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(F);M=M.clone();B?M.height=A.height+W.y+W.height+2*R:M.width=A.width+W.x+W.width+2*R;this.graph.model.setGeometry(F,M)}}};var P=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function q(ha){B.get(ha)||(B.put(ha,!0),M.push(ha))}for(var A=P.apply(this,arguments),B=new mxDictionary,F=this.graph.model,M=[],R=0;R<A.length;R++){var W=A[R];this.graph.isTableCell(W)?q(F.getParent(F.getParent(W))):this.graph.isTableRow(W)&&q(F.getParent(W));q(W)}return M};var T=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=-function(q){return T.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.getEvent())};var J=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return J.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=+function(q){return T.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.getEvent())};var K=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return K.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(q){var A=V.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var Z=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(q){var A=Z.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var q=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+q.x/2,this.bounds.y+this.rotationHandleVSpacing-q.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(q,A){return this.graph.isRecursiveVertexResize(q)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(q,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var ia=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ia.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 oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};@@ -3020,8 +3020,8 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.lenFormat.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,h){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",this.update);a.addListener("lockedChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.cursor="default";var f=document.createElement("div");f.className="geFormatSection";f.style.textAlign="center";f.style.fontWeight="bold";f.style.paddingTop="8px";f.style.fontSize="13px";f.style.borderWidth="0px 0px 1px 1px";f.style.borderStyle="solid";f.style.display="inline-block";-f.style.height="25px";f.style.overflow="hidden";f.style.width="100%";this.container.appendChild(e);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var h=a.getSelectionState(),d=h.containsLabel,g=null,m=null,p=mxUtils.bind(this,function(C,E,D,G){var K=mxUtils.bind(this,function(L){g!=C&&(d?this.labelIndex=D:b.isSelectionEmpty()?this.diagramIndex=D:this.currentIndex=D,null!=g&&(g.style.backgroundColor=Format.inactiveTabBackgroundColor,-g.style.borderBottomWidth="1px"),g=C,g.style.backgroundColor="",g.style.borderBottomWidth="0px",m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(C,"click",K);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(L){L.preventDefault()}));(G&&null==g||D==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&K()}),k=0;if(b.isSelectionEmpty()){mxUtils.write(f,mxResources.get("diagram"));f.style.borderLeftWidth=+f.style.height="25px";f.style.overflow="hidden";f.style.width="100%";this.container.appendChild(e);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var h=a.getSelectionState(),d=h.containsLabel,g=null,m=null,p=mxUtils.bind(this,function(C,E,D,G){var J=mxUtils.bind(this,function(L){g!=C&&(d?this.labelIndex=D:b.isSelectionEmpty()?this.diagramIndex=D:this.currentIndex=D,null!=g&&(g.style.backgroundColor=Format.inactiveTabBackgroundColor,+g.style.borderBottomWidth="1px"),g=C,g.style.backgroundColor="",g.style.borderBottomWidth="0px",m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(C,"click",J);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(L){L.preventDefault()}));(G&&null==g||D==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&J()}),k=0;if(b.isSelectionEmpty()){mxUtils.write(f,mxResources.get("diagram"));f.style.borderLeftWidth="0px";e.appendChild(f);h=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,h));this.container.appendChild(h);if(null!=Editor.styles){h.style.display="none";f.style.width=this.showCloseButton?"106px":"50%";f.style.cursor="pointer";f.style.backgroundColor=Format.inactiveTabBackgroundColor;var u=f.cloneNode(!1);u.style.borderLeftWidth="1px";u.style.borderRightWidth="1px";u.style.backgroundColor=Format.inactiveTabBackgroundColor;p(f,h,k++);var w=e.cloneNode(!1);w.style.display="none";mxUtils.write(u,mxResources.get("style"));e.appendChild(u);this.panels.push(new DiagramStylePanel(this,a,w));this.container.appendChild(w);p(u,w,k++)}this.showCloseButton&&(u=f.cloneNode(!1),u.style.borderLeftWidth="1px",u.style.borderRightWidth="1px",u.style.borderBottomWidth="1px",u.style.backgroundColor=Format.inactiveTabBackgroundColor,u.style.position="absolute",u.style.display="flex",u.style.right="0px",u.style.top="0px",u.style.width="25px",u.style.padding="0px",u.style.height="33px",u.style.alignItems="center",u.style.justifyContent="center",p=document.createElement("img"),p.className="geAdaptiveAsset",p.setAttribute("border","0"),p.setAttribute("src",Editor.crossImage),p.setAttribute("title",mxResources.get("hide")),p.style.width="16px",p.style.height="16px",p.style.opacity=.5,u.appendChild(p),mxEvent.addListener(p,"click",function(){a.actions.get("format").funct()}),e.appendChild(u))}else if(b.isEditing())mxUtils.write(f,mxResources.get("text")),e.appendChild(f),f.style.borderLeftStyle="none",this.panels.push(new TextFormatPanel(this,@@ -3029,8 +3029,8 @@ a,e));else{f.style.backgroundColor=Format.inactiveTabBackgroundColor;f.style.bor"none",this.panels.push(new StyleFormatPanel(this,a,w)),this.container.appendChild(w),p(f,w,k++));mxUtils.write(u,mxResources.get("text"));e.appendChild(u);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new TextFormatPanel(this,a,f));this.container.appendChild(f);mxUtils.write(z,mxResources.get("arrange"));e.appendChild(z);e=e.cloneNode(!1);e.style.display="none";this.panels.push(new ArrangePanel(this,a,e));this.container.appendChild(e);0<h.cells.length?p(u,f,k+1):u.style.display="none";p(z,e,k++,!0)}}};BaseFormatPanel=function(a,b,e){this.format=a;this.editorUi=b;this.container=e;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="transparent";BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,h,d,g,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;h=null!=h?h:999;var w=null,z=!1,C=null,E=mxUtils.bind(this,function(D){var G=m?parseFloat(a.value):parseInt(a.value);p&&(G=this.fromUnit(G));if(G!=C){C=G;isNaN(G)||b!=mxConstants.STYLE_ROTATION||(G=mxUtils.mod(Math.round(100*G),36E3)/100);G=Math.min(h,Math.max(f,isNaN(G)?e:G));if(u.cellEditor.isContentEditing()&&g)z||(z=!0,null!=w&&(u.cellEditor.restoreSelection(w),-w=null),g(G),a.value=(p?this.inUnit(G):G)+d,z=!1);else if(G!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var K=k.getSelectionState().cells;u.setCellStyles(b,G,K);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(K,function(Q){Q.removeAttribute("size");Q.style.fontSize="";""==Q.getAttribute("style")&&Q.removeAttribute("style")});for(var L=0;L<K.length;L++)0==u.model.getChildCount(K[L])&&u.autoSizeCell(K[L],!1);k.fireEvent(new mxEventObject("styleChanged",-"keys",[b],"values",[G],"cells",K))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(G):G)+d}mxEvent.consume(D)});g&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};+w=null),g(G),a.value=(p?this.inUnit(G):G)+d,z=!1);else if(G!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var J=k.getSelectionState().cells;u.setCellStyles(b,G,J);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(J,function(Q){Q.removeAttribute("size");Q.style.fontSize="";""==Q.getAttribute("style")&&Q.removeAttribute("style")});for(var L=0;L<J.length;L++)0==u.model.getChildCount(J[L])&&u.autoSizeCell(J[L],!1);k.fireEvent(new mxEventObject("styleChanged",+"keys",[b],"values",[G],"cells",J))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(G):G)+d}mxEvent.consume(D)});g&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 8px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b};BaseFormatPanel.prototype.addAction=function(a,b){var e=this.editorUi.actions.get(b);b=null;null!=e&&e.isEnabled()&&(b=mxUtils.button(e.label,mxUtils.bind(this,function(f){try{e.funct(f,f)}catch(h){this.editorUi.handleError(h)}})),b.setAttribute("title",e.label+(null!=e.shortcut?" ("+e.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b));return b};BaseFormatPanel.prototype.addActions=function(a,b){for(var e=null,f=null,h=0,d=0;d<b.length;d++){var g=this.addAction(a,b[d]);null!=g&&(h++,0==mxUtils.mod(h,2)&&(f.style.marginRight="2px",f.style.width="104px",g.style.width="104px",e.parentNode.removeChild(e)),e=mxUtils.br(a),f=g)}return h};@@ -3043,11 +3043,11 @@ m.style.overflow="hidden";m.style.maxWidth="75%";m.style.userSelect="none";mxUtiBaseFormatPanel.prototype.createCellOption=function(a,b,e,f,h,d,g,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;h=null!=h?"null"==h?null:h:0;var w=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=h},function(z){m&&u.stopEditing();if(null!=g)g.funct();else{u.getModel().beginUpdate();try{var C=null!=p?p:k.getSelectionState().cells;z=z?f:h;u.setCellStyles(b,z,C);null!=d&&d(C,z);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[z],"cells",C))}finally{u.getModel().endUpdate()}}},{install:function(z){this.listener=function(){z(mxUtils.getValue(w,b,e)!=h)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,h,d,g,m,p,k){function u(P,T){"default"!=P||T||(P=m);"default"!=P&&p&&(P=mxUtils.getLightDarkColor(P),P=k()?P.dark:P.light);return P}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.style.padding="3px 0px 3px 0px";C.style.whiteSpace="nowrap";C.style.overflow="hidden";C.style.width="200px";C.style.height="18px";var E=document.createElement("input");E.setAttribute("type","checkbox");-E.style.margin="1px 6px 0px 0px";E.style.verticalAlign="top";g||C.appendChild(E);var D=document.createElement("span");D.style.verticalAlign="top";mxUtils.write(D,a);C.appendChild(D);var G=b(),K=!1,L=null,Q=null,N=document.createElement("input");N.setAttribute("type","color");N.style.position="relative";N.style.visibility="hidden";N.style.top="10px";N.style.width="0px";N.style.height="0px";N.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(L=document.createElement("img"),L.src=-Editor.colorDropperImage,L.className="geColorDropper geAdaptiveAsset",L.style.position="relative",L.style.right="-20px",L.style.top="-1px",L.style.width="auto",L.style.height="14px",mxEvent.addListener(L,"click",function(P){N.value=u(G);N.click();mxEvent.consume(P)}));var U=null,Y=function(P,T){K||(K=!0,null!=d&&d(P),T||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(P)),G=b(),P=mxUtils.getLightDarkColor("default"!=G?G:m),T=document.createElement("div"),T.style.width="21px",T.style.height="12px",+E.style.margin="1px 6px 0px 0px";E.style.verticalAlign="top";g||C.appendChild(E);var D=document.createElement("span");D.style.verticalAlign="top";mxUtils.write(D,a);C.appendChild(D);var G=b(),J=!1,L=null,Q=null,N=document.createElement("input");N.setAttribute("type","color");N.style.position="relative";N.style.visibility="hidden";N.style.top="10px";N.style.width="0px";N.style.height="0px";N.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(L=document.createElement("img"),L.src=+Editor.colorDropperImage,L.className="geColorDropper geAdaptiveAsset",L.style.position="relative",L.style.right="-20px",L.style.top="-1px",L.style.width="auto",L.style.height="14px",mxEvent.addListener(L,"click",function(P){N.value=u(G);N.click();mxEvent.consume(P)}));var U=null,Y=function(P,T){J||(J=!0,null!=d&&d(P),T||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(P)),G=b(),P=mxUtils.getLightDarkColor("default"!=G?G:m),T=document.createElement("div"),T.style.width="21px",T.style.height="12px",T.style.margin="2px 18px 2px 3px",T.style.borderWidth="1px",T.style.borderStyle="solid",T.style.backgroundColor=P.cssText,Q.innerText="",Q.appendChild(T),!p&&mxUtils.isLightDarkColor(G)&&P.light!=P.dark?T.style.background="linear-gradient(to right bottom, "+P.cssText+" 50%, "+mxUtils.invertLightDarkColor(P).cssText+" 50.3%)":p&&w&&(T.style.backgroundColor=k()?P.dark:P.light),null!=L?(T.style.width="21px",T.style.margin="2px 18px 2px 3px",T.appendChild(L)):(T.style.width="36px",T.style.margin="3px"),null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(P="#"==G.charAt(0)?G.substring(1).toUpperCase():G,P=ColorDialog.prototype.colorNames[P],null!=P?Q.setAttribute("title",P):"default"==G?Q.setAttribute("title",mxResources.get("useBlackAndWhite")):Q.setAttribute("title",G)),null==G||G==mxConstants.NONE||z.isSpecialColor(G)?(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1):(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0),Q.style.display=E.checked||g?"":-"none",K=!1)};C.appendChild(N);mxEvent.addListener(N,"change",function(){var P=N.value;if(!p){var T=mxUtils.getLightDarkColor(G);k()?T.dark=P:T.light=P;P="light-dark("+T.light+", "+T.dark+")"}Y(P)});Q=mxUtils.button("",mxUtils.bind(this,function(P){var T=m;p&&k()&&mxUtils.isLightDarkColor(T)&&(T=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(G,!0),function(J){Y(J)},"default"==f?"default":null,T,p);mxEvent.consume(P)}));Q.style.position="absolute";Q.style.marginTop="-3px";Q.style.left=+"none",J=!1)};C.appendChild(N);mxEvent.addListener(N,"change",function(){var P=N.value;if(!p){var T=mxUtils.getLightDarkColor(G);k()?T.dark=P:T.light=P;P="light-dark("+T.light+", "+T.dark+")"}Y(P)});Q=mxUtils.button("",mxUtils.bind(this,function(P){var T=m;p&&k()&&mxUtils.isLightDarkColor(T)&&(T=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(G,!0),function(K){Y(K)},"default"==f?"default":null,T,p);mxEvent.consume(P)}));Q.style.position="absolute";Q.style.marginTop="-3px";Q.style.left="178px";Q.style.height="22px";Q.className="geColorBtn";Q.style.display=E.checked||g?"":"none";C.appendChild(Q);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&Q.setAttribute("title",a);g||(mxEvent.addListener(C,"click",function(P){P=mxEvent.getSource(P);if(P==E||"INPUT"!=P.nodeName)P!=E&&(E.checked=!E.checked),E.checked||null==G||G==mxConstants.NONE||f==mxConstants.NONE||(f=u(G)),Y(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,mxUtils.bind(this,function(P){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(P){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})));Y(G,!0);null!=h&&h.install(function(){Y(G,!0)},this.listeners.push(h));return C};BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,h,d){var g=this.editorUi,m=g.editor.graph;return this.createColorOption(a,function(){var p=m.getCellStyle(m.getSelectionCell(),!1);return null!=p?p[b]:null},function(p){m.getModel().beginUpdate();try{var k=g.getSelectionState().cells;m.setCellStyles(b,p,k);null!=h&&h(p);g.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[p],"cells",k))}finally{m.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(p){this.listener=@@ -3092,14 +3092,14 @@ ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.edk=this.addUnitInput(g,this.getUnit(),16,52,function(){E.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),u=document.createElement("div");u.className="geAdaptiveAsset";u.style.backgroundImage="url("+Editor.autosizeImage+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="18px 18px";u.style.width="21px";u.style.height="21px";u.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");u.style.position="relative";u.style.cursor="pointer";u.style.marginTop="-3px";u.style.border="0px";u.style.left="42px";mxUtils.setOpacity(u,50);mxEvent.addListener(u,"mouseenter",function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){mxUtils.setOpacity(u,50)});mxEvent.addListener(u,"click",function(){e.actions.get("autosize").funct()});g.appendChild(u);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(g,mxResources.get("width"),87,64);this.addLabel(g,mxResources.get("height"),16,64);mxUtils.br(g);m=document.createElement("div");m.style.paddingTop="8px";m.style.paddingRight="20px";m.style.whiteSpace="nowrap";m.style.textAlign="right";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.style.width="210px";m.appendChild(w);d.cell||d.row?u.style.visibility="hidden":g.appendChild(m);var z=w.getElementsByTagName("input")[0];this.addKeyHandler(p,Y);this.addKeyHandler(k,-Y);var C=this.addGeometryHandler(p,function(J,V,Z){V=Math.max(1,b.fromUnit(V));if(f.isTableCell(Z))return f.setTableColumnWidth(Z,V-J.width,!0),!0;0<J.width&&(z.checked&&(J.height=Math.round(J.height*V*100/J.width)/100),J.width=V)});var E=this.addGeometryHandler(k,function(J,V,Z){V=Math.max(1,b.fromUnit(V));f.isTableCell(Z)&&(Z=h.getParent(Z));if(f.isTableRow(Z))return f.setTableRowHeight(Z,V-J.height),!0;0<J.height&&(z.checked&&(J.width=Math.round(J.width*V*100/J.height)/100),J.height=V)});(d.resizable||-d.row||d.cell)&&a.appendChild(g);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var G=this.addUnitInput(D,this.getUnit(),87,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),K=this.addUnitInput(D,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),-null,null,this.isFloatUnit());mxUtils.br(D);w=!0;var L=null,Q=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var N=f.getCellGeometry(d.vertices[0]);if(null!=N&&N.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);L=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*N.x)/10},function(J){J=parseFloat(J);if(!isNaN(J)){h.beginUpdate();-try{N=N.clone(),N.x=parseFloat(J)/100,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}}});if(h.isEdge(h.getParent(d.vertices[0]))){w=!1;var U=null;Q=this.addUnitInput(D,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(Q,function(J,V){J.y=b.fromUnit(V)})}else Q=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*N.y)/10},function(J){J=parseFloat(J);if(!isNaN(J)){h.beginUpdate();try{N=N.clone(),N.y=parseFloat(J)/100,h.setGeometry(d.vertices[0],-N)}finally{h.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(w?"left":"line"),87,64).style.marginTop="8px";this.addLabel(D,mxResources.get(w?"top":"orthogonal"),16,64).style.marginTop="8px";var Y=mxUtils.bind(this,function(J,V,Z){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)g.style.display="none";else{g.style.display="";if(Z||document.activeElement!=p)p.value=this.inUnit(d.width)+" "+this.getUnit();-if(Z||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){J=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Z||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(Z||document.activeElement!=K)K.value=this.inUnit(d.y)+" "+this.getUnit();null!=J&&J.relative&&(null==L||!Z&&document.activeElement==L||(L.value=Math.round(1E3*J.x)/10+" %"),null==Q||!Z&&document.activeElement==-Q||(h.isEdge(h.getParent(d.vertices[0]))?Q.value=this.inUnit(J.y)+" "+this.getUnit():Q.value=Math.round(1E3*J.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){h.removeListener(Y)}});h.addListener(mxEvent.CHANGE,Y);this.addKeyHandler(G,Y);this.addKeyHandler(K,Y);Y();var P=this.addGeometryHandler(G,function(J,V){V=b.fromUnit(V);J.relative?(J.offset=null!=J.offset?J.offset:new mxPoint,J.offset.x=V):J.x=V});var T=this.addGeometryHandler(K,function(J,V){V=b.fromUnit(V);-J.relative?(J.offset=null!=J.offset?J.offset:new mxPoint,J.offset.y=V):J.y=V});d.movable&&(0==d.edges.length&&1==d.vertices.length&&h.isEdge(h.getParent(d.vertices[0]))&&(N=f.getCellGeometry(d.vertices[0]),null!=N&&N.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(J){h.beginUpdate();try{N=N.clone(),N.x=0,N.y=0,N.offset=new mxPoint,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),m.style.width="134px",m.style.left=+Y);var C=this.addGeometryHandler(p,function(K,V,Z){V=Math.max(1,b.fromUnit(V));if(f.isTableCell(Z))return f.setTableColumnWidth(Z,V-K.width,!0),!0;0<K.width&&(z.checked&&(K.height=Math.round(K.height*V*100/K.width)/100),K.width=V)});var E=this.addGeometryHandler(k,function(K,V,Z){V=Math.max(1,b.fromUnit(V));f.isTableCell(Z)&&(Z=h.getParent(Z));if(f.isTableRow(Z))return f.setTableRowHeight(Z,V-K.height),!0;0<K.height&&(z.checked&&(K.width=Math.round(K.width*V*100/K.height)/100),K.height=V)});(d.resizable||+d.row||d.cell)&&a.appendChild(g);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var G=this.addUnitInput(D,this.getUnit(),87,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),J=this.addUnitInput(D,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),+null,null,this.isFloatUnit());mxUtils.br(D);w=!0;var L=null,Q=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var N=f.getCellGeometry(d.vertices[0]);if(null!=N&&N.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);L=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*N.x)/10},function(K){K=parseFloat(K);if(!isNaN(K)){h.beginUpdate();+try{N=N.clone(),N.x=parseFloat(K)/100,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}}});if(h.isEdge(h.getParent(d.vertices[0]))){w=!1;var U=null;Q=this.addUnitInput(D,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(Q,function(K,V){K.y=b.fromUnit(V)})}else Q=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*N.y)/10},function(K){K=parseFloat(K);if(!isNaN(K)){h.beginUpdate();try{N=N.clone(),N.y=parseFloat(K)/100,h.setGeometry(d.vertices[0],+N)}finally{h.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(w?"left":"line"),87,64).style.marginTop="8px";this.addLabel(D,mxResources.get(w?"top":"orthogonal"),16,64).style.marginTop="8px";var Y=mxUtils.bind(this,function(K,V,Z){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)g.style.display="none";else{g.style.display="";if(Z||document.activeElement!=p)p.value=this.inUnit(d.width)+" "+this.getUnit();+if(Z||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){K=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Z||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(Z||document.activeElement!=J)J.value=this.inUnit(d.y)+" "+this.getUnit();null!=K&&K.relative&&(null==L||!Z&&document.activeElement==L||(L.value=Math.round(1E3*K.x)/10+" %"),null==Q||!Z&&document.activeElement==+Q||(h.isEdge(h.getParent(d.vertices[0]))?Q.value=this.inUnit(K.y)+" "+this.getUnit():Q.value=Math.round(1E3*K.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){h.removeListener(Y)}});h.addListener(mxEvent.CHANGE,Y);this.addKeyHandler(G,Y);this.addKeyHandler(J,Y);Y();var P=this.addGeometryHandler(G,function(K,V){V=b.fromUnit(V);K.relative?(K.offset=null!=K.offset?K.offset:new mxPoint,K.offset.x=V):K.x=V});var T=this.addGeometryHandler(J,function(K,V){V=b.fromUnit(V);+K.relative?(K.offset=null!=K.offset?K.offset:new mxPoint,K.offset.y=V):K.y=V});d.movable&&(0==d.edges.length&&1==d.vertices.length&&h.isEdge(h.getParent(d.vertices[0]))&&(N=f.getCellGeometry(d.vertices[0]),null!=N&&N.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(K){h.beginUpdate();try{N=N.clone(),N.x=0,N.y=0,N.offset=new mxPoint,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),m.style.width="134px",m.style.left="89px",m.style.position="absolute",mxUtils.br(D),mxUtils.br(D),D.appendChild(m))),a.appendChild(D))};ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+g.getUnit();else if(p!=d){h.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(h.getModel().isVertex(k[u])){var w=h.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,p,k[u]))){var z=h.view.getState(k[u]);null!=z&&h.isRecursiveVertexResize(z)&&h.resizeChildCells(k[u],w);h.getModel().setGeometry(k[u],w);h.constrainChildCells(k[u])}}}finally{h.getModel().endUpdate()}d=p;a.value=p+" "+g.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,h=f.editor.graph,d=null,g=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};@@ -3107,11 +3107,11 @@ ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(g){if(""!"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,h=e.getSelectionState(),d=this.createPanel(),g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("width"));d.appendChild(g);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(N){var U=parseInt(m.value);U=Math.min(999,Math.max(1,isNaN(U)?1:U));if(U!=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Y=e.getSelectionState().cells;f.setCellStyles("width",U,Y);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[U],"cells",Y))}m.value=U+" pt";mxEvent.consume(N)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";g=document.createElement("div");g.style.position=-"absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("linestart"));k.appendChild(g);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){K.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);+"absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("linestart"));k.appendChild(g);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){J.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);this.addKeyHandler(u,D);this.addKeyHandler(w,D);var z=this.createPanel();z.style.paddingBottom="30px";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("lineend"));z.appendChild(g);var C=this.addUnitInput(z,this.getUnit(),87,52,function(){L.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(z,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(N,U,Y){h=e.getSelectionState();N=h.cells[0];if("link"==h.style.shape||"flexArrow"==h.style.shape){if(d.style.display="",Y||document.activeElement!=m)Y=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=Y+" pt"}else d.style.display="none";1==h.cells.length&&f.model.isEdge(N)?(Y=f.model.getGeometry(N),null!=Y&&null!=Y.sourcePoint&&null==f.model.getTerminal(N,!0)?(u.value=this.inUnit(Y.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(Y.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=Y&&null!=Y.targetPoint&&null==f.model.getTerminal(N,!1)?(C.value=this.inUnit(Y.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(Y.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=-"none")});var G=this.addEdgeGeometryHandler(u,function(N,U){N.sourcePoint.x=b.fromUnit(U)});var K=this.addEdgeGeometryHandler(w,function(N,U){N.sourcePoint.y=b.fromUnit(U)});var L=this.addEdgeGeometryHandler(C,function(N,U){N.targetPoint.x=b.fromUnit(U)});var Q=this.addEdgeGeometryHandler(E,function(N,U){N.targetPoint.y=b.fromUnit(U)});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D()};+"none")});var G=this.addEdgeGeometryHandler(u,function(N,U){N.sourcePoint.x=b.fromUnit(U)});var J=this.addEdgeGeometryHandler(w,function(N,U){N.sourcePoint.y=b.fromUnit(U)});var L=this.addEdgeGeometryHandler(C,function(N,U){N.targetPoint.x=b.fromUnit(U)});var Q=this.addEdgeGeometryHandler(E,function(N,U){N.targetPoint.y=b.fromUnit(U)});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container);this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){a.style.paddingTop="8px";a.style.paddingBottom="6px";0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};TextFormatPanel.prototype.addFont=function(a){function b(q){q=null!=q?q.fontSize:null;return null!=q&&"px"==q.substring(q.length-2)?parseFloat(q):mxConstants.DEFAULT_FONTSIZE}function e(q,A){if(null!=q&&""!=q.textContent){q.style.lineHeight="";var B=mxUtils.getCurrentStyle(q);parseFloat(B.fontSize)*A/100!=parseFloat(B.lineHeight)?q.style.lineHeight=A+"%":""==q.getAttribute("style")&&q.removeAttribute("style")}}function f(q,A){A?q.classList.add("geActiveItem"):q.classList.remove("geActiveItem")}var h=this.editorUi,d=h.editor.graph,g=h.getSelectionState(),m=this.createTitle(mxResources.get("font"));m.style.paddingLeft="14px";m.style.paddingTop="10px";m.style.paddingBottom="6px";a.appendChild(m);m=this.createPanel();m.style.paddingTop="2px";m.style.paddingBottom="2px";m.style.position="relative";m.style.marginLeft="-2px";m.style.borderWidth="0px";m.className="geToolbarContainer";if(d.cellEditor.isContentEditing()){var p=m.cloneNode(),k=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),@@ -3120,12 +3120,12 @@ this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"font"underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");w[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var z=this.editorUi.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);this.styleButtons(w);this.styleButtons([z]);var C=m.cloneNode(!1);C.style.height="31px";C.style.paddingTop="2px";C.style.marginLeft="-3px";C.style.paddingBottom="0px";var E=function(q){return function(){return q()}},D=this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),C),G=this.editorUi.toolbar.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],-[mxConstants.ALIGN_CENTER])),C),K=this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);this.styleButtons([D,G,K]);if(d.cellEditor.isContentEditing()){var L=+[mxConstants.ALIGN_CENTER])),C),J=this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);this.styleButtons([D,G,J]);if(d.cellEditor.isContentEditing()){var L=this.editorUi.toolbar.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([L])}var Q=this.editorUi.toolbar.addButton(Editor.alignTopImage,mxResources.get("top"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),N=this.editorUi.toolbar.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],-[mxConstants.ALIGN_MIDDLE])),C),U=this.editorUi.toolbar.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);this.styleButtons([Q,N,U]);a.appendChild(C);var Y,P,T,J,V;if(d.cellEditor.isContentEditing()){Q.style.display="none";N.style.display="none";U.style.display="none";z.style.display="none";var Z=this.editorUi.toolbar.addButton(Editor.alignJustifyImage,mxResources.get("block"),+[mxConstants.ALIGN_MIDDLE])),C),U=this.editorUi.toolbar.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);this.styleButtons([Q,N,U]);a.appendChild(C);var Y,P,T,K,V;if(d.cellEditor.isContentEditing()){Q.style.display="none";N.style.display="none";U.style.display="none";z.style.display="none";var Z=this.editorUi.toolbar.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){1==Z.style.opacity&&document.execCommand("justifyfull",!1,null)},C);Z.style.marginRight="9px";this.styleButtons([Z,Y=this.editorUi.toolbar.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C),P=this.editorUi.toolbar.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C)]);Y.style.marginLeft="10px";E=C.cloneNode(!1);E.style.paddingTop="4px";C=[this.editorUi.toolbar.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.outdentImage,-mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),this.editorUi.toolbar.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];this.styleButtons(C);C[C.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",K.style.marginRight="12px";C=m.cloneNode(!1);+mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),this.editorUi.toolbar.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];this.styleButtons(C);C[C.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",J.style.marginRight="12px";C=m.cloneNode(!1);C.removeAttribute("class");C.style.marginLeft="0px";C.style.paddingTop="8px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("position"));var ia=document.createElement("select");ia.style.position="absolute";ia.style.left="126px";ia.style.width="98px";ia.style.borderWidth="1px";ia.style.borderStyle="solid";ia.style.marginTop="-3px";var oa="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),sa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<oa.length;E++){var O=document.createElement("option");O.setAttribute("value",oa[E]);mxUtils.write(O,@@ -3140,44 +3140,44 @@ d.shapeBackgroundColor||ea==Pa?"default":ea},function(q){null!=d.cellEditor.textfunction(){return qa},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",g.cells)))},"default",{install:function(q){ra=q},destroy:function(){ra=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){ma.style.display=q==mxConstants.NONE?"none":"";Ba.style.display=ma.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,g.cells);d.updateLabelElements(g.cells,function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";p.appendChild(k);p.appendChild(ma);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(Ba),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";k=d.filterSelectionCells(mxUtils.bind(this,function(q){var A=d.view.getState(q);return null==-A||d.isAutoSizeState(A)||d.getModel().isEdge(q)||!d.isTableRow(q)&&!d.isTableCell(q)&&!d.isCellResizable(q)}));C=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);C.style.fontWeight="bold";0<k.length&&p.appendChild(C);k=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,h.actions.get("formattedText"));k.style.fontWeight="bold";p.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom=-"28px";k.style.fontWeight="normal";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var Ca=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);-this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Ia=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Da=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ga=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());-mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ta=null,La=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(q){var A=""==q.value?120:parseInt(q.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ta&&(d.cellEditor.restoreSelection(ta),ta=null);var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&-B==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&d.cellEditor.textarea.firstChild.nodeType!=mxConstants.NODETYPE_ELEMENT&&1==d.cellEditor.textarea.children.length){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var M=F.getRangeAt(0);B=document.createElement("div");B.appendChild(M.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();M=new Range;M.selectNodeContents(B);F.addRange(M)}}if(null!=B)for(B!=d.cellEditor.textarea&&-e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),M=0;M<B.length;M++)F.containsNode(B[M],!0)&&e(B[M],A)}q.value=A+" %"},function(q){La=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);p.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link",-"image"],p,!0,[Editor.linkImage,Editor.imageImage]);C=[this.editorUi.toolbar.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},p),this.editorUi.toolbar.addMenuFunctionInContainer(p,Editor.tableImage,mxResources.get("table"),!1,mxUtils.bind(this,function(q){this.editorUi.menus.addInsertTableItem(q,null,null,!1)}))];this.styleButtons(k);this.styleButtons(C);k=this.createPanel();k.style.height="57px";k.style.paddingTop=-"10px";k.style.paddingBottom="8px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(p);a.appendChild(k);k=m.cloneNode(!1);k.style.height="33px";k.style.paddingLeft="0px";C=[this.editorUi.toolbar.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=J?J.cellIndex:0)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),-mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=J?J.cellIndex+1:-1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=T&&null!=J&&d.deleteColumn(T,J.cellIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),-k),this.editorUi.toolbar.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex+1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.deleteRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k)];this.styleButtons(C);C[2].style.marginRight="10px";p=this.createPanel();-p.style.paddingTop="10px";p.style.paddingBottom="10px";p.appendChild(this.createTitle(mxResources.get("table")));p.appendChild(k);m=m.cloneNode(!1);m.style.height="33px";m.style.padding="0";C=[this.editorUi.toolbar.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(q){if(null!=T){var A=T.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+-("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==J||null!=q&&mxEvent.isShiftDown(q)?T:J;d.processElements(F,function(M){M.style.border=null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),this.editorUi.toolbar.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=-T){var A=T.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==J||null!=q&&mxEvent.isShiftDown(q)?T:J;d.processElements(F,function(M){M.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),this.editorUi.toolbar.addButton(Editor.spacingImage,-mxResources.get("spacing"),function(){if(null!=T){var q=T.getAttribute("cellPadding")||0;q=new FilenameDialog(h,q,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?T.setAttribute("cellPadding",A):T.removeAttribute("cellPadding")}),mxResources.get("spacing"));h.showDialog(q.container,300,80,!0,!0);q.init()}},m),this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},m),this.editorUi.toolbar.addButton(Editor.alignCenterImage,-mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},m),this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},m)];this.styleButtons(C);C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Xa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],-"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Ya=mxUtils.bind(this,function(q,A,B){g=h.getSelectionState();q=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);f(z,"0"==mxUtils.getValue(g.style,-mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ca.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(G,q==mxConstants.ALIGN_CENTER);f(K,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(Q,q==mxConstants.ALIGN_TOP);-f(N,q==mxConstants.ALIGN_MIDDLE);f(U,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ia.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":-q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?-X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ja.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ca.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ga)q=parseFloat(mxUtils.getValue(g.style,-mxConstants.STYLE_SPACING_RIGHT,0)),Ga.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Da)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Da.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var cb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),-null,this.isFloatUnit(),!0);var fb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ga,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Da,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),-!0);this.addKeyHandler(ca,Ya);this.addKeyHandler(Ja,Ya);this.addKeyHandler(Ca,Ya);this.addKeyHandler(Ga,Ya);this.addKeyHandler(Da,Ya);this.addKeyHandler(Ia,Ya);d.getModel().addListener(mxEvent.CHANGE,Ya);this.listeners.push({destroy:function(){d.getModel().removeListener(Ya)}});Ya();if(d.cellEditor.isContentEditing()){var ib=null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=-function(ya,Ha){if(null!=ya&&null!=Ha){if(ya==Ha)return!0;if(ya.length>Ha.length+1)return ya.substring(ya.length-Ha.length-1,ya.length)=="-"+Ha}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Ha=q;null!=Ha&&1==Ha.childNodes.length;)if(Ha=Ha.childNodes[0],Ha.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},M=mxUtils.getCurrentStyle(q),-R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,W=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(M);if(window.getSelection)for(var ha=q.getElementsByTagName("*"),fa=window.getSelection(),ja=0;ja<ha.length&&(!fa.containsNode(ha[ja],!0)||(null==W&&""!=ha[ja].style.fontSize&&(W=parseFloat(ha[ja].style.fontSize)),null==R&&""!=ha[ja].style.lineHeight&&(R=ha[ja].style.lineHeight),null==W||null==R));ja++);null==W&&(W=b(M));if(null==R)for(ha=q;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=-ha.style&&""!=ha.style.lineHeight){R=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=M){f(w[0],"bold"==M.fontWeight||400<M.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==M.fontStyle||B("I")||B("EM"));f(w[2],"underline"==M.textDecorationLine||B("U"));f(L,"line-through"==M.textDecorationLine||B("STRIKE"));f(P,B("SUP"));f(Y,B("SUB"));var va=F(q);if(null!=va){B=function(ya,Ha){Na.push({name:ya,dispName:Ha,type:"string",getValue:function(){return Ma[ya]},valueChanged:function(wa,ua){var Va=va.style,-Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Va[ya]=Qa;""==wa&&null!=ua&&(ua.value=Ma[ya])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,g,!0);null!=ib?ib.parentNode.replaceChild(B,ib):a.appendChild(B);-ib=B}d.cellEditor.isTableSelected()?(f(Z,A(M.textAlign,"justify")),f(D,A(M.textAlign,"left")),f(G,A(M.textAlign,"center")),f(K,A(M.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(M.textAlign,"justify")?(f(Z,A(M.textAlign,"justify")),f(D,!1),f(G,!1),f(K,!1)):(f(Z,!1),f(D,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(K,B==mxConstants.ALIGN_RIGHT)));T=d.getParentByName(q,"TABLE",d.cellEditor.textarea);V=null==T?-null:d.getParentByName(q,"TR",T);J=null==T?null:d.getParentByNames(q,["TD","TH"],T);Xa.style.display=null!=T?"":"none";document.activeElement!=ca&&(ca.value=isNaN(W)?"":W+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?La.value=R.replace("%"," %"):(A=parseFloat(R),isNaN(A)?La.value="120 %":La.value=Math.round(100*A)+" %"));null!=ra&&(qa=d.getTextColor(q,!0),ra(qa,!0));null!=H&&(ea=d.getTextColor(q,!1),H(ea,!0));null!=u.firstChild&&(u.firstChild.nodeValue=mxUtils.getCssFontFamily(M.fontFamily))}}eb=-!1}),0))});(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",m);mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};-mxUtils.extend(StyleFormatPanel,BaseFormatPanel);+A||d.getModel().isEdge(q)||d.isAutoSizeState(A)}));C=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);C.style.fontWeight="bold";0<k.length&&p.appendChild(C);k=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,h.actions.get("formattedText"));k.style.fontWeight="bold";p.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";C=document.createElement("div");+C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var Ca=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),+16,64);mxUtils.br(k);mxUtils.br(k);var Ia=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Da=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ga=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,+mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ta=null,La=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(q){var A=""==q.value?120:parseInt(q.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ta&&(d.cellEditor.restoreSelection(ta),ta=null);var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&B==d.cellEditor.textarea){var F=window.getSelection();if(F.getRangeAt&&+0<F.rangeCount){var M=F.getRangeAt(0);B=document.createElement("div");B.appendChild(M.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();M=new Range;M.selectNodeContents(B);F.addRange(M)}}if(null!=B)for(B!=d.cellEditor.textarea&&e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),M=0;M<B.length;M++)F.containsNode(B[M],!0)&&e(B[M],A)}q.value=A+" %"},function(q){La=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==+d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);p.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],p,!0,[Editor.linkImage,Editor.imageImage]);C=[this.editorUi.toolbar.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",+!1)},p),this.editorUi.toolbar.addMenuFunctionInContainer(p,Editor.tableImage,mxResources.get("table"),!1,mxUtils.bind(this,function(q){this.editorUi.menus.addInsertTableItem(q,null,null,!1)}))];this.styleButtons(k);this.styleButtons(C);k=this.createPanel();k.style.height="57px";k.style.paddingTop="10px";k.style.paddingBottom="8px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(p);a.appendChild(k);k=m.cloneNode(!1);k.style.height="33px";k.style.paddingLeft="0px";C=[this.editorUi.toolbar.addButton(Editor.addColumnLeftImage,+mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=K?K.cellIndex:0)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=K?K.cellIndex+1:-1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=+T&&null!=K&&d.deleteColumn(T,K.cellIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex+1)}catch(q){this.editorUi.handleError(q)}}),+k),this.editorUi.toolbar.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.deleteRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k)];this.styleButtons(C);C[2].style.marginRight="10px";p=this.createPanel();p.style.paddingTop="10px";p.style.paddingBottom="10px";p.appendChild(this.createTitle(mxResources.get("table")));p.appendChild(k);m=m.cloneNode(!1);m.style.height="33px";m.style.padding="0";C=[this.editorUi.toolbar.addButton(Editor.strokeColorImage,+mxResources.get("borderColor"),mxUtils.bind(this,function(q){if(null!=T){var A=T.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==K||null!=q&&mxEvent.isShiftDown(q)?T:K;d.processElements(F,function(M){M.style.border=null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),+F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),this.editorUi.toolbar.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=T){var A=T.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});+this.editorUi.pickColor(A,function(B){var F=null==K||null!=q&&mxEvent.isShiftDown(q)?T:K;d.processElements(F,function(M){M.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),this.editorUi.toolbar.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=T){var q=T.getAttribute("cellPadding")||0;q=new FilenameDialog(h,q,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?T.setAttribute("cellPadding",A):T.removeAttribute("cellPadding")}),+mxResources.get("spacing"));h.showDialog(q.container,300,80,!0,!0);q.init()}},m),this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},m),this.editorUi.toolbar.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},m),this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},m)];this.styleButtons(C);+C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Xa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Ya=mxUtils.bind(this,function(q,A,B){g=h.getSelectionState();q=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);+f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);f(z,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ca.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(g.style,+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(G,q==mxConstants.ALIGN_CENTER);f(J,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(Q,q==mxConstants.ALIGN_TOP);f(N,q==mxConstants.ALIGN_MIDDLE);f(U,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);+ia.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(g.style,+mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ja.value=+isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ca.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ga)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),Ga.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Da)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Da.value=isNaN(q)?"":this.inUnit(q)++" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var cb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var fb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ga,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),+null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Da,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(ca,Ya);this.addKeyHandler(Ja,Ya);this.addKeyHandler(Ca,Ya);this.addKeyHandler(Ga,Ya);this.addKeyHandler(Da,Ya);this.addKeyHandler(Ia,Ya);d.getModel().addListener(mxEvent.CHANGE,Ya);this.listeners.push({destroy:function(){d.getModel().removeListener(Ya)}});+Ya();if(d.cellEditor.isContentEditing()){var ib=null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=function(ya,Ha){if(null!=ya&&null!=Ha){if(ya==Ha)return!0;if(ya.length>Ha.length+1)return ya.substring(ya.length-Ha.length-1,ya.length)=="-"+Ha}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Ha=q;null!=Ha&&1==Ha.childNodes.length;)if(Ha=+Ha.childNodes[0],Ha.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},M=mxUtils.getCurrentStyle(q),R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,W=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(M);if(window.getSelection)for(var ha=q.getElementsByTagName("*"),fa=window.getSelection(),ja=0;ja<ha.length&&(!fa.containsNode(ha[ja],!0)||(null==+W&&""!=ha[ja].style.fontSize&&(W=parseFloat(ha[ja].style.fontSize)),null==R&&""!=ha[ja].style.lineHeight&&(R=ha[ja].style.lineHeight),null==W||null==R));ja++);null==W&&(W=b(M));if(null==R)for(ha=q;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=ha.style&&""!=ha.style.lineHeight){R=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=M){f(w[0],"bold"==M.fontWeight||400<M.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==M.fontStyle||B("I")||B("EM"));f(w[2],"underline"==M.textDecorationLine||+B("U"));f(L,"line-through"==M.textDecorationLine||B("STRIKE"));f(P,B("SUP"));f(Y,B("SUB"));var va=F(q);if(null!=va){B=function(ya,Ha){Na.push({name:ya,dispName:Ha,type:"string",getValue:function(){return Ma[ya]},valueChanged:function(wa,ua){var Va=va.style,Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Va[ya]=Qa;""==wa&&null!=ua&&(ua.value=Ma[ya])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");+B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,g,!0);null!=ib?ib.parentNode.replaceChild(B,ib):a.appendChild(B);ib=B}d.cellEditor.isTableSelected()?(f(Z,A(M.textAlign,"justify")),f(D,A(M.textAlign,"left")),f(G,A(M.textAlign,"center")),f(J,A(M.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),+A(M.textAlign,"justify")?(f(Z,A(M.textAlign,"justify")),f(D,!1),f(G,!1),f(J,!1)):(f(Z,!1),f(D,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(J,B==mxConstants.ALIGN_RIGHT)));T=d.getParentByName(q,"TABLE",d.cellEditor.textarea);V=null==T?null:d.getParentByName(q,"TR",T);K=null==T?null:d.getParentByNames(q,["TD","TH"],T);Xa.style.display=null!=T?"":"none";document.activeElement!=ca&&(ca.value=isNaN(W)?"":W+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?La.value=R.replace("%",+" %"):(A=parseFloat(R),isNaN(A)?La.value="120 %":La.value=Math.round(100*A)+" %"));null!=ra&&(qa=d.getTextColor(q,!0),ra(qa,!0));null!=H&&(ea=d.getTextColor(q,!1),H(ea,!0));null!=u.firstChild&&(u.firstChild.nodeValue=mxUtils.getCssFontFamily(M.fontFamily))}}eb=!1}),0))});(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",m);mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,+"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY);b.style.paddingTop="8px";b.style.paddingBottom="10px";this.container.appendChild(b);this.container.appendChild(this.addEffects(this.createPanel()))}b=this.createPanel();b.style.paddingTop="8px";1==a.cells.length&&(this.addEditOps(b),null!=b.firstChild&&mxUtils.br(b));1<=a.cells.length&&this.addStyleOps(b);null!=b.firstChild&&this.container.appendChild(b)};StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};-StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),h=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(h))):Base64.decode(h,!0),g=mxUtils.parseXml(d);if(null!=g){var m="light dark"!=g.documentElement.style.colorScheme,p=g.getElementsByTagName("style");-for(b=0;b<p.length;b++){var k=this.getCssRules(mxUtils.getTextContent(p[b]));if(e=m)for(var u=0;u<k.length;u++)if(0<=k[b].cssText.indexOf("color-scheme: light dark")){e=!1;break}for(u=0;u<k.length;u++)this.addSvgRule(a,k[u],g,p[b],k,u,f,e)}}}}catch(w){}return a};-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m){var p=this.editorUi,k=p.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(u,w,z){var C=mxUtils.trim(u.style[w]);if(""!=C&&"url("!=C.substring(0,4)){var E=C;"transparent"==E?E=mxConstants.NONE:mxUtils.isLightDarkColor(E)&&m&&(m=!1);u=this.createColorOption(z+" "+u.selectorText,function(){return E},mxUtils.bind(this,function(D){h[d].style[w]=D==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(D).cssText;D="";for(var G=-0;G<h.length;G++)D+=h[G].cssText+" ";f.textContent=D;D=mxUtils.getXml(e.documentElement);k.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(D))):Base64.encode(D,!0)),p.getSelectionState().cells)}),"#ffffff",{install:function(D){},destroy:function(){}},null,null,null,m);a.appendChild(u);a.style.display=""}}),g(b,"fill",mxResources.get("fill")),g(b,"stroke",mxResources.get("line")),g(b,"stop-color",mxResources.get("gradient")))};+StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),h=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(h))):Base64.decode(h,!0),g=mxUtils.parseXml(d);if(null!=g){var m="light"==g.documentElement.style.colorScheme||"0"==mxUtils.getValue(b.style,+"darkMode",null),p=""==g.documentElement.style.colorScheme,k=g.getElementsByTagName("style");for(b=0;b<k.length;b++){var u=this.getCssRules(mxUtils.getTextContent(k[b]));for(e=0;e<u.length;e++)this.addSvgRule(a,u[e],g,k[b],u,e,f,m,p)}}}}catch(w){}return a};StyleFormatPanel.prototype.getColorSchemeFromCss=function(a){return(a=a.match(/color-scheme\s*:\s*([^;]+)/i))?a[1].trim():null};+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m,p){var k=this.editorUi,u=k.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(w,z,C,E){var D=mxUtils.trim(w.style[z]);if(""!=D&&"url("!=D.substring(0,4)){var G=D;"transparent"==G?G=mxConstants.NONE:(D=mxUtils.isLightDarkColor(G))&&E?E=!1:D||E||(G="light-dark("+G+", "+G+")");w=this.createColorOption(C+" "+w.selectorText,function(){return G},mxUtils.bind(this,function(J){h[d].style[z]=J==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(J).cssText;+J="";p&&mxUtils.isLightDarkColor(h[d].style[z])&&(e.documentElement.style.colorScheme="light dark");for(var L=0;L<h.length;L++)J+=h[L].cssText+" ";f.textContent=J;J=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(J))):Base64.encode(J,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(J){},destroy:function(){}},null,null,null,E);a.appendChild(w);a.style.display=""}}),g(b,"fill",mxResources.get("fill"),+m),g(b,"stroke",mxResources.get("line"),m),g(b,"stop-color",mxResources.get("gradient"),m))};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.width="210px";e.style.textAlign="center";e.style.marginBottom="2px";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),h=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);h=this.editorUi.sidebar.getLibsForStyle(d);null!=h||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(h=[])}null!=h&&f.push("openLibrary");for(d=0;d<f.length;d++){var g=this.editorUi.actions.get(f[d]);if(null==g||g.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var p=mxResources.get(f[d]);mxUtils.write(m,p+("edit"==f[d]?"":"..."));null!=g&&null!=g.shortcut&&(p+=" ("+g.shortcut+")");m.setAttribute("title",p);e.appendChild(m)}}1<e.children.length&&(a.appendChild(e),mxEvent.addListener(e,"change",mxUtils.bind(this,function(k){"openLibrary"==e.value?(null!=h&&0==h.length&&(this.editorUi.sidebar.updateSearchIndex(),k=this.editorUi.sidebar.getKeyStyle(b.cells[0].style),h=this.editorUi.sidebar.getLibsForStyle(k)),null!=h&&0<h.length?this.editorUi.sidebar.openLibraries(h):this.editorUi.handleError({message:mxResources.get("objectNotFound")}),e.value="edit"):(k=this.editorUi.actions.get(e.value),e.value="edit",null!=k&&k.funct())})),b.image&&(f=this.editorUi.editor.graph,@@ -3186,11 +3186,11 @@ StyleFormatPanel.prototype.addFill=function(a){function b(){g.innerHTML="";C=1;f"22px";d.style.marginTop="-3px";d.style.borderWidth="1px";d.style.borderStyle="solid";d.style.boxSizing="border-box";var g=d.cloneNode(!1);mxEvent.addListener(d,"click",function(D){mxEvent.consume(D)});mxEvent.addListener(g,"click",function(D){mxEvent.consume(D)});var m=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(D){d.style.display=null==D||D==mxConstants.NONE?"none":""},function(D){f.updateCellStyles({gradientColor:D},f.getSelectionCells())},f.getDefaultColor(h.style,mxConstants.STYLE_GRADIENTCOLOR,f.shapeForegroundColor,f.shapeBackgroundColor));m.style.fontWeight="bold";var p="image"==h.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),p,"default",null,mxUtils.bind(this,function(D){f.setCellStyles(p,D,h.cells)}),f.getDefaultColor(h.style,p,f.shapeBackgroundColor,f.shapeForegroundColor));k.style.fontWeight="bold";var u=mxUtils.getValue(h.style,p,null);m.style.display=null!=u&&u!=mxConstants.NONE&&h.fill&&"image"!=h.style.shape?"":"none";var w=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var z=document.createElement("option");z.setAttribute("value",w[u]);mxUtils.write(z,mxResources.get(w[u]));d.appendChild(z)}m.appendChild(d);var C;b();h.gradient&&k.appendChild(g);var E=mxUtils.bind(this,function(){h=e.getSelectionState();var D=mxUtils.getValue(h.style,-mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(h.style,"fillStyle","auto");""==D&&(D=mxConstants.DIRECTION_SOUTH);d.value=D;a.style.display=h.fill?"":"none";D=mxUtils.getValue(h.style,p,null);if(h.fill&&null!=D&&D!=mxConstants.NONE&&"filledEdge"!=h.style.shape){if("1"==h.style.sketch){if(2!=C){g.innerHTML="";C=2;for(D=0;D<Editor.roughFillStyles.length;D++){var K=document.createElement("option");K.setAttribute("value",Editor.roughFillStyles[D].val);mxUtils.write(K,-Editor.roughFillStyles[D].dispName);g.appendChild(K)}g.value="auto"}}else 1!=C&&b();g.value=G;g.value||(G="auto",g.value=G);g.style.display="1"==h.style.sketch||"none"==d.style.display?"":"none";m.style.display=!h.gradient||h.containsImage||"1"==h.style.sketch&&"solid"!=G&&"auto"!=G?"none":""}else g.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(D){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,+mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(h.style,"fillStyle","auto");""==D&&(D=mxConstants.DIRECTION_SOUTH);d.value=D;a.style.display=h.fill?"":"none";D=mxUtils.getValue(h.style,p,null);if(h.fill&&null!=D&&D!=mxConstants.NONE&&"filledEdge"!=h.style.shape){if("1"==h.style.sketch){if(2!=C){g.innerHTML="";C=2;for(D=0;D<Editor.roughFillStyles.length;D++){var J=document.createElement("option");J.setAttribute("value",Editor.roughFillStyles[D].val);mxUtils.write(J,+Editor.roughFillStyles[D].dispName);g.appendChild(J)}g.value="auto"}}else 1!=C&&b();g.value=G;g.value||(G="auto",g.value=G);g.style.display="1"==h.style.sketch||"none"==d.style.display?"":"none";m.style.display=!h.gradient||h.containsImage||"1"==h.style.sketch&&"solid"!=G&&"auto"!=G?"none":""}else g.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(D){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,h.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",h.cells));mxEvent.consume(D)});mxEvent.addListener(g,"change",function(D){f.setCellStyles("fillStyle",g.value,h.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[g.value],"cells",h.cells));mxEvent.consume(D)});a.appendChild(k);a.appendChild(m);k=this.getCustomColors();for(u=0;u<k.length;u++)a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a};-StyleFormatPanel.prototype.addStroke=function(a){function b(H){var ea=f.fromUnit(parseFloat(K.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));K.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}function e(H){var ea=f.fromUnit(parseFloat(L.value));ea=Math.min(999,+StyleFormatPanel.prototype.addStroke=function(a){function b(H){var ea=f.fromUnit(parseFloat(J.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));J.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}function e(H){var ea=f.fromUnit(parseFloat(L.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));L.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}var f=this,h=this.editorUi,d=h.editor.graph,g=h.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var m=document.createElement("div");m.style.fontWeight="bold";g.stroke||(m.style.display="none");var p=document.createElement("select");p.style.position="absolute";p.style.height="22px";p.style.marginTop="-3px";p.style.textAlign="center";p.style.boxSizing="border-box";p.style.left="90px";p.style.width="83px";p.style.borderWidth="1px";p.style.borderStyle="solid";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(H){d.getModel().beginUpdate();try{var ea=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ra=["0","0"];"rounded"==p.value?ra=["1","0"]:"curved"==p.value&&(ra=["0","1"]);for(var qa=0;qa<ea.length;qa++)d.setCellStyles(ea[qa],ra[qa],g.cells);h.fireEvent(new mxEventObject("styleChanged","keys",ea,"values",ra,"cells",g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(H)});mxEvent.addListener(p,"click",function(H){mxEvent.consume(H)});var z="image"==g.style.shape?mxConstants.STYLE_IMAGE_BORDER:@@ -3203,9 +3203,9 @@ mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))}));w=this.editorUi.toolbar.addMenuFunctionInContainer(D,null,mxResources.get("pattern"),!1,mxUtils.bind(this,function(H){E(H,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(H,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(H,33,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(H,33,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(H,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+-" (1)");E(H,33,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,33,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));k=C.cloneNode(!1);var K=document.createElement("input");K.style.position="absolute";K.style.textAlign="right";K.style.marginTop="2px";K.style.width="52px";K.style.height="22px";K.style.left="146px";K.style.borderWidth=-"1px";K.style.borderStyle="solid";K.style.boxSizing="border-box";K.setAttribute("title",mxResources.get("linewidth"));C.appendChild(K);var L=K.cloneNode(!0);D.appendChild(L);var Q=this.createStepper(K,b,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=K.style.display;Q.style.top="2px";Q.style.left="198px";C.appendChild(Q);Q=this.createStepper(L,e,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=L.style.display;L.style.position="absolute";Q.style.top="2px";Q.style.left=-"198px";D.appendChild(Q);mxEvent.addListener(K,"blur",b);mxEvent.addListener(K,"change",b);mxEvent.addListener(L,"blur",e);mxEvent.addListener(L,"change",e);var N=this.editorUi.toolbar.addMenuFunctionInContainer(k,null,mxResources.get("waypoints"),!1,mxUtils.bind(this,function(H){"arrow"!=g.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",+" (1)");E(H,33,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,33,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));k=C.cloneNode(!1);var J=document.createElement("input");J.style.position="absolute";J.style.textAlign="right";J.style.marginTop="2px";J.style.width="52px";J.style.height="22px";J.style.left="146px";J.style.borderWidth=+"1px";J.style.borderStyle="solid";J.style.boxSizing="border-box";J.setAttribute("title",mxResources.get("linewidth"));C.appendChild(J);var L=J.cloneNode(!0);D.appendChild(L);var Q=this.createStepper(J,b,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=J.style.display;Q.style.top="2px";Q.style.left="198px";C.appendChild(Q);Q=this.createStepper(L,e,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=L.style.display;L.style.position="absolute";Q.style.top="2px";Q.style.left=+"198px";D.appendChild(Q);mxEvent.addListener(J,"blur",b);mxEvent.addListener(J,"change",b);mxEvent.addListener(L,"blur",e);mxEvent.addListener(L,"change",e);var N=this.editorUi.toolbar.addMenuFunctionInContainer(k,null,mxResources.get("waypoints"),!1,mxUtils.bind(this,function(H){"arrow"!=g.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],null,null,!0,Format.verticalElbowImage.src)).setAttribute("title",mxResources.get("horizontal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],null,null,!0,Format.horizontalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],null,null,!0,Format.verticalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),@@ -3239,10 +3239,10 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STY"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",mxResources.get("block")),H.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=H.div&&mxUtils.fit(H.div)}),0)}));this.addArrow(G);this.addArrow(N).style.marginTop="-1px";this.addArrow(U);this.addArrow(Y);Q=this.addArrow(u);Q.className="geIcon";u.style.width="134px";u=this.addArrow(w);u.className="geIcon";u.style.width="22px";var P=document.createElement("div");P.style.width="102px";P.style.height="10px";P.style.borderBottom="1px solid currentcolor";P.style.marginLeft="10px";Q.appendChild(P);var T=document.createElement("div");T.style.width="30px";T.style.height="10px";T.style.borderBottom="1px solid currentcolor";T.style.marginLeft="10px";u.appendChild(T);a.appendChild(m);a.appendChild(D);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.padding="5px 4px 6px 0px";u.style.fontWeight="normal";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginLeft=-"0px";w.style.marginBottom="12px";w.style.marginTop="2px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("lineend"));u.appendChild(w);var J=this.addUnitInput(u,this.getUnit(),98,52,function(){da.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),V=this.addUnitInput(u,this.getUnit(),30,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);Q=document.createElement("div");Q.style.height="8px";u.appendChild(Q);w=w.cloneNode(!1);+"0px";w.style.marginBottom="12px";w.style.marginTop="2px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("lineend"));u.appendChild(w);var K=this.addUnitInput(u,this.getUnit(),98,52,function(){da.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),V=this.addUnitInput(u,this.getUnit(),30,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);Q=document.createElement("div");Q.style.height="8px";u.appendChild(Q);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("linestart"));u.appendChild(w);var Z=this.addUnitInput(u,this.getUnit(),98,52,function(){X.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ia=this.addUnitInput(u,this.getUnit(),30,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),98,64).style.fontSize="11px";this.addLabel(u,mxResources.get("size"),30,64).style.fontSize="11px";mxUtils.br(u);m=m.cloneNode(!1);m.style.fontWeight="normal";m.style.position="relative";m.style.paddingLeft="16px";m.style.marginBottom="2px";m.style.marginTop="6px";m.style.borderWidth="0px";m.style.paddingBottom="18px";w=document.createElement("div");w.style.position="absolute";w.style.marginLeft="3px";w.style.marginBottom="12px";w.style.marginTop="1px";w.style.fontWeight="normal";w.style.width="120px";mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var oa=this.addUnitInput(m,this.getUnit(),30,52,function(){ca.apply(this,-arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var sa=mxUtils.bind(this,function(H,ea,ra){function qa(Pa,ma,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,ma);return Ba}g=h.getSelectionState();if(ra||document.activeElement!=K)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),K.value=isNaN(H)?"":+arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var sa=mxUtils.bind(this,function(H,ea,ra){function qa(Pa,ma,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,ma);return Ba}g=h.getSelectionState();if(ra||document.activeElement!=J)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),J.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");P.style.borderBottom="1px solid currentcolor";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,null)&&(H=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,""),ea=String(H).split(" "),2<=ea.length?(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,P.style.borderBottom="1px solid transparent",P.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",P.style.backgroundPosition="bottom left",P.style.backgroundSize=H+"px 1px",P.style.backgroundRepeat="repeat-x"):P.style.borderBottom="1px dashed currentcolor");T.style.backgroundImage=P.style.backgroundImage;T.style.backgroundPosition=P.style.backgroundPosition;T.style.backgroundSize=P.style.backgroundSize;T.style.backgroundRepeat=P.style.backgroundRepeat;T.style.borderBottom=P.style.borderBottom;H=N.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,@@ -3251,9 +3251,9 @@ H.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgH.style.height="",H.style.backgroundImage="link"==g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");qa(mxUtils.getValue(g.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(g.style,"startFill","1"),U,"start");qa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(N,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(ra||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=Z)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Z.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=Z)H=-parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),J.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=oa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),oa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var X=this.installInputHandler(Z,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,-0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ba=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var da=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(oa,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(K,sa);this.addKeyHandler(ia,-sa);this.addKeyHandler(Z,sa);this.addKeyHandler(V,sa);this.addKeyHandler(J,sa);this.addKeyHandler(oa,sa);d.getModel().addListener(mxEvent.CHANGE,sa);this.listeners.push({destroy:function(){d.getModel().removeListener(sa)}});sa();return a};+parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),K.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=oa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),oa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var X=this.installInputHandler(Z,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,+0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ba=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var da=this.installInputHandler(K,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(oa,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(J,sa);this.addKeyHandler(ia,+sa);this.addKeyHandler(Z,sa);this.addKeyHandler(V,sa);this.addKeyHandler(K,sa);this.addKeyHandler(oa,sa);d.getModel().addListener(mxEvent.CHANGE,sa);this.listeners.push({destroy:function(){d.getModel().removeListener(sa)}});sa();return a};StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps){a.style.padding="2px 0px 24px 14px";var h=document.createElement("div");h.style.position="absolute";h.style.maxWidth="78px";h.style.overflow="hidden";h.style.textOverflow="ellipsis";mxUtils.write(h,mxResources.get("lineJumps"));a.appendChild(h);var d=document.createElement("select");d.style.position="absolute";d.style.height="21px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.textAlign="center";d.style.right="84px";d.style.width="64px";d.style.borderWidth="1px";d.style.borderStyle="solid";h=["none","arc","gap","sharp","line"];for(var g=0;g<h.length;g++){var m=document.createElement("option");m.setAttribute("value",h[g]);mxUtils.write(m,mxResources.get(h[g]));d.appendChild(m)}mxEvent.addListener(d,"change",function(w){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(w)});mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=@@ -3271,21 +3271,21 @@ DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.gd.setAttribute("value","simple");m.appendChild(d);d=document.createElement("option");d.setAttribute("title",mxResources.get("none"));mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));d.setAttribute("value","none");m.appendChild(d);m.value=null==e.adaptiveColors?"default":e.adaptiveColors;mxEvent.addListener(m,"change",function(){var C=new ChangePageSetup(b);C.ignoreColor=!0;C.ignoreImage=!0;C.adaptiveColors=m.value;e.model.execute(C)});h.appendChild(m);if(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d=b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"),d.style.position="absolute",d.style.left="196px",h.appendChild(d);a.appendChild(h)}h=document.createElement("table");h.style.width="204px";d=document.createElement("tbody");g=document.createElement("tr");g.style.padding="0px";var p=document.createElement("td");p.style.textAlign="center";p.style.padding="2px";p.style.width="50%";for(var k=p.cloneNode(!0),u=this.getGlobalStyleButtons(),w=0;w<u.length;w+=2){var z=u[w];z.style.height="22px";z.style.width="88px";p.appendChild(z);g.appendChild(p);z=u[w+1];null!=z&&(z.style.height="22px",z.style.width="88px",k.appendChild(z));g.appendChild(k);d.appendChild(g);p=p.cloneNode(!1);k=k.cloneNode(!1);g=g.cloneNode(!1)}h.appendChild(d);f.appendChild(h);a.appendChild(f);e.isEnabled()&&this.addGraphStyles(a);return a};-DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),h=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";a.style.paddingLeft="18px";a.style.paddingTop="6px";var g=mxUtils.bind(this,function(Y,P){var T=e.getVerticesAndEdges();f.beginUpdate();try{for(var J=0;J<T.length;J++){var V=e.getCellStyle(T[J]);p||null==V.labelBackgroundColor?p&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},-[T[J]]):e.updateCellStyles({labelBackgroundColor:null!=P?P.background:null},[T[J]]);for(var Z=f.isEdge(T[J]),ia=f.getStyle(T[J]),oa=Z?e.currentEdgeStyle:e.currentVertexStyle,sa=0;sa<Y.length;sa++)if(null!=V[Y[sa]]&&V[Y[sa]]!=mxConstants.NONE||Y[sa]!=mxConstants.STYLE_FILLCOLOR&&Y[sa]!=mxConstants.STYLE_STROKECOLOR)ia=p&&Z&&Y[sa]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(ia,Y[sa],"default"):mxUtils.setStyle(ia,Y[sa],oa[Y[sa]]);f.setStyle(T[J],ia)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(Y,-P,T){if(null!=Y)for(var J=0;J<P.length;J++)if(null!=Y[P[J]]&&Y[P[J]]!=mxConstants.NONE||P[J]!=mxConstants.STYLE_FILLCOLOR&&P[J]!=mxConstants.STYLE_STROKECOLOR)Y[P[J]]=T[P[J]]}),p=!0,k=mxUtils.bind(this,function(Y,P,T,J,V){if(null!=Y){null!=T&&(p||null==P.labelBackgroundColor?p&&(P.labelBackgroundColor=mxConstants.NONE):(J=null!=J?J.background:null,V=null!=V?V:e,null==J&&(J=V.background),null==J&&(J=V.defaultPageBackgroundColor),P.labelBackgroundColor=J));for(var Z in Y)if(null==T||null!=P[Z]&&P[Z]!=-mxConstants.NONE||Z!=mxConstants.STYLE_FILLCOLOR&&Z!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&Z==mxConstants.STYLE_FONTCOLOR?P[Z]="default":P[Z]=Y[Z]}}),u=mxUtils.bind(this,function(Y,P,T,J,V){var Z=document.createElement("div");Z.style.position="absolute";Z.style.display="inline-block";Z.style.overflow="hidden";Z.style.pointerEvents="none";Z.style.width="100%";Z.style.height="100%";V.appendChild(Z);var ia=new Graph(Z,null,null,e.getStylesheet());ia.shapeBackgroundColor="light-dark(#f1f3f4, "+-Editor.darkColor+")";ia.resetViewOnRootChange=!1;ia.foldingEnabled=!1;ia.gridEnabled=!1;ia.autoScroll=!1;ia.setTooltips(!1);ia.setConnectable(!1);ia.setPanning(!1);ia.setEnabled(!1);ia.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(e.getCellStyle.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,J,ia);k(ca,ba,O,J,ia);X&&(ba=e.postProcessCellStyle(O,ba));return ba};ia.model.beginUpdate();+DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),h=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";a.style.paddingLeft="18px";a.style.paddingTop="6px";var g=mxUtils.bind(this,function(Y,P){var T=e.getVerticesAndEdges();f.beginUpdate();try{for(var K=0;K<T.length;K++){var V=e.getCellStyle(T[K]);p||null==V.labelBackgroundColor?p&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},+[T[K]]):e.updateCellStyles({labelBackgroundColor:null!=P?P.background:null},[T[K]]);for(var Z=f.isEdge(T[K]),ia=f.getStyle(T[K]),oa=Z?e.currentEdgeStyle:e.currentVertexStyle,sa=0;sa<Y.length;sa++)if(null!=V[Y[sa]]&&V[Y[sa]]!=mxConstants.NONE||Y[sa]!=mxConstants.STYLE_FILLCOLOR&&Y[sa]!=mxConstants.STYLE_STROKECOLOR)ia=p&&Z&&Y[sa]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(ia,Y[sa],"default"):mxUtils.setStyle(ia,Y[sa],oa[Y[sa]]);f.setStyle(T[K],ia)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(Y,+P,T){if(null!=Y)for(var K=0;K<P.length;K++)if(null!=Y[P[K]]&&Y[P[K]]!=mxConstants.NONE||P[K]!=mxConstants.STYLE_FILLCOLOR&&P[K]!=mxConstants.STYLE_STROKECOLOR)Y[P[K]]=T[P[K]]}),p=!0,k=mxUtils.bind(this,function(Y,P,T,K,V){if(null!=Y){null!=T&&(p||null==P.labelBackgroundColor?p&&(P.labelBackgroundColor=mxConstants.NONE):(K=null!=K?K.background:null,V=null!=V?V:e,null==K&&(K=V.background),null==K&&(K=V.defaultPageBackgroundColor),P.labelBackgroundColor=K));for(var Z in Y)if(null==T||null!=P[Z]&&P[Z]!=+mxConstants.NONE||Z!=mxConstants.STYLE_FILLCOLOR&&Z!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&Z==mxConstants.STYLE_FONTCOLOR?P[Z]="default":P[Z]=Y[Z]}}),u=mxUtils.bind(this,function(Y,P,T,K,V){var Z=document.createElement("div");Z.style.position="absolute";Z.style.display="inline-block";Z.style.overflow="hidden";Z.style.pointerEvents="none";Z.style.width="100%";Z.style.height="100%";V.appendChild(Z);var ia=new Graph(Z,null,null,e.getStylesheet());ia.shapeBackgroundColor="light-dark(#f1f3f4, "++Editor.darkColor+")";ia.resetViewOnRootChange=!1;ia.foldingEnabled=!1;ia.gridEnabled=!1;ia.autoScroll=!1;ia.setTooltips(!1);ia.setConnectable(!1);ia.setPanning(!1);ia.setEnabled(!1);ia.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(e.getCellStyle.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,K,ia);k(ca,ba,O,K,ia);X&&(ba=e.postProcessCellStyle(O,ba));return ba};ia.model.beginUpdate();try{var oa=ia.insertVertex(ia.getDefaultParent(),null,"Shape",14,8,70,36,"strokeWidth=2;"),sa=ia.insertEdge(ia.getDefaultParent(),null,"Connector",oa,oa,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");sa.geometry.points=[new mxPoint(32,66)];sa.geometry.offset=new mxPoint(0,8)}finally{ia.model.endUpdate()}V=ia.view.getDrawPane().ownerSVGElement;null!=V&&(Z=V.cloneNode(!0),Z.style.position="absolute",Z.style.clipPath="rect(0 52% 100% 0)",V.style.clipPath=-"rect(0 100% 100% 51%)",V.style.colorScheme="light",V.parentNode.appendChild(Z))}),w=document.createElement("div");w.style.position="relative";w.style.width="210px";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(Y,P,T,J,V){var Z=this.format.cachedStyleEntries[V];null==Z&&(Z=document.createElement("div"),Z.className="geItem",Z.style.position="relative",Z.style.width="96px",Z.style.height="86px",Z.style.cursor="pointer",Z.style.border=-"1px solid gray",Z.style.borderRadius="8px",Z.style.margin="1px 2px",Z.style.overflow="hidden",p||null==J||null==J.background||(Z.style.backgroundColor=J.background),u(Y,P,T,J,Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ia){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(Y,e.currentVertexStyle);k(Y,e.currentEdgeStyle);k(P,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var oa=d.slice(),sa;for(sa in Y)oa.push(sa);-g(oa,J);if(!p){var O=new ChangePageSetup(b,null!=J?J.background:null);O.ignoreImage=!0;f.execute(O);f.execute(new ChangeGridColor(b,null!=J&&null!=J.gridColor?J.gridColor:h))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(Z,mxUtils.bind(this,function(ia){Z.style.opacity=.5}),null,mxUtils.bind(this,function(ia){Z.style.opacity=1})),mxEvent.addListener(Z,"mouseenter",mxUtils.bind(this,function(ia){var oa=e.getCellStyle;ia=e.background;var sa=e.view.gridColor;p||(e.background=null!=J?J.background:-null,e.view.gridColor=null!=J&&null!=J.gridColor?J.gridColor:h);e.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(oa.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,J);k(ca,ba,O,J);X&&(ba=this.postProcessCellStyle(O,ba));return ba};e.refresh();e.getCellStyle=oa;e.background=ia;e.view.gridColor=sa;Z.style.border="2px solid blue";Z.style.margin="0px 1px"})),mxEvent.addListener(Z,"mouseleave",+"rect(0 100% 100% 51%)",V.style.colorScheme="light",V.parentNode.appendChild(Z))}),w=document.createElement("div");w.style.position="relative";w.style.width="210px";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(Y,P,T,K,V){var Z=this.format.cachedStyleEntries[V];null==Z&&(Z=document.createElement("div"),Z.className="geItem",Z.style.position="relative",Z.style.width="96px",Z.style.height="86px",Z.style.cursor="pointer",Z.style.border=+"1px solid gray",Z.style.borderRadius="8px",Z.style.margin="1px 2px",Z.style.overflow="hidden",p||null==K||null==K.background||(Z.style.backgroundColor=K.background),u(Y,P,T,K,Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ia){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(Y,e.currentVertexStyle);k(Y,e.currentEdgeStyle);k(P,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var oa=d.slice(),sa;for(sa in Y)oa.push(sa);+g(oa,K);if(!p){var O=new ChangePageSetup(b,null!=K?K.background:null);O.ignoreImage=!0;f.execute(O);f.execute(new ChangeGridColor(b,null!=K&&null!=K.gridColor?K.gridColor:h))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(Z,mxUtils.bind(this,function(ia){Z.style.opacity=.5}),null,mxUtils.bind(this,function(ia){Z.style.opacity=1})),mxEvent.addListener(Z,"mouseenter",mxUtils.bind(this,function(ia){var oa=e.getCellStyle;ia=e.background;var sa=e.view.gridColor;p||(e.background=null!=K?K.background:+null,e.view.gridColor=null!=K&&null!=K.gridColor?K.gridColor:h);e.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(oa.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,K);k(ca,ba,O,K);X&&(ba=this.postProcessCellStyle(O,ba));return ba};e.refresh();e.getCellStyle=oa;e.background=ia;e.view.gridColor=sa;Z.style.border="2px solid blue";Z.style.margin="0px 1px"})),mxEvent.addListener(Z,"mouseleave",mxUtils.bind(this,function(ia){Z.style.border="1px solid gray";Z.style.margin="1px 2px";e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[V]=Z));w.appendChild(Z)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");for(var Y=10*this.format.currentStylePage;Y<Math.min(10*(this.format.currentStylePage+-1),Editor.styles.length);Y++){var P=Editor.styles[Y];z(P.commonStyle,P.vertexStyle,P.edgeStyle,P.graph,Y)}}),G=mxUtils.bind(this,function(Y){0<=Y&&Y<C&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=Y,D())});if(1<C){var K=document.createElement("div");K.style.whiteSpace="nowrap";K.style.position="relative";K.style.textAlign="center";K.style.paddingTop="4px";K.style.width="210px";for(var L=0;L<C;L++){var Q=document.createElement("div");Q.style.display=-"inline-block";Q.style.width="6px";Q.style.height="6px";Q.style.marginLeft="4px";Q.style.marginRight="3px";Q.style.borderRadius="3px";Q.style.cursor="pointer";Q.style.background="transparent";Q.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Y,P){mxEvent.addListener(Q,"click",mxUtils.bind(this,function(){G(Y)}))})(L,Q);K.appendChild(Q);E.push(Q)}a.appendChild(K);D();if(15>C){L=function(Y){mxEvent.addListener(Y,"mouseenter",function(){Y.style.opacity="1"});mxEvent.addListener(Y,"mouseleave",+1),Editor.styles.length);Y++){var P=Editor.styles[Y];z(P.commonStyle,P.vertexStyle,P.edgeStyle,P.graph,Y)}}),G=mxUtils.bind(this,function(Y){0<=Y&&Y<C&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=Y,D())});if(1<C){var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.position="relative";J.style.textAlign="center";J.style.paddingTop="4px";J.style.width="210px";for(var L=0;L<C;L++){var Q=document.createElement("div");Q.style.display=+"inline-block";Q.style.width="6px";Q.style.height="6px";Q.style.marginLeft="4px";Q.style.marginRight="3px";Q.style.borderRadius="3px";Q.style.cursor="pointer";Q.style.background="transparent";Q.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Y,P){mxEvent.addListener(Q,"click",mxUtils.bind(this,function(){G(Y)}))})(L,Q);J.appendChild(Q);E.push(Q)}a.appendChild(J);D();if(15>C){L=function(Y){mxEvent.addListener(Y,"mouseenter",function(){Y.style.opacity="1"});mxEvent.addListener(Y,"mouseleave",function(){Y.style.opacity="0.5"})};var N=document.createElement("div");N.className="geAdaptiveAsset";N.style.position="absolute";N.style.left="0px";N.style.top="0px";N.style.bottom="0px";N.style.width="24px";N.style.height="24px";N.style.margin="0px";N.style.cursor="pointer";N.style.opacity="0.5";N.style.backgroundRepeat="no-repeat";N.style.backgroundPosition="center center";N.style.backgroundSize="24px 24px";N.style.backgroundImage="url("+Editor.previousImage+")";var U=N.cloneNode(!1);U.style.backgroundImage=-"url("+Editor.nextImage+")";U.style.left="";U.style.right="2px";K.appendChild(N);K.appendChild(U);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(U,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}));L(N);L(U)}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);+"url("+Editor.nextImage+")";U.style.left="";U.style.right="2px";J.appendChild(N);J.appendChild(U);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(U,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}));L(N);L(U)}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),h=f.getElementsByTagName("input")[0];null!=h&&(h.style.visibility=null!=e.backgroundImage?@@ -3303,9 +3303,9 @@ null,null,p,!0,m);p.style.padding="6px 0 0 0";p.appendChild(d);p.appendChild(g);DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var f=PageSetupDialog.addPageFormatPanel(a,"formatpanel",e.pageFormat,function(d){if(null==e.pageFormat||e.pageFormat.width!=d.width||e.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,e.model.execute(d)});this.addKeyHandler(f.widthInput,function(){f.set(e.pageFormat)});this.addKeyHandler(f.heightInput,function(){f.set(e.pageFormat)});var h=function(){f.set(e.pageFormat)};b.addListener("pageFormatChanged",h);this.listeners.push({destroy:function(){b.removeListener(h)}});e.getModel().addListener(mxEvent.CHANGE,h);this.listeners.push({destroy:function(){e.getModel().removeListener(h)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function h(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function g(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}-function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function K(){mxActor.call(this)}function L(){mxActor.call(this)}function Q(){mxActor.call(this)}function N(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function P(){mxActor.call(this)}function T(c,l){this.canvas=c;this.canvas.setLineJoin("round");+function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function J(){mxActor.call(this)}function L(){mxActor.call(this)}function Q(){mxActor.call(this)}function N(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function P(){mxActor.call(this)}function T(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,T.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,T.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,T.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,T.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,-T.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,T.prototype.arcTo)}function J(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function ia(){mxActor.call(this)}function oa(){mxActor.call(this)}function sa(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function da(){mxShape.call(this)}function ca(){mxEllipse.call(this)}+T.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,T.prototype.arcTo)}function K(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function ia(){mxActor.call(this)}function oa(){mxActor.call(this)}function sa(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function da(){mxShape.call(this)}function ca(){mxEllipse.call(this)}function H(){mxShape.call(this)}function ea(){mxShape.call(this)}function ra(){mxRectangleShape.call(this)}function qa(){mxShape.call(this)}function Pa(){mxShape.call(this)}function ma(){mxShape.call(this)}function Ba(){mxShape.call(this)}function Ca(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Ia(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function La(){mxArrowConnector.call(this);this.spacing=0}function Xa(){mxArrowConnector.call(this);this.spacing=0}function Ya(){mxActor.call(this)}function cb(){mxRectangleShape.call(this)}function fb(){mxActor.call(this)}function pb(){mxActor.call(this)}function gb(){mxActor.call(this)}function ab(){mxActor.call(this)}function ib(){mxActor.call(this)}function eb(){mxActor.call(this)}function q(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function M(){mxEllipse.call(this)}function R(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}function ha(){mxRhombus.call(this)}function fa(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function ya(){mxActor.call(this)}function Ha(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=@@ -3334,8 +3334,8 @@ r),c.arcTo(y,y,0,0,1,0,r-y)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection",null);x||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,r-15),c.lineTo(n-20,r-15),-c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*r-5),c.lineTo(15,.5*r+5),c.moveTo(15,.5*r-5),c.lineTo(5,.5*r+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(K,-mxActor);K.prototype.size=30;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",K);mxUtils.extend(L,mxActor);L.prototype.size=+c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*r-5),c.lineTo(15,.5*r+5),c.moveTo(15,.5*r-5),c.lineTo(5,.5*r+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(J,+mxActor);J.prototype.size=30;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",J);mxUtils.extend(L,mxActor);L.prototype.size=.4;L.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};L.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),t=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",L);mxUtils.extend(Q,mxActor);Q.prototype.size=.3;Q.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};Q.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",Q);var Ua=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ua.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=@@ -3353,10 +3353,10 @@ arguments);this.lastX=c;this.lastY=l};T.prototype.destroy=function(){this.canvasmxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new T(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};var ub=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=T)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(n/2,Math.min(r/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(n*v,r*v)),c.moveTo(l+-v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(J,mxRectangleShape);J.prototype.size=.1;J.prototype.fixedSize=!1;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};J.prototype.paintForeground=+v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(K,mxRectangleShape);K.prototype.size=.1;K.prototype.fixedSize=!1;K.prototype.isHtmlAllowed=function(){return!1};K.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};K.prototype.paintForeground=function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,-arguments)};mxCellRenderer.registerShape("process",J);mxCellRenderer.registerShape("process2",J);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};V.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(Z,mxHexagon);Z.prototype.size=30;Z.prototype.position=.5;Z.prototype.position2=.5;Z.prototype.base=20;Z.prototype.getLabelMargins=function(){return new mxRectangle(0,+arguments)};mxCellRenderer.registerShape("process",K);mxCellRenderer.registerShape("process2",K);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};V.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(Z,mxHexagon);Z.prototype.size=30;Z.prototype.position=.5;Z.prototype.position2=.5;Z.prototype.base=20;Z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),I=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+I),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",Z);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",@@ -3497,7 +3497,7 @@ mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(hb(c,t/2))}l.mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var x=[],I=0;I<v.length;I++)v[I]!=c.cell&&r.isSwimlane(v[I])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[I]))==n&&x.push(v[I]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:lb(),ext:lb(),rectangle:lb(),triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,["width","height"],function(l){var t=Math.max(qa.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",qa.prototype.width))),n=Math.max(1.5*qa.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",qa.prototype.height)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(qa.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*qa.prototype.corner,Math.min(l.height,t.y-l.y)))},-!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,+!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l},cross:function(c){return[Ta(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ya.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-t)},function(l,t){var n=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},note2:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[Ta(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));@@ -3514,7 +3514,7 @@ folder:function(c){return[Ta(c,["tabWidth","tabHeight"],function(l){var t=Math.m!1)]},tape:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Ta(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(z.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,-n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:tb(oa.prototype.size,!0,.5,!0,oa.prototype.fixedSize),curlyBracket:tb(Y.prototype.size,!1),display:tb(Ha.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,K.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:yb(1,N.prototype.size,+n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:tb(oa.prototype.size,!0,.5,!0,oa.prototype.fixedSize),curlyBracket:tb(Y.prototype.size,!1),display:tb(Ha.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,J.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:yb(1,N.prototype.size,N.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=Sa[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=Sa[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=Sa[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var $a=new mxPoint(1,0),kb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);$a=mxUtils.getRotatedPoint($a,Math.cos(ob),Math.sin(ob));var Za=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(Za),Math.sin(Za));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,I=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==I&&null!=l&&(I=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var y=$a.x,aa=$a.y,S=kb.x,Fa=kb.y,Ra="horizontal"==@@ -3529,7 +3529,7 @@ t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));l>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))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,-0),!1));return c};K.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,+0),!1));return c};J.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};f.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};C.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,@@ -3577,8 +3577,8 @@ d.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1null})}).isEnabled=g;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=g;this.addAction("saveAs...",function(){f.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(f);f.showDialog(k.container,620,420,!0,!1);k.init()}).isEnabled=g;this.addAction("pageSetup...",function(){f.showDialog((new PageSetupDialog(f)).container,320,240,!0,!0)}).isEnabled=g;this.addAction("print...",function(){f.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){f.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){f.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var k=null;try{k=f.copyXml(),null!=k&&d.removeCells(k,!1)}catch(u){}try{null==k&&mxClipboard.cut(d)}catch(u){f.handleError(u)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){f.handleError(k)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(u){if(null!=u){d.getModel().beginUpdate();try{f.pasteXml(u,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),-k=!0)}catch(u){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function u(z){if(null!=z){for(var C=!0,E=0;E<z.length&&C;E++)C=C&&d.model.isEdge(z[E]);var D=d.view.translate;E=d.view.scale;var G=D.x,K=D.y;D=null;if(1==z.length&&C){var L=d.getCellGeometry(z[0]);null!=L&&(D=L.getTerminalPoint(!0))}D=null!=D?D:d.getBoundingBoxFromGeometry(z,C);null!=D&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/E-G)),E=Math.round(d.snap(d.popupMenuHandler.triggerY/-E-K)),d.cellsMoved(z,C-D.x,E-D.y))}}function w(){d.getModel().beginUpdate();try{u(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(z){if(null!=z){d.getModel().beginUpdate();try{u(f.pasteXml(z,!0))}finally{d.getModel().endUpdate()}}else w()}),k=!0)}catch(z){}k||w()}});this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],+k=!0)}catch(u){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function u(z){if(null!=z){for(var C=!0,E=0;E<z.length&&C;E++)C=C&&d.model.isEdge(z[E]);var D=d.view.translate;E=d.view.scale;var G=D.x,J=D.y;D=null;if(1==z.length&&C){var L=d.getCellGeometry(z[0]);null!=L&&(D=L.getTerminalPoint(!0))}D=null!=D?D:d.getBoundingBoxFromGeometry(z,C);null!=D&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/E-G)),E=Math.round(d.snap(d.popupMenuHandler.triggerY/+E-J)),d.cellsMoved(z,C-D.x,E-D.y))}}function w(){d.getModel().beginUpdate();try{u(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(z){if(null!=z){d.getModel().beginUpdate();try{u(f.pasteXml(z,!0))}finally{d.getModel().endUpdate()}}else w()}),k=!0)}catch(z){}k||w()}});this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var w=d.getCellGeometry(k[u]);null!=w&&(w=w.clone(),w.width=f.copiedSize.width,w.height=f.copiedSize.height,d.getModel().setGeometry(k[u],w))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(E,D){var G=z.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||D.setAttribute("placeholders",G.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));z.setValue(E,D)}k=null!=u?u:k;var z=@@ -3628,9 +3628,9 @@ k[u];d.getModel().isEdge(w)&&(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[w])null!=z&&(z=z.clone(),z.points=null,z.x=0,z.y=0,z.offset=null,d.getModel().setGeometry(w,z))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",z=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,z=u.style[mxConstants.STYLE_CLIP_PATH]||z);var C=d.cellEditor.saveSelection();-f.showImageDialog(k,w,function(E,D,G,K,L,Q){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(E,D,G);else{var N=d.getSelectionCells();if(null!=E&&(0<E.length||0<N.length)){var U=null;d.getModel().beginUpdate();try{if(0==N.length){N=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var Y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=Y.x;N[0].geometry.y=-Y.y;null!=K&&e(N[0],K,L,Q,d);U=N;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,N);var P=d.getCurrentCellStyle(N[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==K&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,N);if(null!=D&&null!=G)for(E=0;E<N.length;E++){var T=N[E];if("0"!=d.getCurrentCellStyle(T).expand){var J=-d.getModel().getGeometry(T);null!=J&&(J=J.clone(),J.width=D,J.height=G,d.getModel().setGeometry(T,J))}null!=K&&e(T,K,L,Q,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=g;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];+f.showImageDialog(k,w,function(E,D,G,J,L,Q){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(E,D,G);else{var N=d.getSelectionCells();if(null!=E&&(0<E.length||0<N.length)){var U=null;d.getModel().beginUpdate();try{if(0==N.length){N=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var Y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=Y.x;N[0].geometry.y=+Y.y;null!=J&&e(N[0],J,L,Q,d);U=N;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,N);var P=d.getCurrentCellStyle(N[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==J&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,N);if(null!=D&&null!=G)for(E=0;E<N.length;E++){var T=N[E];if("0"!=d.getCurrentCellStyle(T).expand){var K=+d.getModel().getGeometry(T);null!=K&&(K=K.clone(),K.width=D,K.height=G,d.getModel().setGeometry(T,K))}null!=J&&e(T,J,L,Q,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=g;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];w&&"image"==z&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(C,E,D){e(k,C,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=g;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),@@ -3673,13 +3673,13 @@ w&&0<w.length&&(e.scrollCellToVisible(w[0]),e.setSelectionCells(w))}),b):(m&&(b=b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=f)try{g?e.deleteLane(f):e.deleteTableColumn(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteColumn"))),p&&(b=a.addItem(mxResources.get("insertRowBefore"),Editor.addRowAboveImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!0):e.insertTableRow(f,!0)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),Editor.addRowBelowImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!1):e.insertTableRow(f,!1)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),Editor.removeRowImage,mxUtils.bind(this,function(){try{g?e.deleteLane(f):e.deleteTableRow(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteRow")),p=this.editorUi.getSelectionState(),null!=p.mergeCell?this.addMenuItem(a,"mergeCells"):(1<p.style.colspan||1<p.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};-Menus.prototype.addInsertTableItem=function(a,b,e,f){function h(C){m=d.getParentByName(mxEvent.getSource(C),"TD");var E=!1;if(null!=m){g=d.getParentByName(m,"TR");var D=mxEvent.isMouseEvent(C)?2:4,G=w,K=Math.min(20,g.sectionRowIndex+D);D=Math.min(20,m.cellIndex+D);for(var L=G.rows.length;L<K;L++)for(var Q=G.insertRow(L),N=0;N<G.rows[0].cells.length;N++)Q.insertCell(-1);for(L=0;L<G.rows.length;L++)for(Q=G.rows[L],N=Q.cells.length;N<D;N++)Q.insertCell(-1);z.innerHTML=m.cellIndex+1+"x"+(g.sectionRowIndex+-1);for(G=0;G<w.rows.length;G++)for(K=w.rows[G],D=0;D<K.cells.length;D++)L=K.cells[D],G==g.sectionRowIndex&&D==m.cellIndex&&(E="blue"==L.style.backgroundColor),L.style.backgroundColor=G<=g.sectionRowIndex&&D<=m.cellIndex?"blue":"transparent"}mxEvent.consume(C);return E}f=null!=f?f:!0;b=null!=b?b:mxUtils.bind(this,function(C,E,D){var G=this.editorUi.editor.graph;if(null!=G.getParentByName(mxEvent.getSource(C),"TD")&&null!=G.cellEditor.textarea){var K=G.cellEditor.textarea.getElementsByTagName("table");-C=[];for(var L=0;L<K.length;L++)C.push(K[L]);G.container.focus();L=G.pasteHtmlAtCaret;K=["<table>"];for(var Q=0;Q<E;Q++){K.push("<tr>");for(var N=0;N<D;N++)K.push("<td><br></td>");K.push("</tr>")}K.push("</table>");E=K.join("");L.call(G,E);E=G.cellEditor.textarea.getElementsByTagName("table");if(E.length==C.length+1)for(L=E.length-1;0<=L;L--)if(0==L||E[L]!=C[L-1]){G.selectNode(E[L].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,g=null,m=null;null==e&&(a.div.className+=" geToolbarMenu",+Menus.prototype.addInsertTableItem=function(a,b,e,f){function h(C){m=d.getParentByName(mxEvent.getSource(C),"TD");var E=!1;if(null!=m){g=d.getParentByName(m,"TR");var D=mxEvent.isMouseEvent(C)?2:4,G=w,J=Math.min(20,g.sectionRowIndex+D);D=Math.min(20,m.cellIndex+D);for(var L=G.rows.length;L<J;L++)for(var Q=G.insertRow(L),N=0;N<G.rows[0].cells.length;N++)Q.insertCell(-1);for(L=0;L<G.rows.length;L++)for(Q=G.rows[L],N=Q.cells.length;N<D;N++)Q.insertCell(-1);z.innerHTML=m.cellIndex+1+"x"+(g.sectionRowIndex++1);for(G=0;G<w.rows.length;G++)for(J=w.rows[G],D=0;D<J.cells.length;D++)L=J.cells[D],G==g.sectionRowIndex&&D==m.cellIndex&&(E="blue"==L.style.backgroundColor),L.style.backgroundColor=G<=g.sectionRowIndex&&D<=m.cellIndex?"blue":"transparent"}mxEvent.consume(C);return E}f=null!=f?f:!0;b=null!=b?b:mxUtils.bind(this,function(C,E,D){var G=this.editorUi.editor.graph;if(null!=G.getParentByName(mxEvent.getSource(C),"TD")&&null!=G.cellEditor.textarea){var J=G.cellEditor.textarea.getElementsByTagName("table");+C=[];for(var L=0;L<J.length;L++)C.push(J[L]);G.container.focus();L=G.pasteHtmlAtCaret;J=["<table>"];for(var Q=0;Q<E;Q++){J.push("<tr>");for(var N=0;N<D;N++)J.push("<td><br></td>");J.push("</tr>")}J.push("</table>");E=J.join("");L.call(G,E);E=G.cellEditor.textarea.getElementsByTagName("table");if(E.length==C.length+1)for(L=E.length-1;0<=L;L--)if(0==L||E[L]!=C[L-1]){G.selectNode(E[L].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,g=null,m=null;null==e&&(a.div.className+=" geToolbarMenu",a.labels=!1);a=a.addItem("",null,null,e,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";e=a.getElementsByTagName("td");1<e.length&&(e[1].style.display="none",e[2].style.display="none");a.firstChild.innerText="";var p=document.createElement("input");p.setAttribute("id","geTitleOption");p.setAttribute("type","checkbox");p.style.verticalAlign="middle";e=document.createElement("label");mxUtils.write(e,mxResources.get("title"));e.setAttribute("for","geTitleOption");e.style.verticalAlign="middle";mxEvent.addGestureListeners(e,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));var k=document.createElement("input");k.setAttribute("id","geContainerOption");k.setAttribute("type","checkbox");k.style.verticalAlign="middle";var u=document.createElement("label");mxUtils.write(u,mxResources.get("container"));u.setAttribute("for","geContainerOption");u.style.verticalAlign="middle";mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));f&&(a.firstChild.appendChild(p),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(k),a.firstChild.appendChild(u),mxUtils.br(a.firstChild));var w=function(C,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse=-"collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var G=0;G<C;G++)for(var K=D.insertRow(G),L=0;L<E;L++)K.insertCell(-1);return D}(5,5);a.firstChild.appendChild(w);var z=document.createElement("div");z.style.textAlign="center";z.style.padding="4px";z.style.width="100%";z.innerHTML="1x1";a.firstChild.appendChild(z);mxEvent.addGestureListeners(w,null,null,mxUtils.bind(this,function(C){var E=h(C);null!=m&&null!=g&&E&&(b(C,g.sectionRowIndex++"collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var G=0;G<C;G++)for(var J=D.insertRow(G),L=0;L<E;L++)J.insertCell(-1);return D}(5,5);a.firstChild.appendChild(w);var z=document.createElement("div");z.style.textAlign="center";z.style.padding="4px";z.style.width="100%";z.innerHTML="1x1";a.firstChild.appendChild(z);mxEvent.addGestureListeners(w,null,null,mxUtils.bind(this,function(C){var E=h(C);null!=m&&null!=g&&E&&(b(C,g.sectionRowIndex+1,m.cellIndex+1,p.checked,k.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(w,"mouseover",h)};Menus.prototype.edgeStyleChange=function(a,b,e,f,h,d,g,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var z=k[w];if(p.getModel().isEdge(z)){if(g){var C=p.getCellGeometry(z);null!=C&&(C=C.clone(),C.points=null,p.getModel().setGeometry(z,C))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[z]);u.push(z)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","cells",u,"keys",e,"values",f,"force",0==k.length))}finally{p.getModel().endUpdate()}}),d,h))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};@@ -3752,15 +3752,15 @@ Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var e=document.createElement("div");null!=a&&"data:"==a.substring(0,5)&&(e.className="geAdaptiveAsset",e.style.backgroundImage="url("+a+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="18px",e.style.width="22px",e.style.height="20px");b.appendChild(e);return b};Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b};Toolbar.prototype.addMenuHandler=function(a,b,e,f){if(null!=e){var h=this.editorUi.editor.graph,d=null,g=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(m){if(g&&(null==a.enabled||a.enabled)){h.popupMenuHandler.hideMenu();d=new mxPopupMenu(e);d.smartSeparators=!0;d.div.className+=" geToolbarMenu";d.showDisabled=f;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,-arguments);this.editorUi.resetCurrentMenu();d.destroy()});var p=mxUtils.getOffset(a);d.popup(p.x,p.y+a.offsetHeight,null,m);this.editorUi.setCurrentMenu(d,a)}g=!0;mxEvent.consume(m)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){g=null==d||null==d.div||null==d.div.parentNode;m.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,D,G){if(null==E)return[G,G,G];var K=Math.floor(E),-L=G*(1-D);E=G*(1-D*(K%2?E-K:1-(E-K)));switch(K){case 6:case 0:return[G,E,L];case 1:return[E,G,L];case 2:return[L,G,E];case 3:return[L,E,G];case 4:return[E,L,G];case 5:return[G,L,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage++arguments);this.editorUi.resetCurrentMenu();d.destroy()});var p=mxUtils.getOffset(a);d.popup(p.x,p.y+a.offsetHeight,null,m);this.editorUi.setCurrentMenu(d,a)}g=!0;mxEvent.consume(m)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){g=null==d||null==d.div||null==d.div.parentNode;m.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,D,G){if(null==E)return[G,G,G];var J=Math.floor(E),+L=G*(1-D);E=G*(1-D*(J%2?E-J:1-(E-J)));switch(J){case 6:case 0:return[G,E,L];case 1:return[E,G,L];case 2:return[L,G,E];case 3:return[L,E,G];case 4:return[E,L,G];case 5:return[G,L,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+")";e.style.position="absolute";e.style.overflow="hidden";e.style.cursor="crosshair";e.style.width="181px";e.style.height="101px";e.style.left="6px";e.style.top="4px";var f=document.createElement("div");f.style.background="url("+this.crossImage+")";f.style.pointerEvents="none";f.style.position="absolute";f.style.width="15px";f.style.height="15px";f.style.left="-8px";f.style.top="-8px";var h=[0,0,1];e.appendChild(f);b.appendChild(e);sliderBox=document.createElement("div");sliderBox.style.position="absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var d=document.createElement("div");d.style.border="1px solid light-dark(black, white)";d.style.pointerEvents="none";d.style.overflow="hidden";d.style.position="absolute";d.style.width="16px";d.style.height="101px";d.style.left="9px";d.style.top="0px";var g=!1,m=!1,p=mxUtils.bind(this,function(E){var D=Math.round(100*(1-h[1]));f.style.left=-Math.round(h[0]/6*180)-8+"px";f.style.top=D-8+"px";D=d.childNodes;for(var G=a(h[0],h[1],1),K=0;K<D.length;K++)D[K].style.backgroundColor="rgb("+G[0]*(1-K/D.length)*255+", "+G[1]*(1-K/D.length)*255+", "+G[2]*(1-K/D.length)*255+")";C.style.top=Math.round(100*(1-h[2]))-4+"px";D=a(h[0],h[1],h[2]);D="#"+("0"+Math.round(255*D[0]).toString(16)).slice(-2)+("0"+Math.round(255*D[1]).toString(16)).slice(-2)+("0"+Math.round(255*D[2]).toString(16)).slice(-2);1!=E&&this.fireEvent(new mxEventObject("change","color",+Math.round(h[0]/6*180)-8+"px";f.style.top=D-8+"px";D=d.childNodes;for(var G=a(h[0],h[1],1),J=0;J<D.length;J++)D[J].style.backgroundColor="rgb("+G[0]*(1-J/D.length)*255+", "+G[1]*(1-J/D.length)*255+", "+G[2]*(1-J/D.length)*255+")";C.style.top=Math.round(100*(1-h[2]))-4+"px";D=a(h[0],h[1],h[2]);D="#"+("0"+Math.round(255*D[0]).toString(16)).slice(-2)+("0"+Math.round(255*D[1]).toString(16)).slice(-2)+("0"+Math.round(255*D[2]).toString(16)).slice(-2);1!=E&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(D)))}),k=mxUtils.bind(this,function(E){0==h[2]&&(h[2]=1);g=!0;w(E)}),u=mxUtils.bind(this,function(E){m=!0;w(E)}),w=mxUtils.bind(this,function(E){if(g){var D=e.getBoundingClientRect(),G=mxEvent.getClientX(E)-D.left;E=mxEvent.getClientY(E)-D.top;f.style.left=G-8+"px";f.style.top=E-8+"px";G*=6/180;E=1-E/100;D=void 0;0>G&&(G=0);6<G&&(G=6);0>E&&(E=0);1<E&&(E=1);0>D&&(D=0);1<D&&(D=1);G=a(null==G?h[0]:h[0]=G,null==E?h[1]:h[1]=E,null==D?h[2]:h[2]=D);this.fromString("#"+("0"+Math.floor(255*G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+("0"+Math.floor(255*G[2]).toString(16)).slice(-2))}else m&&(D=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-D.top,h[2]=Math.max(Math.min(1,1-E/100),0),p())}),z=mxUtils.bind(this,function(){g=m=!1});mxEvent.addGestureListeners(e,k);mxEvent.addGestureListeners(sliderBox,u);mxEvent.addGestureListeners(b,null,w,z);mxEvent.addListener(b,"mouseleave",z);for(k=0;101>k;k+=4)u=document.createElement("div"),u.style.height="4px",u.style.pointerEvents="none",d.appendChild(u);b.appendChild(d);var C=document.createElement("div");C.style.background="url("+this.arrowImage+")";C.style.position="absolute";C.style.pointerEvents="none";C.style.width="7px";C.style.height="11px";C.style.left="2px";C.style.top="-3px";sliderBox.appendChild(C);sliderBox.appendChild(d);b.appendChild(sliderBox);this.fromString=function(E,D){D=null!=D?D:!1;if(null==E||""==E||mxUtils.isVarColor(E)||E==mxConstants.NONE)E="#ffffff",D=!0;var G=mxUtils.parseColor(E);-E=G.r/255;var K=G.g/255,L=G.b/255,Q=Math.min(Math.min(E,K),L);G=Math.max(Math.max(E,K),L);var N=G-Q;0===N?E=[null,0,G]:(E=E===Q?3+(L-K)/N:K===Q?5+(E-L)/N:1+(K-E)/N,E=[6===E?0:E,N/G,G]);null!=E[0]&&(h[0]=E[0]);0!=E[2]&&(h[1]=E[1]);h[2]=E[2];p(D)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";+E=G.r/255;var J=G.g/255,L=G.b/255,Q=Math.min(Math.min(E,J),L);G=Math.max(Math.max(E,J),L);var N=G-Q;0===N?E=[null,0,G]:(E=E===Q?3+(L-J)/N:J===Q?5+(E-L)/N:1+(J-E)/N,E=[6===E?0:E,N/G,G]);null!=E[0]&&(h[0]=E[0]);0!=E[2]&&(h[1]=E[1]);h[2]=E[2];p(D)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";var ColorDialog=function(a,b,e,f,h,d,g){function m(ca){return mxUtils.color2hex("#"+ca).substring(1).toUpperCase()}function p(){Z.src="none"==V.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ca){V.style.display=ca||"none"==V.style.display?"flex":"none";p()}function u(ca){""==ca.value&&null!=L&&N?ca.style.background=ca==P?L.dark:L.light:""==ca.value||ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)?ca.style.background="transparent":ca.style.background="#"+ca.value;ca.style.color="transparent"==ca.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ca.style.background)?"#ffffff":"#000000"}function w(){u(U);u(P)}function z(ca){ca?g&&null!=L?(U.value=L.light.substring(1).toUpperCase(),ca=!1):(U.value="",P.value="",T.value="automatic",U.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),P.setAttribute("title",mxResources.get("useBlackAndWhite")),U.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==U.value&&null!=L&&(U.value=L.light.substring(1).toUpperCase()),@@ -3768,33 +3768,33 @@ U.removeAttribute("placeholder"),U.removeAttribute("title"),""==P.value&&null!=Lz(!1),ca!=P||U.value==mxConstants.NONE&&P.value==mxConstants.NONE||(T.value="custom"),ca==U&&"automatic"==T.value&&(U.value==mxConstants.NONE?P.value=mxConstants.NONE:mxUtils.isVarColor(U.value)?P.value=U.value:P.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ca.value)).substring(1).toUpperCase()),w()):ia.click()}function E(){var ca=U.value,H=P.value;if(N&&null!=L||(/(^#?[a-zA-Z0-9]*$)/.test(ca)||mxUtils.isVarColor(ca))&&(/(^#?[a-zA-Z0-9]*$)/.test(H)||mxUtils.isVarColor(H))){if(N)ca="default";else if(""==ca&&(ca=mxConstants.NONE),""==H&&(H=mxConstants.NONE),ca==mxConstants.NONE||mxUtils.isVarColor(ca)||"#"==ca.charAt(0)||(ca="#"+m(ca)),H==mxConstants.NONE||mxUtils.isVarColor(H)||"#"==H.charAt(0)||(H="#"+m(H)),ca!=mxConstants.NONE&&H!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=T.value&&H!=mxConstants.NONE?ca==mxConstants.NONE?ColorDialog.addRecentColor(H.substring(1),12):ColorDialog.addRecentColor("light-dark("+ca+","+H+")",12):ca!=mxConstants.NONE&&ColorDialog.addRecentColor(ca.substring(1),12),"none"!=ca||"none"!=H)ca=ca==mxConstants.NONE?"transparent":ca,H=H==mxConstants.NONE?"transparent":H,g||"automatic"==T.value||(ca="light-dark("+ca+","+H+")");oa(ca);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function D(){mxClient.IS_TOUCH||(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null))}function G(){var ca=ba(0==ColorDialog.recentColors.length?-["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ca.style.marginBottom="8px";return ca}function K(ca){13==ca.keyCode&&(C(mxEvent.getSource(ca)),E())}var L=null!=d?mxUtils.getLightDarkColor(d,null,null,g):null,Q=a.editor.graph;this.editorUi=a;var N=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var U=document.createElement("input");U.style.textOverflow="ellipsis";U.style.margin=-"0 0 0 4px";U.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var Y=document.createElement("div");Y.style.display="flex";Y.style.alignItems="center";d.appendChild(Y);var P=document.createElement("input");P.style.textOverflow="ellipsis";P.style.margin="0 4px";P.style.maxWidth="60px";P.style.width="100%";var T=document.createElement("select");T.style.textOverflow="ellipsis";T.style.width="100%";var J=document.createElement("option");J.setAttribute("value","automatic");mxUtils.write(J,-mxResources.get("automatic"));T.appendChild(J);J=document.createElement("option");J.setAttribute("value","custom");mxUtils.write(J,mxResources.get("userDefined"));T.appendChild(J);T.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var V=document.createElement("div");V.style.padding="0 6px 0 6px";J=document.createElement("img");J.setAttribute("title",mxResources.get("dark"));J.className="geAdaptiveAsset";J.src=Editor.thinDarkImage;J.style.width="20px";V.appendChild(J);mxEvent.addListener(J,"click",-function(){P.focus()});V.appendChild(P);V.appendChild(T);V.style.display="flex";V.style.alignItems="center";J=document.createElement("div");J.style.display="flex";J.style.alignItems="center";J.style.userSelect="none";J.style.cursor="pointer";J.style.padding="2px 0 2px 0";var Z=document.createElement("img");Z.setAttribute("title",mxResources.get("dark"));Z.className="geAdaptiveAsset";Z.style.marginLeft="-2px";J.appendChild(Z);mxUtils.write(J,mxResources.get("advanced"));p();mxEvent.addListener(J,"click",+["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ca.style.marginBottom="8px";return ca}function J(ca){13==ca.keyCode&&(C(mxEvent.getSource(ca)),E())}var L=null!=d?mxUtils.getLightDarkColor(d,null,null,g):null,Q=a.editor.graph;this.editorUi=a;var N=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var U=document.createElement("input");U.style.textOverflow="ellipsis";U.style.margin=+"0 0 0 4px";U.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var Y=document.createElement("div");Y.style.display="flex";Y.style.alignItems="center";d.appendChild(Y);var P=document.createElement("input");P.style.textOverflow="ellipsis";P.style.margin="0 4px";P.style.maxWidth="60px";P.style.width="100%";var T=document.createElement("select");T.style.textOverflow="ellipsis";T.style.width="100%";var K=document.createElement("option");K.setAttribute("value","automatic");mxUtils.write(K,+mxResources.get("automatic"));T.appendChild(K);K=document.createElement("option");K.setAttribute("value","custom");mxUtils.write(K,mxResources.get("userDefined"));T.appendChild(K);T.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var V=document.createElement("div");V.style.padding="0 6px 0 6px";K=document.createElement("img");K.setAttribute("title",mxResources.get("dark"));K.className="geAdaptiveAsset";K.src=Editor.thinDarkImage;K.style.width="20px";V.appendChild(K);mxEvent.addListener(K,"click",+function(){P.focus()});V.appendChild(P);V.appendChild(T);V.style.display="flex";V.style.alignItems="center";K=document.createElement("div");K.style.display="flex";K.style.alignItems="center";K.style.userSelect="none";K.style.cursor="pointer";K.style.padding="2px 0 2px 0";var Z=document.createElement("img");Z.setAttribute("title",mxResources.get("dark"));Z.className="geAdaptiveAsset";Z.style.marginLeft="-2px";K.appendChild(Z);mxUtils.write(K,mxResources.get("advanced"));p();mxEvent.addListener(K,"click",function(){k();p();ColorDialog.collapsed="none"==V.style.display});var ia=mxUtils.button("",function(){z(!0);w();O.focus();""==O.value&&null!=L&&N&&sa.fromString(O==P?L.dark:L.light,!0)});mxEvent.addListener(T,"change",function(){"automatic"==T.value?(U.focus(),C(U)):(z(!1),mxUtils.isVarColor(P.value)||(P.value=N&&null!=L?L.dark.substring(1).toUpperCase():P.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+U.value)).substring(1).toUpperCase()),P.focus(),D());w()});mxEvent.addListener(U,"change",function(){C(U)});mxEvent.addListener(P,"change",function(){C(P)});var oa=null!=e?e:this.createApplyFunction();this.init=function(){D()};var sa=new ColorPicker,O=Editor.isDarkMode()&&("auto"==Q.getAdaptiveColors()||"simple"==Q.getAdaptiveColors()&&"custom"==T.value)&&!g?P:U;mxEvent.addListener(U,"focus",function(){O=U});mxEvent.addListener(P,"focus",function(){O=P});sa.addListener("change",function(ca,H){ca=H.getProperty("color").substring(1).toUpperCase();O.value.toUpperCase()!=ca&&(O.value=ca,C(O),window.setTimeout(function(){O.focus()},0))});e=document.createElement("div");e.appendChild(sa.div);var X=document.createElement("div");X.style.display="flex";X.style.flexFlow="row wrap";X.style.justifyContent="center";X.style.paddingTop="10px";var ba=mxUtils.bind(this,function(ca,H,ea,ra){H=null!=H?H:12;var qa=document.createElement("table");qa.style.borderCollapse="collapse";qa.setAttribute("cellspacing","0");qa.style.marginBottom="20px";qa.style.cellSpacing="0px";qa.style.marginLeft="1px";var Pa=document.createElement("tbody");qa.appendChild(Pa);for(var ma=ca.length/H,Ba=0;Ba<ma;Ba++){for(var Ca=document.createElement("tr"),Ja=0;Ja<H;Ja++)mxUtils.bind(this,function(Ia){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==Ia&&(Ia=ea);if(null!=Ia){Da.style.borderWidth="1px";if(Ia==mxConstants.NONE||null==Ia)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(Ia)){var Ga=mxUtils.getLightDarkColor(Ia);Da.style.background="linear-gradient(to right bottom, "+Ga.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ga).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+Ia;Ga=this.colorNames[String(Ia).toUpperCase()];null!=Ga&&Da.setAttribute("title",Ga)}Ca.appendChild(Da);null!=Ia&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(Ia==mxConstants.NONE){O==P&&P.value==mxConstants.NONE?U.value=mxConstants.NONE:O.value=mxConstants.NONE;if(O==U||O==P&&U.value==mxConstants.NONE)T.value="automatic";C(O);window.setTimeout(function(){O.focus()},0)}else if(mxUtils.isLightDarkColor(Ia)){k(!0);T.value="custom";var ta=mxUtils.getLightDarkColor(Ia);U.value=ta.light.substring(1).toUpperCase();P.value=ta.dark.substring(1).toUpperCase();C(U);C(P);O==U?sa.fromString(ta.light):sa.fromString(ta.dark)}else sa.fromString("#"+Ia)}),mxEvent.addListener(Da,"dblclick",E))})(ca[Ba*H+Ja]);Pa.appendChild(Ca)}ra&&(ca=document.createElement("td"),ca.setAttribute("title",mxResources.get("reset")),-ca.className="geAdaptiveAsset",ca.style.border="1px solid black",ca.style.padding="0px",ca.style.width="16px",ca.style.height="16px",ca.style.backgroundImage="url('"+Editor.crossImage+"')",ca.style.backgroundPosition="center center",ca.style.backgroundSize="14px 14px",ca.style.backgroundRepeat="no-repeat",ca.style.cursor="pointer",Ca.appendChild(ca),mxEvent.addListener(ca,"click",function(){ColorDialog.resetRecentColors();qa.parentNode.replaceChild(G(),qa)}));X.appendChild(qa);return qa});g||(d.appendChild(J),-!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==Q.getAdaptiveColors()||"automatic"!=T.value||(V.style.display="none",p()),J=document.createElement("img"),J.setAttribute("title",mxResources.get("light")),J.className="geAdaptiveAsset",J.src=Editor.thinLightImage,J.style.width="20px",Y.appendChild(J),mxEvent.addListener(J,"click",function(){U.focus()}));Y.appendChild(U);null!=L&&(ia.setAttribute("title",mxResources.get(g?"default":"useBlackAndWhite")),ia.style.cursor="pointer",ia.style.position=+ca.className="geAdaptiveAsset",ca.style.border="1px solid black",ca.style.padding="0px",ca.style.width="16px",ca.style.height="16px",ca.style.backgroundImage="url('"+Editor.crossImage+"')",ca.style.backgroundPosition="center center",ca.style.backgroundSize="14px 14px",ca.style.backgroundRepeat="no-repeat",ca.style.cursor="pointer",Ca.appendChild(ca),mxEvent.addListener(ca,"click",function(){ColorDialog.resetRecentColors();qa.parentNode.replaceChild(G(),qa)}));X.appendChild(qa);return qa});g||(d.appendChild(K),+!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==Q.getAdaptiveColors()||"automatic"!=T.value||(V.style.display="none",p()),K=document.createElement("img"),K.setAttribute("title",mxResources.get("light")),K.className="geAdaptiveAsset",K.src=Editor.thinLightImage,K.style.width="20px",Y.appendChild(K),mxEvent.addListener(K,"click",function(){U.focus()}));Y.appendChild(U);null!=L&&(ia.setAttribute("title",mxResources.get(g?"default":"useBlackAndWhite")),ia.style.cursor="pointer",ia.style.position="relative",ia.style.marginLeft="4px",ia.innerText="",Q=document.createElement("div"),Q.style.display="inline-block",Q.style.verticalAlign="middle",Q.style.borderStyle="solid",Q.style.borderWidth="1px",Q.style.marginTop="-2px",Q.style.width="12px",Q.style.height="12px",g?Q.style.backgroundColor=L.light:Q.style.backgroundImage="linear-gradient(to right bottom, "+L.cssText+" 50%, "+mxUtils.invertLightDarkColor(L).cssText+" 50.3%)",ia.appendChild(Q),Y.appendChild(ia),mxEvent.addListener(ia,"dblclick",-E));var da=document.createElement("input");da.setAttribute("type","color");da.style.position="relative";da.style.visibility="hidden";da.style.top="10px";da.style.width="0px";da.style.height="0px";da.style.border="none";e.style.whiteSpace="nowrap";Y.appendChild(da);Q=mxUtils.button("",function(){document.activeElement==da?U.focus():(da.value="#"+U.value,da.click())});Q.style.cursor="pointer";J=document.createElement("img");J.src=Editor.colorDropperImage;J.className="geAdaptiveAsset";J.style.position=-"relative";J.style.verticalAlign="middle";J.style.marginTop="-2px";J.style.width="auto";J.style.height="14px";Q.appendChild(J);Y.appendChild(Q);e.appendChild(d);mxEvent.addListener(da,"change",function(){sa.fromString(da.value)});g||e.appendChild(V);G();d=ba(this.presetColors);d.style.marginBottom="8px";d=ba(this.defaultColors);d.style.marginBottom="16px";e.appendChild(X);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=+E));var da=document.createElement("input");da.setAttribute("type","color");da.style.position="relative";da.style.visibility="hidden";da.style.top="10px";da.style.width="0px";da.style.height="0px";da.style.border="none";e.style.whiteSpace="nowrap";Y.appendChild(da);Q=mxUtils.button("",function(){document.activeElement==da?U.focus():(da.value="#"+U.value,da.click())});Q.style.cursor="pointer";K=document.createElement("img");K.src=Editor.colorDropperImage;K.className="geAdaptiveAsset";K.style.position=+"relative";K.style.verticalAlign="middle";K.style.marginTop="-2px";K.style.width="auto";K.style.height="14px";Q.appendChild(K);Y.appendChild(Q);e.appendChild(d);mxEvent.addListener(da,"change",function(){sa.fromString(da.value)});g||e.appendChild(V);G();d=ba(this.presetColors);d.style.marginBottom="8px";d=ba(this.defaultColors);d.style.marginBottom="16px";e.appendChild(X);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent="end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});Y.className="geBtn";a.editor.cancelFirst&&d.appendChild(Y);Q=mxUtils.button(mxResources.get("apply"),E);Q.className="geBtn gePrimaryBtn";d.appendChild(Q);a.editor.cancelFirst||d.appendChild(Y);null!=b&&("default"==b?ia.click():(Y=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==Y.light?U.value=mxConstants.NONE:mxUtils.isVarColor(Y.light)?U.value=Y.light:(mxUtils.isRgbColor(Y.light)?Y.light=mxUtils.rgba2hex(Y.light):mxUtils.isHexColor(Y.light)||(Y.light="#"+m(Y.light)),U.value=Y.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==Y.dark?P.value=mxConstants.NONE:mxUtils.isVarColor(Y.dark)?P.value=Y.dark:(mxUtils.isRgbColor(Y.dark)?Y.dark=mxUtils.rgba2hex(Y.dark):mxUtils.isHexColor(Y.dark)||(Y.dark="#"+m(Y.dark)),P.value=Y.dark.substring(1).toUpperCase()),sa.fromString(O.value,-!0),w()));g||!ColorDialog.collapsed||"automatic"!=T.value||Editor.isDarkMode()||(V.style.display="none",p());e.appendChild(d);this.picker=sa;this.colorInput=U;mxEvent.addListener(U,"keypress",K);mxEvent.addListener(P,"keypress",K);mxEvent.addListener(e,"keydown",function(ca){27==ca.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ca))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");+!0),w()));g||!ColorDialog.collapsed||"automatic"!=T.value||Editor.isDarkMode()||(V.style.display="none",p());e.appendChild(d);this.picker=sa;this.colorInput=U;mxEvent.addListener(U,"keypress",J);mxEvent.addListener(P,"keypress",J);mxEvent.addListener(e,"keydown",function(ca){27==ca.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ca))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");ColorDialog.prototype.createApplyFunction=function(){return ColorDialog.createApplyFunction(this.editorUi,this.currentColorKey)};ColorDialog.createApplyFunction=function(a,b){return function(e){var f=a.editor.graph;f.getModel().beginUpdate();try{f.setCellStyles(b,e),a.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[e],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}};ColorDialog.recentColors=[];ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};ColorDialog.collapsed=!0;var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var e=document.createElement("h3");mxUtils.write(e,mxResources.get("about")+" GraphEditor");b.appendChild(e);e=document.createElement("img");e.style.border="0px";e.setAttribute("width","176");e.setAttribute("width","151");e.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(e);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);e=document.createElement("a");e.setAttribute("href","http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C,E){k=null!=k?k:!1;g=document.createElement("div");g.style.position="absolute";g.style.top="20px";g.style.bottom="20px";g.style.left="20px";g.style.right="20px";m=document.createElement("div");-m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);g.appendChild(m);g.appendChild(D);g.appendChild(G);null!=E&&m.appendChild(E);var K=document.createElement("textarea");u?K.setAttribute("wrap","off"):K.style.wordBreak="break-all";-K.setAttribute("spellcheck","false");K.setAttribute("autocorrect","off");K.setAttribute("autocomplete","off");K.setAttribute("autocapitalize","off");mxUtils.write(K,e||"");K.style.resize="none";K.style.outline="none";K.style.position="absolute";K.style.boxSizing="border-box";K.style.top="0px";K.style.left="0px";K.style.height="100%";K.style.width="100%";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};D.appendChild(K);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=-C)for(b=0;b<C.length;b++)(function(Q,N,U){Q=mxUtils.button(Q,function(Y){N(Y,K)});null!=U&&Q.setAttribute("title",U);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=h&&h()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,K);if(null!=f){var L=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(K.value)});L.setAttribute("title",-"Ctrl+Enter");L.className="geBtn gePrimaryBtn";G.appendChild(L);mxEvent.addListener(K,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&L.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=g},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize",+m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);g.appendChild(m);g.appendChild(D);g.appendChild(G);null!=E&&m.appendChild(E);var J=document.createElement("textarea");u?J.setAttribute("wrap","off"):J.style.wordBreak="break-all";+J.setAttribute("spellcheck","false");J.setAttribute("autocorrect","off");J.setAttribute("autocomplete","off");J.setAttribute("autocapitalize","off");mxUtils.write(J,e||"");J.style.resize="none";J.style.outline="none";J.style.position="absolute";J.style.boxSizing="border-box";J.style.top="0px";J.style.left="0px";J.style.height="100%";J.style.width="100%";this.textarea=J;this.init=function(){J.focus();J.scrollTop=0};D.appendChild(J);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=+C)for(b=0;b<C.length;b++)(function(Q,N,U){Q=mxUtils.button(Q,function(Y){N(Y,J)});null!=U&&Q.setAttribute("title",U);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=h&&h()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,J);if(null!=f){var L=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(J.value)});L.setAttribute("title",+"Ctrl+Enter");L.className="geBtn gePrimaryBtn";G.appendChild(L);mxEvent.addListener(J,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&L.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=g},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.overflow="auto";e.style.resize="none";e.style.width="600px";e.style.height="360px";e.style.marginBottom="16px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),e.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var p=new FileReader;p.onload=function(k){e.value=k.target.result};p.readAsText(m)}else e.value=a.extractGraphModelFromEvent(m)},!1));var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&b.appendChild(h);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var g=document.createElement("option");g.setAttribute("value","apply");mxUtils.write(g,mxResources.get("apply",null,"Update Existing Drawing"));d.appendChild(g)}a.editor.graph.isEnabled()&&(g=document.createElement("option"),g.setAttribute("value","insert"),mxUtils.write(g,mxResources.get("insert")),d.appendChild(g));g=document.createElement("option");g.setAttribute("value","new");mxUtils.write(g,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&d.appendChild(g);b.appendChild(d);g=mxUtils.button(mxResources.get("ok"),function(){var m=Graph.zapGremlins(mxUtils.trim(e.value)),p=null;@@ -3808,30 +3808,30 @@ k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(kk=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");h.appendChild(k);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("value","100");z.style.width="180px";k=document.createElement("td");k.appendChild(z);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");h.appendChild(k);var C=document.createElement("input");C.setAttribute("value",g);C.style.width="180px";k=document.createElement("td");k.appendChild(C);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");h.appendChild(k);var E=document.createElement("input");E.setAttribute("value",m);E.style.width="180px";k=document.createElement("td");k.appendChild(E);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");h.appendChild(k);var D=document.createElement("select");D.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");D.appendChild(k);k=document.createElement("option");-k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var K=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=-"",G.focus()):(G.value=this.value,K||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var P=parseInt(G.value);isNaN(P)||0>=P?G.style.backgroundColor="red":(G.style.backgroundColor="",K||(z.value=P))});k=document.createElement("td");k.appendChild(D);k.appendChild(G);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");h.appendChild(k);var L=document.createElement("input");+k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var J=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=+"",G.focus()):(G.value=this.value,J||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var P=parseInt(G.value);isNaN(P)||0>=P?G.style.backgroundColor="red":(G.style.backgroundColor="",J||(z.value=P))});k=document.createElement("td");k.appendChild(D);k.appendChild(G);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");h.appendChild(k);var L=document.createElement("input");L.setAttribute("type","checkbox");L.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(L);mxUtils.write(k,mxResources.get("transparent"));h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");h.appendChild(k);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=!1;k=document.createElement("td");k.appendChild(Q);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");h.appendChild(k);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("value",ExportDialog.lastBorderValue);N.style.width="180px";k=document.createElement("td");k.appendChild(N);h.appendChild(k);p.appendChild(h);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(z,"change",-function(){K=!0;var P=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*P).toFixed(2));0<g?(C.value=Math.floor(g*P),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value)/g;0<P?(z.value=parseFloat((100*P).toFixed(2)),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(E,"change",function(){var P=parseInt(E.value)/m;0<P?(z.value=parseFloat((100*P).toFixed(2)),C.value=Math.floor(g*-P)):(z.value="100",C.value=g,E.value=m);e()});h=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=u.value,T=w.value,J=Math.max(0,parseFloat(z.value)||100)/100,V=Math.max(0,parseInt(N.value)),Z=f.background,ia=Math.max(1,parseInt(G.value));if(("svg"==T||"png"==T||-"pdf"==T)&&L.checked)Z=null;else if(null==Z||Z==mxConstants.NONE)Z="#ffffff";ExportDialog.lastBorderValue=V;ExportDialog.exportFile(a,P,T,Z,J,V,ia,Q.checked)}}));U.className="geBtn gePrimaryBtn";var Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});Y.className="geBtn";a.editor.cancelFirst?(k.appendChild(Y),k.appendChild(U)):(k.appendChild(U),k.appendChild(Y));h.appendChild(k);p.appendChild(h);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;+function(){J=!0;var P=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*P).toFixed(2));0<g?(C.value=Math.floor(g*P),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value)/g;0<P?(z.value=parseFloat((100*P).toFixed(2)),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(E,"change",function(){var P=parseInt(E.value)/m;0<P?(z.value=parseFloat((100*P).toFixed(2)),C.value=Math.floor(g*+P)):(z.value="100",C.value=g,E.value=m);e()});h=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=u.value,T=w.value,K=Math.max(0,parseFloat(z.value)||100)/100,V=Math.max(0,parseInt(N.value)),Z=f.background,ia=Math.max(1,parseInt(G.value));if(("svg"==T||"png"==T||+"pdf"==T)&&L.checked)Z=null;else if(null==Z||Z==mxConstants.NONE)Z="#ffffff";ExportDialog.lastBorderValue=V;ExportDialog.exportFile(a,P,T,Z,K,V,ia,Q.checked)}}));U.className="geBtn gePrimaryBtn";var Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});Y.className="geBtn";a.editor.cancelFirst?(k.appendChild(Y),k.appendChild(U)):(k.appendChild(U),k.appendChild(Y));h.appendChild(k);p.appendChild(h);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;ExportDialog.exportFile=function(a,b,e,f,h,d,g,m){m=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(f,h,d)),b,e);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/h-p.x)/m.view.scale),Math.floor((d/h-p.y)/m.view.scale));k.scale(h/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*h/m.view.scale+2*d);h=Math.ceil(p.height*h/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*h<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+h+"&"+u+"&dpi="+g)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};var EditDataDialog=function(a,b){function e(){0<N.value.length?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")}var f=document.createElement("div"),h=a.editor.graph,d=h.getModel().getValue(b);if(!mxUtils.isNode(d)){var g=mxUtils.createXmlDocument().createElement("object");g.setAttribute("label",d||"");d=g}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(P){}var k=new mxForm("properties");k.table.style.width=-"100%";var u=d.attributes,w=[],z=[],C=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(P,T){var J=document.createElement("div");J.style.position="relative";J.style.paddingRight="20px";J.style.boxSizing="border-box";J.style.width="100%";var V=document.createElement("a"),Z=mxUtils.createImage(Dialog.prototype.closeImage);Z.style.height="9px";Z.style.fontSize="9px";Z.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";V.className="geButton";V.setAttribute("title",-mxResources.get("delete"));V.style.position="absolute";V.style.top="4px";V.style.right="0px";V.style.margin="0px";V.style.width="9px";V.style.height="9px";V.style.cursor="pointer";V.appendChild(Z);T=function(ia){return function(){for(var oa=0,sa=0;sa<w.length;sa++){if(w[sa]==ia){z[sa]=null;k.table.deleteRow(oa+(null!=E?1:0));break}null!=z[sa]&&oa++}}}(T);mxEvent.addListener(V,"click",T);T=P.parentNode;J.appendChild(P);J.appendChild(V);T.appendChild(J)};g=function(P,T,J){w[P]=T;z[P]=k.addTextarea(w[C]+-":",J,2);z[P].style.width="100%";0<J.indexOf("\n")&&z[P].setAttribute("rows","2");D(z[P],T);null!=m[T]&&0==m[T].editable&&z[P].setAttribute("disabled","disabled")};p=[];for(var G=h.getModel().getParent(b)==h.getModel().getRoot(),K=h.getCellStyle(b),L=0;L<u.length;L++)("label"!=u[L].nodeName||"1"==K.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[L].nodeName&&p.push({name:u[L].nodeName,value:u[L].nodeValue});p.sort(function(P,T){return"label"==P.name?1:"label"==T.name?-1:P.name<T.name?-1:P.name>-T.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var Q=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(P){P=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(T){if(null!=T&&0<T.length&&T!=E)if(h.model.isRoot(b)){var J=a.getPageById(E);if(null!=J)if(null==a.getPageById(T)){var V=a.getPageIndex(J);0<=V&&(a.removePage(J),J.node.setAttribute("id",-T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),a.insertPage(J,V))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==h.getModel().getCell(T)?(h.getModel().cellRemoved(b),b.setId(T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),h.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[T])})}),mxResources.get("id"));a.showDialog(P.container,300,80,!0,!0);P.init()})}for(L=0;L<p.length;L++)g(C,p[L].name,p[L].value),C++;p=document.createElement("div");+"100%";var u=d.attributes,w=[],z=[],C=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(P,T){var K=document.createElement("div");K.style.position="relative";K.style.paddingRight="20px";K.style.boxSizing="border-box";K.style.width="100%";var V=document.createElement("a"),Z=mxUtils.createImage(Dialog.prototype.closeImage);Z.style.height="9px";Z.style.fontSize="9px";Z.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";V.className="geButton";V.setAttribute("title",+mxResources.get("delete"));V.style.position="absolute";V.style.top="4px";V.style.right="0px";V.style.margin="0px";V.style.width="9px";V.style.height="9px";V.style.cursor="pointer";V.appendChild(Z);T=function(ia){return function(){for(var oa=0,sa=0;sa<w.length;sa++){if(w[sa]==ia){z[sa]=null;k.table.deleteRow(oa+(null!=E?1:0));break}null!=z[sa]&&oa++}}}(T);mxEvent.addListener(V,"click",T);T=P.parentNode;K.appendChild(P);K.appendChild(V);T.appendChild(K)};g=function(P,T,K){w[P]=T;z[P]=k.addTextarea(w[C]++":",K,2);z[P].style.width="100%";0<K.indexOf("\n")&&z[P].setAttribute("rows","2");D(z[P],T);null!=m[T]&&0==m[T].editable&&z[P].setAttribute("disabled","disabled")};p=[];for(var G=h.getModel().getParent(b)==h.getModel().getRoot(),J=h.getCellStyle(b),L=0;L<u.length;L++)("label"!=u[L].nodeName||"1"==J.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[L].nodeName&&p.push({name:u[L].nodeName,value:u[L].nodeValue});p.sort(function(P,T){return"label"==P.name?1:"label"==T.name?-1:P.name<T.name?-1:P.name>+T.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var Q=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(P){P=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(T){if(null!=T&&0<T.length&&T!=E)if(h.model.isRoot(b)){var K=a.getPageById(E);if(null!=K)if(null==a.getPageById(T)){var V=a.getPageIndex(K);0<=V&&(a.removePage(K),K.node.setAttribute("id",+T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),a.insertPage(K,V))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==h.getModel().getCell(T)?(h.getModel().cellRemoved(b),b.setId(T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),h.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[T])})}),mxResources.get("id"));a.showDialog(P.container,300,80,!0,!0);P.init()})}for(L=0;L<p.length;L++)g(C,p[L].name,p[L].value),C++;p=document.createElement("div");p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);g=document.createElement("div");g.style.display="flex";g.style.alignItems="center";g.style.boxSizing="border-box";g.style.paddingRight="160px";g.style.whiteSpace="nowrap";g.style.marginTop="6px";g.style.width="100%";var N=document.createElement("input");N.setAttribute("placeholder",mxResources.get("enterPropertyName"));N.setAttribute("type","text");N.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");N.style.boxSizing="border-box";N.style.borderWidth="1px";N.style.borderStyle="solid";N.style.marginLeft="2px";N.style.padding="4px";N.style.width="100%";g.appendChild(N);p.appendChild(g);f.appendChild(p);var U=mxUtils.button(mxResources.get("addProperty"),function(){var P=N.value;if(0<P.length&&"label"!=P&&"id"!=P&&"placeholders"!=P&&0>P.indexOf(":"))try{var T=mxUtils.indexOf(w,P);if(0<=T&&null!=z[T])z[T].focus();else{d.cloneNode(!1).setAttribute(P,-"");0<=T&&(w.splice(T,1),z.splice(T,1));w.push(P);var J=k.addTextarea(P+":","",2);J.style.width="100%";z.push(J);D(J,P);J.focus()}U.setAttribute("disabled","disabled");N.value=""}catch(V){mxUtils.alert(V)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(N,"keypress",function(P){13==P.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():N.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";+"");0<=T&&(w.splice(T,1),z.splice(T,1));w.push(P);var K=k.addTextarea(P+":","",2);K.style.width="100%";z.push(K);D(K,P);K.focus()}U.setAttribute("disabled","disabled");N.value=""}catch(V){mxUtils.alert(V)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(N,"keypress",function(P){13==P.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():N.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";U.style.position="absolute";U.style.overflow="hidden";U.style.width="144px";U.style.right="0px";U.className="geBtn";g.appendChild(U);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";g=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(P){var T=h.getDataForCells([b],!0);P=new EmbedDialog(a,JSON.stringify(T,null,2),null,null,function(){console.log(T);a.alert("Written to Console (Dev Tools)")},mxResources.get("export"),null,"Console","data.json");a.showDialog(P.container,450,240,!0,!0);P.init()}));g.setAttribute("title",mxResources.get("export"));g.className="geBtn";var Y=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var P=!1,T=0;T<w.length;T++)null==z[T]?d.removeAttribute(w[T]):(d.setAttribute(w[T],z[T].value),P=P||"placeholder"==w[T]&&"1"==d.getAttribute("placeholders"));P&&d.removeAttribute("label");h.getModel().setValue(b,-d)}catch(J){mxUtils.alert(J)}});Y.setAttribute("title","Ctrl+Enter");Y.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(P){13==P.keyCode&&mxEvent.isControlDown(P)&&Y.click()});mxEvent.addListener(N,"keyup",e);mxEvent.addListener(N,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),-G.style.marginRight="10px",K=document.createElement("input"),K.setAttribute("type","checkbox"),K.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(K.setAttribute("checked","checked"),K.defaultChecked=!0),mxEvent.addListener(K,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(K),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),+d)}catch(K){mxUtils.alert(K)}});Y.setAttribute("title","Ctrl+Enter");Y.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(P){13==P.keyCode&&mxEvent.isControlDown(P)&&Y.click()});mxEvent.addListener(N,"keyup",e);mxEvent.addListener(N,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),+G.style.marginRight="10px",J=document.createElement("input"),J.setAttribute("type","checkbox"),J.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(J.setAttribute("checked","checked"),J.defaultChecked=!0),mxEvent.addListener(J,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(J),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),u.appendChild(G);a.editor.cancelFirst&&u.appendChild(p);u.appendChild(g);u.appendChild(Y);a.editor.cancelFirst||u.appendChild(p);f.appendChild(u);this.container=f};EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)&&(e=b.getId());return e};EditDataDialog.placeholderHelpLink=null;var LinkDialog=function(a,b,e,f){var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("value",b);g.setAttribute("placeholder","http://www.example.com/");g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";@@ -3848,17 +3848,17 @@ p.removeSelectionCells(p.getModel().getDescendants(oa));mxEvent.consume(H)}});X."block",ia.style.textAlign="right",ia.style.whiteSpace="nowrap",ia.style.position="absolute",ia.style.right="16px",ia.style.top="6px",0<Z&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toBack")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="▼",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",ia.appendChild(X),mxEvent.addListener(X,"click",function(H){p.isEnabled()&&p.addCell(oa,p.model.root,Z-1);mxEvent.consume(H)})),0<=Z&&Z<C-1&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toFront")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="▲",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",ia.appendChild(X),mxEvent.addListener(X,"click",function(H){p.isEnabled()&&p.addCell(oa,p.model.root,Z+1);mxEvent.consume(H)})),O.appendChild(ia);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(O.setAttribute("draggable","true"),O.style.cursor="move")}mxEvent.addListener(O,"dblclick",function(H){var ea=mxEvent.getSource(H).nodeName;"INPUT"!=ea&&"IMG"!=ea&&"true"!=ba.contentEditable&&(m(oa),mxEvent.consume(H))});p.getDefaultParent()==oa&&(O.classList.add("geActivePage"),O.style.fontWeight=p.isEnabled()?"bold":"",E=oa);mxEvent.addListener(O,"click",function(H){p.isEnabled()&&"true"!=ba.contentEditable&&(p.setDefaultParent(sa),p.view.setCurrentRoot(null),mxEvent.isShiftDown(H)&&p.setSelectionCells(oa.children),-mxEvent.consume(H))});u.appendChild(O)}p.isEnabled()?(K.classList.remove("mxDisabled"),Q.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),Y.classList.remove("mxDisabled")):(K.classList.add("mxDisabled"),Q.classList.add("mxDisabled"),U.classList.add("mxDisabled"),Y.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";N.clear();for(var J=C-1;0<=J;J--)mxUtils.bind(this,function(Z){T(J,p.convertValueToString(Z)||mxResources.get("background"),Z,Z)})(p.model.getChildAt(p.model.root,-J));var V=p.convertValueToString(E)||mxResources.get("background");K.setAttribute("title",mxResources.get("removeIt",[V]));U.setAttribute("title",mxResources.get("duplicateIt",[V]));p.isSelectionEmpty()&&L.classList.add("mxDisabled");d()}function m(T){if(p.isEnabled()&&null!=T){var J=N.get(T);if(null!=J){var V=J.getElementsByTagName("span");if(null!=V&&0<V.length){var Z=V[0],ia=mxUtils.getTextContent(Z);Z.style.textOverflow="";Z.style.cursor="text";Z.contentEditable="true";Z.focus();document.execCommand("selectAll",-!1,null);J.removeAttribute("draggable");J.style.cursor="";var oa=function(sa){if("true"==Z.contentEditable){Z.contentEditable="false";var O=mxUtils.getTextContent(Z);sa&&O!=ia?(O=mxUtils.getTextContent(Z),0<O.length?p.cellLabelChanged(T,O):p.cellLabelChanged(T,mxResources.get("untitledLayer"))):g()}};mxEvent.addListener(Z,"keydown",function(sa){if(13==sa.keyCode||27==sa.keyCode)oa(13==sa.keyCode),mxEvent.consume(sa)});mxEvent.addListener(Z,"blur",function(sa){oa(!0);mxEvent.consume(sa)})}}}}var p=+mxEvent.consume(H))});u.appendChild(O)}p.isEnabled()?(J.classList.remove("mxDisabled"),Q.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),Y.classList.remove("mxDisabled")):(J.classList.add("mxDisabled"),Q.classList.add("mxDisabled"),U.classList.add("mxDisabled"),Y.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";N.clear();for(var K=C-1;0<=K;K--)mxUtils.bind(this,function(Z){T(K,p.convertValueToString(Z)||mxResources.get("background"),Z,Z)})(p.model.getChildAt(p.model.root,+K));var V=p.convertValueToString(E)||mxResources.get("background");J.setAttribute("title",mxResources.get("removeIt",[V]));U.setAttribute("title",mxResources.get("duplicateIt",[V]));p.isSelectionEmpty()&&L.classList.add("mxDisabled");d()}function m(T){if(p.isEnabled()&&null!=T){var K=N.get(T);if(null!=K){var V=K.getElementsByTagName("span");if(null!=V&&0<V.length){var Z=V[0],ia=mxUtils.getTextContent(Z);Z.style.textOverflow="";Z.style.cursor="text";Z.contentEditable="true";Z.focus();document.execCommand("selectAll",+!1,null);K.removeAttribute("draggable");K.style.cursor="";var oa=function(sa){if("true"==Z.contentEditable){Z.contentEditable="false";var O=mxUtils.getTextContent(Z);sa&&O!=ia?(O=mxUtils.getTextContent(Z),0<O.length?p.cellLabelChanged(T,O):p.cellLabelChanged(T,mxResources.get("untitledLayer"))):g()}};mxEvent.addListener(Z,"keydown",function(sa){if(13==sa.keyCode||27==sa.keyCode)oa(13==sa.keyCode),mxEvent.consume(sa)});mxEvent.addListener(Z,"blur",function(sa){oa(!0);mxEvent.consume(sa)})}}}}var p=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom=parseInt("26px")+7+"px";k.appendChild(u);var w=null,z=null;mxEvent.addListener(k,"dragover",function(T){T.dataTransfer.dropEffect="move";z=0;T.stopPropagation();T.preventDefault()});mxEvent.addListener(k,"drop",function(T){T.stopPropagation();T.preventDefault()});var C=null,E=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height="26px";D.style.overflow="hidden";D.style.padding="3px 4px 4px 4px";D.style.borderWidth="1px 0px 0px 0px";D.style.borderStyle="solid";D.style.display="block";D.style.whiteSpace="nowrap";var G=document.createElement("a");G.className="geToolbarButton geAdaptiveAsset geToggleItem";-G.style.width="16px";G.style.height="18px";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="20px";G.style.margin="0 2px";G.style.display="inline-block";G.style.cursor="pointer";var K=G.cloneNode(!1);K.style.backgroundImage="url("+Editor.trashImage+")";K.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(K,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var J=p.model.root.getIndex(E);p.removeCells([E],!1);-0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<J&&J<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,J-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(T)});p.isEnabled()||K.classList.add("mxDisabled");D.appendChild(K);var L=G.cloneNode();L.style.backgroundImage="url("+Editor.layersImage+")";L.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(L,-"click",function(T){if(p.isEnabled()&&!p.isSelectionEmpty()){var J=mxUtils.getOffset(L);a.showPopupMenu(mxUtils.bind(this,function(V,Z){for(var ia=p.getLayerForCells(p.getSelectionCells()),oa=C-1;0<=oa;oa--)mxUtils.bind(this,function(sa){var O="1"==mxUtils.getValue(p.getCurrentCellStyle(sa),"locked","0"),X=V.addItem(p.convertValueToString(sa)||mxResources.get("background"),null,mxUtils.bind(this,function(){O||p.moveCells(p.getSelectionCells(),0,0,!1,sa)}),Z,null,null,!O);O?V.addCheckmark(X,Editor.lockedImage):-sa==ia&&V.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,oa))}),J.x,J.y+L.offsetHeight,T)}});D.appendChild(L);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,"click",function(T){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(T)});p.isEnabled()||Q.classList.add("mxDisabled");D.appendChild(Q);var N=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage++G.style.width="16px";G.style.height="18px";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="20px";G.style.margin="0 2px";G.style.display="inline-block";G.style.cursor="pointer";var J=G.cloneNode(!1);J.style.backgroundImage="url("+Editor.trashImage+")";J.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(J,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var K=p.model.root.getIndex(E);p.removeCells([E],!1);+0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<K&&K<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,K-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(T)});p.isEnabled()||J.classList.add("mxDisabled");D.appendChild(J);var L=G.cloneNode();L.style.backgroundImage="url("+Editor.layersImage+")";L.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(L,+"click",function(T){if(p.isEnabled()&&!p.isSelectionEmpty()){var K=mxUtils.getOffset(L);a.showPopupMenu(mxUtils.bind(this,function(V,Z){for(var ia=p.getLayerForCells(p.getSelectionCells()),oa=C-1;0<=oa;oa--)mxUtils.bind(this,function(sa){var O="1"==mxUtils.getValue(p.getCurrentCellStyle(sa),"locked","0"),X=V.addItem(p.convertValueToString(sa)||mxResources.get("background"),null,mxUtils.bind(this,function(){O||p.moveCells(p.getSelectionCells(),0,0,!1,sa)}),Z,null,null,!O);O?V.addCheckmark(X,Editor.lockedImage):+sa==ia&&V.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,oa))}),K.x,K.y+L.offsetHeight,T)}});D.appendChild(L);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,"click",function(T){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(T)});p.isEnabled()||Q.classList.add("mxDisabled");D.appendChild(Q);var N=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage+")";U.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(U,"click",function(T){if(p.isEnabled()){T=null;p.model.beginUpdate();try{T=p.cloneCell(E),p.cellLabelChanged(T,mxResources.get("untitledLayer")),T.setVisible(!0),T=p.addCell(T,p.model.root),p.setDefaultParent(T)}finally{p.model.endUpdate()}null==T||p.isCellLocked(T)||p.selectAll(T)}});p.isEnabled()||U.classList.add("mxDisabled");D.appendChild(U);var Y=G.cloneNode(!1);Y.style.backgroundImage="url("+Editor.plusImage+")";Y.setAttribute("title",-mxResources.get("addLayer"));mxEvent.addListener(Y,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var J=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(J)}finally{p.model.endUpdate()}m(J)}mxEvent.consume(T)});p.isEnabled()||Y.classList.add("mxDisabled");D.appendChild(Y);k.appendChild(D);var P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="•";P.style.position="absolute";P.style.fontWeight=+mxResources.get("addLayer"));mxEvent.addListener(Y,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var K=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(K)}finally{p.model.endUpdate()}m(K)}mxEvent.consume(T)});p.isEnabled()||Y.classList.add("mxDisabled");D.appendChild(Y);k.appendChild(D);var P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="•";P.style.position="absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="6px";g();p.model.addListener(mxEvent.CHANGE,g);p.addListener("defaultParentChanged",g);a.addListener("lockedChanged",g);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?L.classList.add("mxDisabled"):L.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,h,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=g;a.installResizeHandler(this,!0)};(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";@@ -7236,16 +7236,16 @@ this.addEntry("db database schema er entity relation table list",function(){var"List")}),this.addEntry("db database schema er entity relation table list",function(){return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"List Item 1")}),this.addEntry("db database schema er entity relation table table row",function(){var e=new mxCell(d.value,new mxGeometry(0,0,90,d.geometry.height),"shape=partialRectangle;fillColor=none;align=left;verticalAlign=middle;strokeColor=none;spacingLeft=34;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");e.vertex=!0;var f=b.cloneCell(d,"");f.connectable=!1;f.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;stokeWidth=1;dashed=1;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";f.geometry.width=30;e.insert(f);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"List Item 2")}),this.addEntry("db database schema er entity relation table table row divider hline line separator",function(){var e=new mxCell("",new mxGeometry(0,0,60,10),"line;strokeWidth=1;rotatable=0;dashed=0;labelPosition=right;align=left;verticalAlign=middle;spacingTop=0;spacingLeft=6;points=[];portConstraint=eastwest;");e.vertex=!0;return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"List Item 3")}),this.addEntry("db database schema er entity relation table table",function(){var e=new mxCell("Entity",new mxGeometry(0,0,160,120),"swimlane;childLayout=stackLayout;horizontal=1;startSize=50;horizontalStack=0;rounded=1;fontSize=14;fontStyle=0;strokeWidth=2;resizeParent=0;resizeLast=1;shadow=0;dashed=0;align=center;arcSize=4;whiteSpace=wrap;html=1;");-e.vertex=!0;var f=new mxCell("+Attribute1\n+Attribute2\n+Attribute3",new mxGeometry(0,30,160,90),"align=left;strokeColor=none;fillColor=none;spacingLeft=4;fontSize=12;verticalAlign=top;resizable=0;rotatable=0;part=1;html=1;");f.vertex=!0;e.insert(f);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Entity")}),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Entity",null,null,"db database schema er entity relation table "),this.createVertexTemplateEntry("rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;",-100,40,"Entity","Entity (Rounded)",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Weak Entity",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,"Attribute","Attribute",null,null,"db database schema er entity relation table attribute chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;",-100,40,"Attribute","Key Attribute",null,null,"db database schema er entity relation table attribute key chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,'<span style="border-bottom: 1px dotted">Attribute</span>',"Weak Key Attribute",null,null,"db database schema er entity relation table attribute key weak chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;dashed=1;",100,40,"Attribute","Derived Attribute",null,null,"db database schema er entity relation table attribute derived chen"),-this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;margin=3;whiteSpace=wrap;html=1;align=center;",100,40,"Attribute","Multivalue Attribute",null,null,"db database schema er entity relation table attribute multivalue chen"),this.createVertexTemplateEntry("shape=associativeEntity;whiteSpace=wrap;html=1;align=center;",140,60,"Associative\nEntity","Associative Entity",null,null,"db database schema er entity relation table associative entity chen"),this.createVertexTemplateEntry("shape=rhombus;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",-120,60,"Relationship","Relationship",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("shape=rhombus;double=1;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",120,60,"Relationship","Identifying Relationship",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("ellipse;shape=cloud;whiteSpace=wrap;html=1;align=center;",100,60,"Cloud","Cloud",null,null,"db database schema er entity relation table cloud"),-this.addEntry("db database schema er entity relation table hierarchy",function(){var e=new mxCell("",new mxGeometry(0,0,100,100),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;");e.vertex=!0;var f=new mxCell("main",new mxGeometry(0,0,50,100),"html=1;shape=mxgraph.er.anchor;whiteSpace=wrap;");f.vertex=!0;e.insert(f);f=new mxCell("sub",new mxGeometry(50,5,45,90),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;whiteSpace=wrap;points=[];strokeColor=inherit;fillColor=inherit;");f.vertex=!0;e.insert(f);-return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Hierarchy")}),this.createVertexTemplateEntry("shape=note;size=20;whiteSpace=wrap;html=1;",100,100,"Note","Note",null,null,"db database schema er entity relation table note"),this.addEntry("db database schema er entity relation table relation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;")],160,0,"Untitled Relation")}),this.addEntry("db database schema er entity relation table mandatory participation chen",-function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"1")],160,0,"Mandatory Participation (0:1)")}),this.addEntry("db database schema er entity relation table mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"N")],160,0,"Mandatory Participation (0:N)")}),this.addEntry("db database schema er entity relation table mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",-"M","N")],160,0,"Mandatory Participation (M:N)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",null,"1")],160,0,"Optional Participation (0:1)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",null,-"N")],160,0,"Optional Participation (0:N)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;","M","N")],160,0,"Optional Participation (M:N)")}),this.addEntry("db database schema er entity relation table recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;",null,"1")],160,0,"Recursive Relationship (0:1)")}),+e.vertex=!0;var f=new mxCell("+Attribute1\n+Attribute2\n+Attribute3",new mxGeometry(0,30,160,90),"align=left;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;fontSize=12;verticalAlign=top;resizable=0;rotatable=0;part=1;html=1;whiteSpace=wrap;");f.vertex=!0;e.insert(f);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Entity")}),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Entity",null,null,"db database schema er entity relation table "),+this.createVertexTemplateEntry("rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Entity (Rounded)",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Weak Entity",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,"Attribute","Attribute",null,null,"db database schema er entity relation table attribute chen"),+this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;",100,40,"Attribute","Key Attribute",null,null,"db database schema er entity relation table attribute key chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,'<span style="border-bottom: 1px dotted">Attribute</span>',"Weak Key Attribute",null,null,"db database schema er entity relation table attribute key weak chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;dashed=1;",+100,40,"Attribute","Derived Attribute",null,null,"db database schema er entity relation table attribute derived chen"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;margin=3;whiteSpace=wrap;html=1;align=center;",100,40,"Attribute","Multivalue Attribute",null,null,"db database schema er entity relation table attribute multivalue chen"),this.createVertexTemplateEntry("shape=associativeEntity;whiteSpace=wrap;html=1;align=center;",140,60,"Associative\nEntity","Associative Entity",null,null,+"db database schema er entity relation table associative entity chen"),this.createVertexTemplateEntry("shape=rhombus;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",120,60,"Relationship","Relationship",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("shape=rhombus;double=1;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",120,60,"Relationship","Identifying Relationship",null,null,"db database schema er entity relation table chen"),+this.createVertexTemplateEntry("ellipse;shape=cloud;whiteSpace=wrap;html=1;align=center;",100,60,"Cloud","Cloud",null,null,"db database schema er entity relation table cloud"),this.addEntry("db database schema er entity relation table hierarchy",function(){var e=new mxCell("",new mxGeometry(0,0,100,100),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;");e.vertex=!0;var f=new mxCell("main",new mxGeometry(0,0,50,100),"html=1;shape=mxgraph.er.anchor;whiteSpace=wrap;");f.vertex=!0;e.insert(f);f=new mxCell("sub",+new mxGeometry(50,5,45,90),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;whiteSpace=wrap;points=[];strokeColor=inherit;fillColor=inherit;");f.vertex=!0;e.insert(f);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Hierarchy")}),this.createVertexTemplateEntry("shape=note;size=20;whiteSpace=wrap;html=1;",100,100,"Note","Note",null,null,"db database schema er entity relation table note"),this.addEntry("db database schema er entity relation table relation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;")],+160,0,"Untitled Relation")}),this.addEntry("db database schema er entity relation table mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"1")],160,0,"Mandatory Participation (0:1)")}),this.addEntry("db database schema er entity relation table mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"N")],160,0,"Mandatory Participation (0:N)")}),this.addEntry("db database schema er entity relation table mandatory participation chen",+function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;","M","N")],160,0,"Mandatory Participation (M:N)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",null,"1")],160,0,"Optional Participation (0:1)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",+null,"N")],160,0,"Optional Participation (0:N)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;","M","N")],160,0,"Optional Participation (M:N)")}),this.addEntry("db database schema er entity relation table recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;",null,"1")],160,0,"Recursive Relationship (0:1)")}),this.addEntry("db database schema er entity relation table recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;",null,"N")],160,0,"Recursive Relationship (0:N)")}),this.addEntry("db database schema er entity relation table recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;","M","N")],160,0,"Recursive Relationship (M:N)")}),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;endFill=1;",100,100,"","0 to Many Optional",null,"db database schema er entity relation table zero many optional"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;",100,100,"","1 to Many",null,"db database schema er entity relation table one many"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;",100,100,"","1 Mandatory",null,"db database schema er entity relation table one mandatory"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;startArrow=ERmandOne;",100,100,"","1 to 1",null,"db database schema er entity relation table one"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERone;endFill=1;",100,100,"","1",null,"db database schema er entity relation table one"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;endFill=1;",100,100,"","0 to 1",null,"db database schema er entity relation table zero one"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmany;",@@ -12323,7 +12323,7 @@ function(k){n.clearCellOverlays();var v=n.getModel().getChildren(n.getDefaultParc.appendChild(l);this.graph=n};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);-var BackgroundImageDialog=function(b,e,f,c,l){function n(){null==q||q==mxConstants.NONE?(O.style.display="none",V.checked=!1):(O.style.backgroundColor=q,O.style.display="",V.checked=!0)}var p=b.editor.graph,u=document.createElement("div");u.style.whiteSpace="nowrap";var F=document.createElement("h2");mxUtils.write(F,mxResources.get("background"));F.style.marginTop="0px";u.appendChild(F);var H=null!=f&&null!=f.originalSrc;F=!1;var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";+var BackgroundImageDialog=function(b,e,f,c,l){function n(){null==q||q==mxConstants.NONE?(P.style.display="none",V.checked=!1):(P.style.backgroundColor=q,P.style.display="",V.checked=!0)}var p=b.editor.graph,u=document.createElement("div");u.style.whiteSpace="nowrap";var F=document.createElement("h2");mxUtils.write(F,mxResources.get("background"));F.style.marginTop="0px";u.appendChild(F);var H=null!=f&&null!=f.originalSrc;F=!1;var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","geBackgroundImageDialogOption");var K=document.createElement("input");K.style.cssText="margin-right:8px;margin-bottom:8px;";K.setAttribute("value","url");K.setAttribute("type","radio");K.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.width="360px";d.value=H||null==f?"":f.src;var g=document.createElement("select");g.style.width="360px";if(null!=b.pages)for(var k=0;k<b.pages.length;k++){var v=document.createElement("option");mxUtils.write(v,b.pages[k].getName()||mxResources.get("pageWithNumber",[k+1]));v.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&v.setAttribute("disabled","disabled");null!=f&&f.originalSrc==v.getAttribute("value")&&(v.setAttribute("selected","selected"),F=!0);g.appendChild(v)}H||null!=b.pages&&1!=b.pages.length||(E.style.display="none",K.style.display="none",g.style.display="none");var t=document.createElement("option"),x=!1,A=!1,J=function(B,C){x||null!=B&&A||(K.checked?null!=C&&C(t.selected?null:g.value):""==d.value||b.isOffline()?(G.value="",R.value="",null!=C&&C("")):(d.value=mxUtils.trim(d.value),b.loadImage(d.value,function(M){G.value=M.width;R.value=M.height;null!=C&&C(d.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));G.value="";R.value="";null!=C&&C(null)})))},D=mxUtils.bind(this,@@ -12334,8 +12334,8 @@ function(M){null!=C&&(C.parentNode.removeChild(C),C=null);if(0<M.dataTransfer.fiJ);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&&(d.value=B.url,J()));d.focus()};u.appendChild(K);u.appendChild(g);mxUtils.br(u);mxUtils.br(u);H?(K.setAttribute("checked","checked"),K.checked=!0):(E.setAttribute("checked","checked"),E.checked=!0);!F&&K.checked&&(mxUtils.write(t,mxResources.get("pageNotFound")),t.setAttribute("disabled","disabled"),t.setAttribute("selected","selected"),t.setAttribute("value","pageNotFound"),g.appendChild(t),mxEvent.addListener(g,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)}));f=document.createElement("div");f.style.display=l?"inline-flex":"none";f.style.alignItems="center";f.style.cursor="default";f.style.minWidth="40%";f.style.height="20px";var V=document.createElement("input");V.setAttribute("type","checkbox");V.style.margin="0px 10px 0px 4px";V.style.verticalAlign="bottom";V.defaultChecked=c!=mxConstants.NONE&&null!=c;V.checked=V.defaultChecked;f.appendChild(V);mxUtils.write(f,mxResources.get("fillColor"));l=f.cloneNode(!1);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.style.margin="0px 10px 0px 30px";Q.style.verticalAlign="bottom";Q.defaultChecked=p.shadowVisible;Q.checked=Q.defaultChecked;l.appendChild(Q);mxUtils.write(l,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||Q.setAttribute("disabled","disabled");mxEvent.addListener(l,"click",function(B){mxEvent.getSource(B)!=-Q&&(Q.checked=!Q.checked)});var O=document.createElement("button");O.style.width="36px";O.style.height="18px";O.style.cursor="pointer";O.style.marginLeft="10px";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.verticalAlign="bottom";O.className="geColorBtn";var q=c;n();mxEvent.addListener(f,"click",function(B){mxEvent.getSource(B)!=V&&(V.checked=!V.checked);q=V.checked?"#ffffff":null;n()});mxEvent.addListener(O,"click",function(B){b.pickColor(q||"none",function(C){q=-C;n()});mxEvent.consume(B)});f.appendChild(O);u.appendChild(f);u.appendChild(l);mxUtils.br(u);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);l=mxUtils.button(mxResources.get("reset"),function(){d.value="";G.value="";R.value="";E.checked=!0;q=mxConstants.NONE;n();x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className=+Q&&(Q.checked=!Q.checked)});var P=document.createElement("button");P.style.width="36px";P.style.height="18px";P.style.cursor="pointer";P.style.marginLeft="10px";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.verticalAlign="bottom";P.className="geColorBtn";var q=c;n();mxEvent.addListener(f,"click",function(B){mxEvent.getSource(B)!=V&&(V.checked=!V.checked);q=V.checked?"#ffffff":null;n()});mxEvent.addListener(P,"click",function(B){b.pickColor(q||"none",function(C){q=+C;n()});mxEvent.consume(B)});f.appendChild(P);u.appendChild(f);u.appendChild(l);mxUtils.br(u);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);l=mxUtils.button(mxResources.get("reset"),function(){d.value="";G.value="";R.value="";E.checked=!0;q=mxConstants.NONE;n();x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className="geBtn";l.width="100";c.appendChild(l);if(Graph.fileSupport){var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");mxEvent.addListener(y,"change",function(B){null!=y.files&&(D(y.files),y.type="",y.type="file",y.value="")});y.style.display="none";u.appendChild(y);l=mxUtils.button(mxResources.get("open"),function(){y.click()});l.className="geBtn";c.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();J(null,function(B){e(""!=B&&null!=B?new mxImage(B,G.value,R.value):null,null==B,q,!mxClient.IS_SVG||mxClient.IS_SF?null:Q.checked)})});mxEvent.addGestureListeners(applyBtn,function(){A=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(p);u.appendChild(c);this.container=u},ParseDialog=function(b,e,f){function c(g,k,v){var t=g.split("\n");if("plantUmlPng"==k||"plantUmlSvg"==k||"plantUmlTxt"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(T,m,z,I,L){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(new mxRectangle(0,0,I,L));var N=null;A.getModel().beginUpdate();try{N="txt"==m?b.insertAsPreText(z,n.x,n.y):A.insertVertex(null,null,null,n.x,n.y,I,L,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(z)+";"),A.setAttributeForCell(N,"plantUmlData",JSON.stringify({data:T,format:m},null,2))}finally{A.getModel().endUpdate()}null!=N&&(A.setSelectionCell(N),A.scrollCellToVisible(N))},A=b.editor.graph,J="plantUmlTxt"==@@ -12343,17 +12343,17 @@ k?"txt":"plantUmlPng"==k?"png":"svg";"@startuml\nskinparam shadowing false\nAlic295,212)},200):b.generatePlantUmlImage(g,J,function(T,m,z){b.spinner.stop();x(g,J,T,m,z)},function(T){b.handleError(T)})}}else if("mermaid"==k||"mermaid2drawio"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var D=0;D<t.length&&(0==t[D].trim().length||"%%"==t[D].substring(0,2));)D++;if("---"==t[D].trim()){do D++;while(D<t.length&&"---"!=t[D].trim());D++}D=t[D].trim().toLowerCase();t=D.indexOf(" ");D=D.substring(0,0<t?t:D.length);var G="undefined"!==typeof mxMermaidToDrawio&&"mermaid2drawio"==k&&("graph"==D||"flowchart"==D||"sequencediagram"==D||"classdiagram"==D||"statediagram-v2"==D||"statediagram"==D||"erdiagram"==D||"requirementdiagram"==D||"gitgraph"==D||"mindmap"==D||"journey"==D);A=b.editor.graph;G&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();A.setSelectionCells(b.importXml(T,Math.max(n.x,20),Math.max(n.y,20),!0,null,null,!0));A.scrollCellToVisible(A.getSelectionCell())}));b.generateMermaidImage(g,null,function(T,m,z){if(!G){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(new mxRectangle(0,0,m,z));b.spinner.stop();var I=null;A.getModel().beginUpdate();try{I=A.insertVertex(null,null,null,n.x,n.y,m,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+T+";"),A.setAttributeForCell(I,"mermaidData",JSON.stringify({data:g},null,2))}finally{A.getModel().endUpdate()}null!=I&&(A.setSelectionCell(I),A.scrollCellToVisible(I))}},function(T){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(T)})}}else if("table"==-k){k=null;var R=[],V=0,Q={};for(D=0;D<t.length;D++){var O=mxUtils.trim(t[D]);if("primary key"==O.substring(0,11).toLowerCase()){var q=O.match(/\((.+)\)/);q&&q[1]&&(Q[q[1]]=!0);t.splice(D,1)}else 0<O.toLowerCase().indexOf("primary key")&&(Q[O.split(" ")[0]]=!0,t[D]=mxUtils.trim(O.replace(/primary key/i,"")))}for(D=0;D<t.length;D++)if(O=mxUtils.trim(t[D]),"create table"==O.substring(0,12).toLowerCase())O=mxUtils.trim(O.substring(12)),"("==O.charAt(O.length-1)&&(O=mxUtils.trim(O.substring(0,O.length--1))),k=new mxCell(O,new mxGeometry(V,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),k.vertex=!0,R.push(k),O=b.editor.graph.getPreferredSizeForCell(y),null!=O&&(k.geometry.width=O.width+10);else if(null!=k&&")"==O.charAt(0))V+=k.geometry.width+40,k=null;else if("("!=O&&null!=k){O=O.substring(0,","==O.charAt(O.length-1)?O.length-1:O.length);q=Q[O.split(" ")[0]];var y=new mxCell("",new mxGeometry(0,-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(q?"1":"0")+";");y.vertex=!0;var B=new mxCell(q?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(q?"fontStyle=1;":""));B.vertex=!0;y.insert(B);O=new mxCell(O,new mxGeometry(30,-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));O.vertex=!0;y.insert(O);O=b.editor.graph.getPreferredSizeForCell(O);null!=O&&k.geometry.width<O.width+30&&(k.geometry.width=Math.min(320,Math.max(k.geometry.width,O.width+30)));k.insert(y,q?0:null);k.geometry.height+=30}0<R.length&&(A=b.editor.graph,n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,-!0)),A.setSelectionCells(A.importCells(R,n.x,n.y)),A.scrollCellToVisible(A.getSelectionCell()))}else if("list"==k){if(0<t.length){A=b.editor.graph;k=null;R=[];for(D=y=0;D<t.length;D++)";"!=t[D].charAt(0)&&(0==t[D].length?k=null:null==k?(k=new mxCell(t[D],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),k.vertex=!0,R.push(k),O=A.getPreferredSizeForCell(k),-null!=O&&k.geometry.width<O.width+10&&(k.geometry.width=O.width+10),y+=k.geometry.width+40):"--"==t[D]?(O=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;"),O.vertex=!0,k.geometry.height+=O.geometry.height,k.insert(O)):0<t[D].length&&(V=new mxCell(t[D],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;"),-V.vertex=!0,O=A.getPreferredSizeForCell(V),null!=O&&V.geometry.width<O.width&&(V.geometry.width=O.width),k.geometry.width=Math.max(k.geometry.width,V.geometry.width),k.geometry.height+=V.geometry.height,k.insert(V)));if(0<R.length){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0));A.getModel().beginUpdate();try{R=A.importCells(R,n.x,n.y);O=[];for(D=0;D<R.length;D++)O.push(R[D]),O=O.concat(R[D].children);A.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{A.getModel().endUpdate()}A.setSelectionCells(R);+k){k=null;var R=[],V=0,Q={};for(D=0;D<t.length;D++){var P=mxUtils.trim(t[D]);if("primary key"==P.substring(0,11).toLowerCase()){var q=P.match(/\((.+)\)/);q&&q[1]&&(Q[q[1]]=!0);t.splice(D,1)}else 0<P.toLowerCase().indexOf("primary key")&&(Q[P.split(" ")[0]]=!0,t[D]=mxUtils.trim(P.replace(/primary key/i,"")))}for(D=0;D<t.length;D++)if(P=mxUtils.trim(t[D]),"create table"==P.substring(0,12).toLowerCase())P=mxUtils.trim(P.substring(12)),"("==P.charAt(P.length-1)&&(P=mxUtils.trim(P.substring(0,P.length-+1))),k=new mxCell(P,new mxGeometry(V,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),k.vertex=!0,R.push(k),P=b.editor.graph.getPreferredSizeForCell(y),null!=P&&(k.geometry.width=P.width+10);else if(null!=k&&")"==P.charAt(0))V+=k.geometry.width+40,k=null;else if("("!=P&&null!=k){P=P.substring(0,","==P.charAt(P.length-1)?P.length-1:P.length);q=Q[P.split(" ")[0]];var y=new mxCell("",new mxGeometry(0,+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(q?"1":"0")+";");y.vertex=!0;var B=new mxCell(q?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(q?"fontStyle=1;":""));B.vertex=!0;y.insert(B);P=new mxCell(P,new mxGeometry(30,+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));P.vertex=!0;y.insert(P);P=b.editor.graph.getPreferredSizeForCell(P);null!=P&&k.geometry.width<P.width+30&&(k.geometry.width=Math.min(320,Math.max(k.geometry.width,P.width+30)));k.insert(y,q?0:null);k.geometry.height+=30}0<R.length&&(A=b.editor.graph,n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,+!0)),A.setSelectionCells(A.importCells(R,n.x,n.y)),A.scrollCellToVisible(A.getSelectionCell()))}else if("list"==k){if(0<t.length){A=b.editor.graph;k=null;R=[];for(D=y=0;D<t.length;D++)";"!=t[D].charAt(0)&&(0==t[D].length?k=null:null==k?(k=new mxCell(t[D],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),k.vertex=!0,R.push(k),P=A.getPreferredSizeForCell(k),+null!=P&&k.geometry.width<P.width+10&&(k.geometry.width=P.width+10),y+=k.geometry.width+40):"--"==t[D]?(P=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;"),P.vertex=!0,k.geometry.height+=P.geometry.height,k.insert(P)):0<t[D].length&&(V=new mxCell(t[D],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;"),+V.vertex=!0,P=A.getPreferredSizeForCell(V),null!=P&&V.geometry.width<P.width&&(V.geometry.width=P.width),k.geometry.width=Math.max(k.geometry.width,V.geometry.width),k.geometry.height+=V.geometry.height,k.insert(V)));if(0<R.length){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0));A.getModel().beginUpdate();try{R=A.importCells(R,n.x,n.y);P=[];for(D=0;D<R.length;D++)P.push(R[D]),P=P.concat(R[D].children);A.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{A.getModel().endUpdate()}A.setSelectionCells(R);A.scrollCellToVisible(A.getSelectionCell())}}}else{y=function(T){var m=C[T];null==m&&(m=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),m.vertex=!0,C[T]=m,R.push(m));return m};var C={};R=[];for(D=0;D<t.length;D++)if(";"!=t[D].charAt(0)){var M=t[D].split("->");2<=M.length&&(q=y(M[0]),B=y(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,M.geometry.relative=!0,q.insertEdge(M,!0),B.insertEdge(M,!1),R.push(M))}if(0<R.length){t=document.createElement("div");t.style.visibility=-"hidden";document.body.appendChild(t);A=new Graph(t);A.getModel().beginUpdate();try{R=A.importCells(R);for(D=0;D<R.length;D++)A.getModel().isVertex(R[D])&&(O=A.getPreferredSizeForCell(R[D]),R[D].geometry.width=Math.max(R[D].geometry.width,O.width),R[D].geometry.height=Math.max(R[D].geometry.height,O.height));D=!0;"horizontalFlow"==k||"verticalFlow"==k?((new mxHierarchicalLayout(A,"horizontalFlow"==k?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(A.getDefaultParent(),R),D=!1):"circle"==-k?(new mxCircleLayout(A)).execute(A.getDefaultParent()):(V=new mxFastOrganicLayout(A),V.disableEdgeStyle=!1,V.forceConstant=180,V.execute(A.getDefaultParent()));D&&(Q=new mxParallelEdgeLayout(A),Q.spacing=30,Q.execute(A.getDefaultParent()))}finally{A.getModel().endUpdate()}A.clearCellOverlays();O=[];b.editor.graph.getModel().beginUpdate();try{R=A.getModel().getChildren(A.getDefaultParent()),n=mxEvent.isAltDown(v)?n:b.editor.graph.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0)),O=b.editor.graph.importCells(R,-n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(O);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());A.destroy();t.parentNode.removeChild(t)}}}function l(){return"list"==u.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"==u.value||+"hidden";document.body.appendChild(t);A=new Graph(t);A.getModel().beginUpdate();try{R=A.importCells(R);for(D=0;D<R.length;D++)A.getModel().isVertex(R[D])&&(P=A.getPreferredSizeForCell(R[D]),R[D].geometry.width=Math.max(R[D].geometry.width,P.width),R[D].geometry.height=Math.max(R[D].geometry.height,P.height));D=!0;"horizontalFlow"==k||"verticalFlow"==k?((new mxHierarchicalLayout(A,"horizontalFlow"==k?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(A.getDefaultParent(),R),D=!1):"circle"==+k?(new mxCircleLayout(A)).execute(A.getDefaultParent()):(V=new mxFastOrganicLayout(A),V.disableEdgeStyle=!1,V.forceConstant=180,V.execute(A.getDefaultParent()));D&&(Q=new mxParallelEdgeLayout(A),Q.spacing=30,Q.execute(A.getDefaultParent()))}finally{A.getModel().endUpdate()}A.clearCellOverlays();P=[];b.editor.graph.getModel().beginUpdate();try{R=A.getModel().getChildren(A.getDefaultParent()),n=mxEvent.isAltDown(v)?n:b.editor.graph.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0)),P=b.editor.graph.importCells(R,+n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(P);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());A.destroy();t.parentNode.removeChild(t)}}}function l(){return"list"==u.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"==u.value||"mermaid2drawio"==u.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==u.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"==u.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"==u.value||"plantUmlTxt"==u.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":";Example:\na->b\nb->edge label->c\nc->a\n"}var n=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var p=document.createElement("textarea");p.style.boxSizing="border-box";p.style.resize="none";p.style.width="100%";p.style.height="354px";p.style.marginBottom="16px";var u=document.createElement("select");u.className="geBtn";if("formatSql"==f||"mermaid"==f&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())u.style.display="none";var F=document.createElement("option");F.setAttribute("value","list");mxUtils.write(F,mxResources.get("list"));"plantUml"!=f&&"mermaid"!=f&&u.appendChild(F);null!=f&&"fromText"!=f||F.setAttribute("selected","selected");F=document.createElement("option");@@ -12377,15 +12377,15 @@ la.appendChild(ta);return la}function G(){null!=aa&&aa==ha&&EditorUi.logEvent({cla,mxUtils.bind(this,function(na,ra,za){va(ra,za,na.value)}),null,null,null,null,b.mode);b.showDialog(ta.container,420,150,!0,!1);ta.init()}else b.pickFolder(b.mode,function(na){va(b.mode,na,la)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function R(la,va,ta,na,ra,za,Ga){return da!=la?(null!=da&&(da.style.backgroundColor="transparent",da.style.border="2px solid transparent",0<da.getElementsByTagName("table").length&&(da.getElementsByTagName("table")[0].style.visibility="visible"),da==sa&&(sa.style.backgroundImage=Ea,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",wa.style.visibility="hidden",Ca.style.visibility="hidden",Fa.style.visibility="hidden",Aa.style.visibility="hidden",Da.style.visibility=null!=ha?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=la.style.backgroundImage&&0<la.getElementsByTagName("table").length&&(la.getElementsByTagName("table")[0].style.visibility="hidden"),la==sa&&(va=ha,null!=va?(Da.style.visibility="visible",Da.style.visibility=null!=ha?"visible":"hidden",Aa.style.visibility="visible"):(wa.style.visibility="visible",Ca.style.visibility="visible",Fa.style.visibility="visible",Aa.style.visibility="hidden",Da.style.visibility="hidden")),I.removeAttribute("disabled"),aa=va,ca=ta,fa=za,da=la,ia=na,pa=Ga,oa=ra,da.style.border=F,!0):!1}function V(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";wa.style.visibility=-"visible";Ca.style.visibility="visible";Fa.style.visibility="visible";Aa.style.visibility="hidden";Da.style.visibility="hidden";wa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?wa.select():document.execCommand("selectAll",!1,null)}function Q(){wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";sa.style.backgroundImage=Ea;sa.style.backgroundSize="contain";Aa.style.visibility="visible";Da.style.visibility="visible"}function O(la){var va=mxUtils.trim(wa.value);+"visible";Ca.style.visibility="visible";Fa.style.visibility="visible";Aa.style.visibility="hidden";Da.style.visibility="hidden";wa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?wa.select():document.execCommand("selectAll",!1,null)}function Q(){wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";sa.style.backgroundImage=Ea;sa.style.backgroundSize="contain";Aa.style.visibility="visible";Da.style.visibility="visible"}function P(la){var va=mxUtils.trim(wa.value);if(la||""==va)null!=xa&&(wa.value=xa,Q());else{wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";var ta=!1;la='Write a detailed and complex MermaidJS declaration for "'+(""!=va?va:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(na){na!=b.emptyDiagramXml&&(ta=!0,aa=na)}));sa.style.backgroundImage="url("+Editor.spinImage+")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(la,function(na,ra,za,Ga){da==sa&&"hidden"==wa.style.visibility&&(Ea="url(data:image/svg+xml;base64,"+ra.substring(ra.indexOf(",")+1)+")",sa.setAttribute("title",va),ha=aa=na=ta?aa:b.createMermaidXml(na,EditorUi.defaultMermaidConfig,ra,za,Ga,va),xa=va,Q())},function(na){da==sa&&(wa.style.visibility="visible",Ca.style.visibility="visible",Fa.style.visibility="visible",Aa.style.visibility="visible",Da.style.visibility="visible",b.handleError(na))})}}-function q(la,va,ta,na,ra,za,Ga,Ia,Pa,La,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==la||N||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=P){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+-P.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+P.naturalWidth+'" height="'+P.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";J(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ta,la)}else b.sidebar.currentElt=Ha,N=!0,Ma(la,function(hb){if(N&&b.sidebar.currentElt==Ha)try{J(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ha,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}N=!1})}function Ya(){var Oa=document.createElement("table");+function q(la,va,ta,na,ra,za,Ga,Ia,Pa,La,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==la||N||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=O){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='++O.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+O.naturalWidth+'" height="'+O.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";J(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ta,la)}else b.sidebar.currentElt=Ha,N=!0,Ma(la,function(hb){if(N&&b.sidebar.currentElt==Ha)try{J(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ha,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}N=!1})}function Ya(){var Oa=document.createElement("table");Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var bb=document.createElement("tbody"),cb=document.createElement("tr"),hb=document.createElement("td");hb.setAttribute("align","center");hb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius="8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=ka-34+"px";mxUtils.write(Za,mxResources.get(ta,null,ta));hb.appendChild(Za);cb.appendChild(hb);bb.appendChild(cb);Oa.appendChild(bb);return Oa}var Ha=null;if("generative"!=Va||null==sa){Ha=document.createElement("div");Ha.className="geTemplate geAdaptiveAsset";Ha.style.backgroundOrigin="content-box";Ha.style.backgroundPosition="center center";Ha.style.backgroundRepeat="no-repeat";Ha.style.backgroundSize="contain";Ha.style.boxSizing="border-box";Ha.style.borderRadius="12px";Ha.style.position="relative";Ha.style.height=ka+"px";Ha.style.width=Ba+"px";Ha.style.padding="4px";Ha.style.border="2px solid transparent";var fb=null,Ta=la;null!=ta?Ha.setAttribute("title",mxResources.get(ta,null,ta)):null!=na&&0<na.length&&Ha.setAttribute("title",na)}else Ha=sa;if(null!=za){Ha.style.display="inline-flex";Ha.style.justifyContent="center";Ha.style.alignItems="center";ra=document.createElement("img");-ra.setAttribute("src",za);ra.setAttribute("alt",na);ra.style.maxWidth=ka+"px";ra.style.maxHeight=Ba+"px";P=ra;var ib=za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(ra);ra.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga,Na)}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){G();mxEvent.consume(Oa)})}else if(!La&&null!=la&&0<la.length){var gb=+ra.setAttribute("src",za);ra.setAttribute("alt",na);ra.style.maxWidth=ka+"px";ra.style.maxHeight=Ba+"px";O=ra;var ib=za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(ra);ra.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga,Na)}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){G();mxEvent.consume(Oa)})}else if(!La&&null!=la&&0<la.length){var gb=function(Oa){z.spin(qa)&&Ma(la,function(bb,cb){z.stop();null!=bb&&(R(Ha,bb,va,null,null,Na,cb),Oa&&G())})};za=Pa||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";Ha.style.backgroundImage="url("+za+")";null!=ta&&Ha.appendChild(Ya());mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ha.appendChild(Ya()),"generative"==Va&&null==sa&&(Ha.style.backgroundImage=Ea,Ha.style.overflow="visible",Ha.appendChild(Da),Ha.appendChild(Aa),Ha.appendChild(wa),Ha.appendChild(Ca),Ha.appendChild(Fa),sa=Ha),ra&&R(Ha),null!=Ia?(mxEvent.addGestureListeners(Ha,null,null,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga)})),mxEvent.addListener(Ha,"click",Ia)):(mxEvent.addListener(Ha,"click",function(Oa){R(Ha,null,null,la,Ga)&&"generative"==Va&&null==ha&&V()}),mxEvent.addListener(Ha,"dblclick",function(Oa){"generative"!=Va?G():"hidden"==wa.style.visibility&&V();mxEvent.consume(Oa)}));null!=la&&(za=L.cloneNode(!0),Ha.appendChild(za),mxEvent.addGestureListeners(za,mxUtils.bind(this,function(Oa){S=b.sidebar.currentElt==Ha}),null,null),mxEvent.addListener(za,"click",mxUtils.bind(this,function(Oa){S||Qa(Oa,null!=ta?ta:na);mxEvent.consume(Oa)})));qa.appendChild(Ha);return Ha}function y(){function la(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"…");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function va(Ma,Qa,Ya){mxEvent.addListener(Qa,@@ -12400,7 +12400,7 @@ u=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clIMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||u||!f||C.appendChild(M);f&&mxUtils.write(C,(u?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");M=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?M=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?M=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?M=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?M=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?M=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(M=b.trello.extension);var T=document.createElement("input");T.setAttribute("value",b.defaultFilename+M);T.style.marginLeft="10px";T.style.width=e||u?"144px":"244px";this.init=function(){f&&Editor.selectFilename(T);null!=qa.parentNode&&null!=qa.parentNode.parentNode&&mxEvent.addGestureListeners(qa.parentNode.parentNode,mxUtils.bind(this,function(la){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};f&&(C.appendChild(T),x?T.style.width=e||u?"350px":"450px":null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),x.style.marginLeft="6px",x.style.width=e||u?"80px":"180px",C.appendChild(x)));x=!1;var m=0,z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),I=mxUtils.button(v||mxResources.get("create"),function(){I.setAttribute("disabled",-"disabled");G();I.removeAttribute("disabled")});I.className="geBtn gePrimaryBtn";var L=document.createElement("img");L.setAttribute("src",Editor.magnifyImage);L.setAttribute("title",mxResources.get("preview"));L.className="geAdaptiveAsset geActiveButton";L.style.position="absolute";L.style.borderRadius="16px";L.style.background="white";L.style.cursor="default";L.style.padding="2px";L.style.opacity="0.8";L.style.height="16px";L.style.right="2px";L.style.top="2px";var N=!1,P=null,S=!1;if(K||d){var U=+"disabled");G();I.removeAttribute("disabled")});I.className="geBtn gePrimaryBtn";var L=document.createElement("img");L.setAttribute("src",Editor.magnifyImage);L.setAttribute("title",mxResources.get("preview"));L.className="geAdaptiveAsset geActiveButton";L.style.position="absolute";L.style.borderRadius="16px";L.style.background="white";L.style.cursor="default";L.style.padding="2px";L.style.opacity="0.8";L.style.height="16px";L.style.right="2px";L.style.top="2px";var N=!1,O=null,S=!1;if(K||d){var U=[],W=null,X=null,Z=null,Y=function(la){I.setAttribute("disabled","disabled");for(var va=0;va<U.length;va++)U[va].className=va==la?"geBtn gePrimaryBtn":"geBtn"};x=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";B.appendChild(v);u=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ma.style.display="";ua.style.display="";qa.style.left="160px";Y(0);qa.scrollTop=0;qa.innerText="";m=0;W!=Ua&&(Ua=W,Ja=X,ab=Z,ma.innerText="",y(),W=null)});U.push(u);v.appendChild(u);var ba=function(la){ma.style.display="none";ua.style.display="none";qa.style.left="30px";Y(la?-1:1);null==W&&(W=Ua);qa.scrollTop=0;qa.innerText="";z.spin(qa);var va=function(ta,na,ra){m=0;z.stop();Ua=ta;ra=ra||{};var za=0,Ga;for(Ga in ra)za+=ra[Ga].length;if(na)qa.innerText=na;else if(0==ta.length&&0==za)qa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(qa.innerText="",0<za){ma.style.display="";qa.style.left="160px";ma.innerText="";ab=0;Ja={"draw.io":ta};for(Ga in ra)Ja[Ga]=ra[Ga];y()}else A(!0)};la?d(ea.value,va):K(va)};K&&(u=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),v.appendChild(u),U.push(u));if(d){u=document.createElement("span");u.style.marginLeft="10px";u.innerText=mxResources.get("search")+":";v.appendChild(u);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(la){13==la.keyCode&&ba(!0)});v.appendChild(ea);@@ -12414,7 +12414,7 @@ ma.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68pwa.style.top="0px";wa.style.bottom="38px";wa.style.resize="none";wa.style.boxSizing="border-box";wa.style.fontSize="12px";wa.style.border="none";wa.style.margin="8px";var Ca=document.createElement("button");Ca.className="geBtn gePrimaryBtn";Ca.style.position="absolute";Ca.style.bottom="0px";Ca.style.height="30px";Ca.style.right="0px";Ca.style.left="0px";Ca.style.margin="8px";Ca.style.fontSize="14px";Ca.style.borderRadius="4px";Ca.setAttribute("disabled","disabled");Ca.setAttribute("title",mxResources.get("ok"));mxUtils.write(Ca,mxResources.get("ok"));var Da=L.cloneNode(!0),Ka=!1;mxEvent.addGestureListeners(Da,function(la){Ka=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(la){if(!Ka&&null!=ha){var va="<mxfile><diagram>"+Graph.compress(ha)+"</diagram></mxfile>";J(va,mxEvent.getClientX(la),mxEvent.getClientY(la),sa,xa)}});var Aa=L.cloneNode(!0);Aa.setAttribute("src",Editor.editImage);Aa.setAttribute("title",mxResources.get("edit"));Aa.style.right="";Aa.style.left="2px";var Fa=L.cloneNode(!0);Fa.setAttribute("src",Editor.helpImage);Fa.setAttribute("title",mxResources.get("help"));Fa.style.opacity="1";Fa.style.right="-8px";Fa.style.top="-8px";mxEvent.addListener(Fa,"click",function(la){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(la)});wa.style.visibility="hidden";Ca.style.visibility="hidden";Aa.style.visibility="hidden";Fa.style.visibility="hidden";Da.style.visibility="hidden";mxEvent.addListener(Aa,"click",V);mxEvent.addListener(wa,-"input",function(){""!=wa.value?Ca.removeAttribute("disabled"):Ca.setAttribute("disabled","disabled")});mxEvent.addListener(Ca,"click",function(){O()});mxEvent.addListener(wa,"keydown",function(la){13!=la.keyCode||mxEvent.isShiftDown(la)?27==la.keyCode&&(O(!0),mxEvent.consume(la)):(O(),mxEvent.consume(la))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==+"input",function(){""!=wa.value?Ca.removeAttribute("disabled"):Ca.setAttribute("disabled","disabled")});mxEvent.addListener(Ca,"click",function(){P()});mxEvent.addListener(wa,"keydown",function(la){13!=la.keyCode||mxEvent.isShiftDown(la)?27==la.keyCode&&(P(!0),mxEvent.consume(la)):(P(),mxEvent.consume(la))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ja.smartTemplate={content:D()});if(!e){var eb=function(){mxUtils.get($a,function(la){if(!jb){jb=!0;la=la.getXml().documentElement.firstChild;for(var va={};null!=la;){if("undefined"!==typeof la.getAttribute)if("parsererror"==la.nodeName)null!=window.console&&console.log("Parser error in "+E+": "+la.textContent);else if("clibs"==la.nodeName){for(var ta=la.getAttribute("name"),na=la.getElementsByTagName("add"),ra=[],za=0;za<na.length;za++)ra.push(encodeURIComponent(mxUtils.getTextContent(na[za])));null!=ta&&0<ra.length&&(va[ta]=ra.join(";"))}else if(ra=la.getAttribute("url"),null!=ra){na=la.getAttribute("section");ta=la.getAttribute("subsection");if(null==na&&(za=ra.indexOf("/"),na=ra.substring(0,za),null==ta)){var Ga=ra.indexOf("/",za+1);-1<Ga&&(ta=ra.substring(za+1,Ga))}za=Ja[na];null==za&&(za=[],Ja[na]=za);ra=la.getAttribute("clibs");null!=va[ra]&&(ra=va[ra]);ra={url:la.getAttribute("url"),libs:la.getAttribute("libs"),title:la.getAttribute("title"),tooltip:la.getAttribute("name")||la.getAttribute("url"),preview:la.getAttribute("preview"),clibs:ra,tags:la.getAttribute("tags")};za.push(ra);null!=ta&&(za=Ra[na],null==za&&(za={},Ra[na]=za),na=za[ta],null==na&&(na=[],za[ta]=na),na.push(ra))}la=la.nextSibling}z.stop();y()}})};B.appendChild(ua);B.appendChild(ma);@@ -12423,48 +12423,48 @@ function(){null!=n&&n();b.hideDialog(!0)});v.className="geBtn";!b.editor.cancelFmxResources.get("url"),null,null,null,!1);b.showDialog(la.container,300,80,!0,!0);la.init()}),e.className="geBtn",t.appendChild(e));Graph.fileSupport&&k&&(k=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var la=document.createElement("input");la.setAttribute("multiple","multiple");la.setAttribute("type","file");mxEvent.addListener(la,"change",function(va){b.openFiles(la.files,!0);la.value=""});la.style.display="none";document.body.appendChild(la);b.newDlgFileInputElt=la}b.newDlgFileInputElt.click()}),k.className="geBtn",t.appendChild(k));t.appendChild(I);b.editor.cancelFirst||null!=c||l&&null==n||t.appendChild(v);B.appendChild(t);this.container=B};NewDialog.tagsList={};var SaveDialog=function(b,e,f,c,l,n,p,u){function F(B,C,M,T,m,z){var I=null;if(null==c||0>mxUtils.indexOf(c,B))if(m=null!=m?m:b.getTitleForService(B),0<=mxUtils.indexOf(V,B)||null!=b.getServiceForName(B)){I=document.createElement("option");if("pick"==z)I.innerHTML=mxUtils.htmlEntities(m)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",I.setAttribute("value","pickFolder-"+B),I.setAttribute("title",m+" - "+mxResources.get("pickFolder")+"...");else{var L=B+-(null!=M?"-"+M:""),N=q[L];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));N=C;if(B!=App.MODE_GITHUB&&B==App.MODE_GITLAB){var P=N.lastIndexOf("/");0<=P&&(N=N.substring(P+1))}40<N.length&&(N=N.substring(0,20)+"..."+N.substring(N.length-20))}I.innerHTML=mxUtils.htmlEntities(m)+(null!=N?" – "+mxUtils.htmlEntities(N):"");I.setAttribute("title",m++(null!=M?"-"+M:""),N=q[L];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));N=C;if(B!=App.MODE_GITHUB&&B==App.MODE_GITLAB){var O=N.lastIndexOf("/");0<=O&&(N=N.substring(O+1))}40<N.length&&(N=N.substring(0,20)+"..."+N.substring(N.length-20))}I.innerHTML=mxUtils.htmlEntities(m)+(null!=N?" – "+mxUtils.htmlEntities(N):"");I.setAttribute("title",m+(null!=C?" ("+C+")":"")+(null!=M&&decodeURIComponent(M)!=C?" ["+M+"]":""));I.setAttribute("value",L);q[L]={option:I,mode:B,path:C,id:M};SaveDialog.lastValue==L&&null==u?T=!0:null==T&&("root"==z?T=null==u&&b.mode==B||null!=B&&B==u:"pickFolder-"==G.value.substring(0,11)&&(T=!0));T&&I.setAttribute("selected","selected")}G.appendChild(I)}return I}function H(B){b.pickFolder(B,function(C){var M=null;B==App.MODE_GOOGLE&&null!=C.docs&&0<C.docs.length?M={mode:B,path:C.docs[0].name,id:C.docs[0].id}:B==App.MODE_ONEDRIVE&&null!=C.value&&0<C.value.length?M={mode:B,path:C.value[0].name,id:OneDriveFile.prototype.getIdOf(C.value[0])}:(B==App.MODE_GITHUB||B==App.MODE_GITLAB)&&null!=C&&0<C.length&&(M={mode:B,path:decodeURIComponent(C),id:C});null!=M&&(R.style.display="",b.addRecent(M,"Folders",5),C=F(M.mode,M.path,M.id,!0),G.innerHTML="",q={},E(),M=G.selectedIndex,G.value=C.value,0>G.selectedIndex&&(G.selectedIndex=M))},!0,!0,!0,!0)}function E(){var B=b.getRecent("Folders"),C=0;if(null!=B&&0<B.length){for(var M=0;M<B.length;M++)null!=F(B[M].mode,B[M].path,B[M].id)&&C++;0<C&&G.appendChild(Q.cloneNode(!0))}F(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");F(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(F(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),F(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&F(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);F(App.MODE_GITHUB,null,null,null,null,"pick");F(App.MODE_GITLAB,null,null,null,null,"pick");F(App.MODE_TRELLO);B=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&B&&F(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&F(App.MODE_BROWSER);B&&F("download");Editor.popupsAllowed&&F("_blank",null,null,null,mxResources.get("openInNewWindow"));0<C&&(G.appendChild(Q.cloneNode(!0)),C=G.value,G.appendChild(R),-G.value=C);if("pickFolder-"==G.value.substring(0,11)||"reset"==G.value)C=document.createElement("option"),C.setAttribute("value",""),C.setAttribute("selected","selected"),mxUtils.write(C,mxResources.get("pickFolder")+"..."),G.insertBefore(C,G.firstChild);O=G.value}function K(){if("reset"==G.value)b.resetRecent("Folders"),G.innerHTML="",G.value="",pickFolderOption=null,q={},E();else if("pickFolder-"==G.value.substring(0,11)){var B=G.value.substring(11);G.value=O;H(B)}else if(null!=D&&null!=q[G.value]&&+G.value=C);if("pickFolder-"==G.value.substring(0,11)||"reset"==G.value)C=document.createElement("option"),C.setAttribute("value",""),C.setAttribute("selected","selected"),mxUtils.write(C,mxResources.get("pickFolder")+"..."),G.insertBefore(C,G.firstChild);P=G.value}function K(){if("reset"==G.value)b.resetRecent("Folders"),G.innerHTML="",G.value="",pickFolderOption=null,q={},E();else if("pickFolder-"==G.value.substring(0,11)){var B=G.value.substring(11);G.value=P;H(B)}else if(null!=D&&null!=q[G.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[D.value].extension){B=b.getExtensionForService(q[G.value].mode);var C=J.value;null!=B&&0>e.indexOf(".")&&0>C.indexOf(".")&&(J.value=C+B)}y.innerHTML="";mxUtils.write(y,mxResources.get("download"==G.value||"_blank"==G.value?"ok":"save"));""==G.value?y.setAttribute("disabled","disabled"):y.removeAttribute("disabled")}var d=document.createElement("div");d.style.display="flex";d.style.flexWrap="wrap";d.style.whiteSpace="nowrap";var g=document.createElement("div");g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoRows="auto auto 44px";g.style.gridAutoColumns="0fr minmax(0,1fr)";g.style.width="100%";var k=null,v=null;if(null!=l&&null!=n&&"image/"==n.substring(0,6)&&("image/svg"!=n.substring(0,9)||mxClient.IS_SVG)){g.style.display="inline-grid";g.style.flexBasis="75%";k=document.createElement("div");k.style.display="inline-block";k.style.height="auto";k.style.maxWidth="25%";k.style.margin="auto";var t=document.createElement("img"),x=p?l:btoa(unescape(encodeURIComponent(l)));t.setAttribute("src","data:"+n+";base64,"+x);t.style.boxSizing="border-box";t.style.maxHeight="50px";t.style.maxWidth="100%";t.style.paddingLeft="10px";k.appendChild(t);mxClient.IS_FF||"image/png"!=n||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(v=mxUtils.button(mxResources.get("copy"),function(){var B=b.base64ToBlob(x,"image/png");B=new ClipboardItem({"image/png":B,"text/html":new Blob(['<img src="data:'+n+";base64,"+x+'">'],{type:"text/html"})});navigator.clipboard.write([B]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(C){b.handleError(C)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(k.setAttribute("title",mxResources.get("openInNewWindow")),k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(B){mxEvent.isPopupTrigger(B)||b.openInNewWindow(l,n,p)})):k.setAttribute("title",mxResources.get("preview"))}t=document.createElement("div");t.style.display="flex";t.style.padding="1px";t.style.alignItems="center";t.style.justifyContent="flex-end";t.style.gridColumn="1";t.style.whiteSpace="nowrap";var A=document.createElement("div");A.style.display="grid";A.style.padding="1px";A.style.alignItems="center";A.style.gridColumn="2";A.style.gridAutoColumns="minmax(0,1fr) auto";A.style.gap="6px";mxUtils.write(t,mxResources.get("saveAs")+":");var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("value",e);J.style.boxSizing="border-box";J.style.width="100%";A.appendChild(J);g.appendChild(t);g.appendChild(A);var D=null;null!=b.editor.diagramFileTypes&&null==n&&(t=t.cloneNode(!1),A=A.cloneNode(!1),mxUtils.write(t,mxResources.get("type")+":"),D=FilenameDialog.createFileTypes(b,J,b.editor.diagramFileTypes),D.style.boxSizing="border-box",D.style.width="100%",A.appendChild(D),g.appendChild(t),g.appendChild(A));t=t.cloneNode(!1);A=A.cloneNode(!1);mxUtils.write(t,mxResources.get("where")+":");var G=document.createElement("select");-G.style.textOverflow="ellipsis";G.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var V=["browser","device","download","_blank"],Q=document.createElement("option");Q.setAttribute("disabled","disabled");Q.innerHTML="-----------------";var O=null,q={},y=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=G.value;var B=q[SaveDialog.lastValue];null!=B&&f(J,B.mode,B.id)},null,"geBtn gePrimaryBtn");+G.style.textOverflow="ellipsis";G.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var V=["browser","device","download","_blank"],Q=document.createElement("option");Q.setAttribute("disabled","disabled");Q.innerHTML="-----------------";var P=null,q={},y=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=G.value;var B=q[SaveDialog.lastValue];null!=B&&f(J,B.mode,B.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(J,"keypress",function(B){13==B.keyCode&&y.click()});mxEvent.addListener(G,"change",K);E();K();A.appendChild(G);null!=SaveDialog.lastValue&&null!=q[SaveDialog.lastValue]&&(G.value=SaveDialog.lastValue);g.appendChild(t);g.appendChild(A);d.appendChild(g);null!=k&&d.appendChild(k);g=document.createElement("div");g.style.flexBasis="100%";g.style.textAlign="right";g.style.marginTop=null!=n?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));-k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&g.appendChild(k);null!=v&&g.appendChild(v);g.appendChild(y);b.editor.cancelFirst||g.appendChild(k);d.appendChild(g);this.init=function(){Editor.selectFilename(J)};this.container=d},CreateDialog=function(b,e,f,c,l,n,p,u,F,H,E,K,d,g,k,v,t){function x(O,q,y,B){function C(){mxEvent.addListener(M,"click",function(){var L=y;if(p){var N=D.value,P=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>P){L=null!=-L?L:Q.value;var S="";L==App.MODE_GOOGLE?S=b.drive.extension:L==App.MODE_GITHUB?S=b.gitHub.extension:L==App.MODE_GITLAB?S=b.gitLab.extension:L==App.MODE_TRELLO?S=b.trello.extension:L==App.MODE_DROPBOX?S=b.dropbox.extension:L==App.MODE_ONEDRIVE?S=b.oneDrive.extension:L==App.MODE_DEVICE&&(S=".drawio");0<=P&&(N=N.substring(0,P));D.value=N+S}}A(y)})}var M=document.createElement("a");M.style.overflow="hidden";var T=document.createElement("img");T.src=O;T.setAttribute("border","0");T.setAttribute("align",+k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&g.appendChild(k);null!=v&&g.appendChild(v);g.appendChild(y);b.editor.cancelFirst||g.appendChild(k);d.appendChild(g);this.init=function(){Editor.selectFilename(J)};this.container=d},CreateDialog=function(b,e,f,c,l,n,p,u,F,H,E,K,d,g,k,v,t){function x(P,q,y,B){function C(){mxEvent.addListener(M,"click",function(){var L=y;if(p){var N=D.value,O=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>O){L=null!=+L?L:Q.value;var S="";L==App.MODE_GOOGLE?S=b.drive.extension:L==App.MODE_GITHUB?S=b.gitHub.extension:L==App.MODE_GITLAB?S=b.gitLab.extension:L==App.MODE_TRELLO?S=b.trello.extension:L==App.MODE_DROPBOX?S=b.dropbox.extension:L==App.MODE_ONEDRIVE?S=b.oneDrive.extension:L==App.MODE_DEVICE&&(S=".drawio");0<=O&&(N=N.substring(0,O));D.value=N+S}}A(y)})}var M=document.createElement("a");M.style.overflow="hidden";var T=document.createElement("img");T.src=P;T.setAttribute("border","0");T.setAttribute("align","absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";M.style.display="inline-block";M.className="geBaseButton";M.style.position="relative";M.style.margin="4px";M.style.padding="8px 8px 10px 8px";M.style.whiteSpace="nowrap";M.appendChild(T);M.style.color="gray";M.style.fontSize="11px";var m=document.createElement("div");M.appendChild(m);mxUtils.write(m,q);if(null!=B&&null==b[B]){T.style.visibility="hidden";mxUtils.setOpacity(m,10);var z=new Spinner({lines:12,length:12,-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(M);var I=window.setTimeout(function(){null==b[B]&&(z.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[B]&&(window.clearTimeout(I),mxUtils.setOpacity(m,100),T.style.visibility="",z.stop(),C())}))}else C();R.appendChild(M);++V==K&&(mxUtils.br(R),V=0)}function A(O){var q=D.value;if(null==O||null!=q&&0<q.length)t&&b.hideDialog(),-f(q,O,D)}E="1"==urlParams.noDevice?!1:E;p=null!=p?p:!0;u=null!=u?u:!0;K=null!=K?K:4;t=null!=t?t:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom="24px";n.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("filename")+":");l.style.maxWidth="106px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";+width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(M);var I=window.setTimeout(function(){null==b[B]&&(z.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[B]&&(window.clearTimeout(I),mxUtils.setOpacity(m,100),T.style.visibility="",z.stop(),C())}))}else C();R.appendChild(M);++V==K&&(mxUtils.br(R),V=0)}function A(P){var q=D.value;if(null==P||null!=q&&0<q.length)t&&b.hideDialog(),+f(q,P,D)}E="1"==urlParams.noDevice?!1:E;p=null!=p?p:!0;u=null!=u?u:!0;K=null!=K?K:4;t=null!=t?t:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom="24px";n.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("filename")+":");l.style.maxWidth="106px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";l.style.display="inline-block";n.appendChild(l);var D=document.createElement("input");D.setAttribute("value",e);D.style.width="180px";D.style.marginLeft="10px";D.style.marginBottom="20px";D.style.maxWidth="70%";this.init=function(){Editor.selectFilename(D)};n.appendChild(D);null!=v&&null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),v.style.marginLeft="6px",v.style.width="90px",n.appendChild(v));v=null;if("1"!=urlParams.noDevice&&null!=d&&null!=g&&"image/"==g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){D.style.width="160px";l=document.createElement("img");var G=k?d:btoa(unescape(encodeURIComponent(d)));l.setAttribute("src","data:"+g+";base64,"+G);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight="80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");n.appendChild(l);mxClient.IS_FF||"image/png"!=g||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||-(v=mxUtils.button(mxResources.get("copy"),function(O){O=b.base64ToBlob(G,"image/png");O=new ClipboardItem({"image/png":O,"text/html":new Blob(['<img src="data:'+g+";base64,"+G+'">'],{type:"text/html"})});navigator.clipboard.write([O]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(q){b.handleError(q)}))}),v.style.marginTop="6px",v.className="geBtn");F&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,-null,null,function(O){mxEvent.isPopupTrigger(O)||A("_blank")}))}mxUtils.br(n);var R=document.createElement("div");R.style.textAlign="center";var V=0;R.style.marginTop="6px";n.appendChild(R);var Q=document.createElement("select");Q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(d,mxResources.get("googleDrive")),Q.appendChild(d),x(IMAGE_PATH+"/google-drive-logo.svg",+(v=mxUtils.button(mxResources.get("copy"),function(P){P=b.base64ToBlob(G,"image/png");P=new ClipboardItem({"image/png":P,"text/html":new Blob(['<img src="data:'+g+";base64,"+G+'">'],{type:"text/html"})});navigator.clipboard.write([P]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(q){b.handleError(q)}))}),v.style.marginTop="6px",v.className="geBtn");F&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,+null,null,function(P){mxEvent.isPopupTrigger(P)||A("_blank")}))}mxUtils.br(n);var R=document.createElement("div");R.style.textAlign="center";var V=0;R.style.marginTop="6px";n.appendChild(R);var Q=document.createElement("select");Q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(d,mxResources.get("googleDrive")),Q.appendChild(d),x(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(d,mxResources.get("oneDrive")),Q.appendChild(d),b.mode==App.MODE_ONEDRIVE&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(d,mxResources.get("dropbox")),Q.appendChild(d),b.mode==App.MODE_DROPBOX&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GITHUB),mxUtils.write(d,mxResources.get("github")),Q.appendChild(d),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GITLAB),mxUtils.write(d,mxResources.get("gitlab")),Q.appendChild(d),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_TRELLO),mxUtils.write(d,mxResources.get("trello")),Q.appendChild(d),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)d=document.createElement("option"),d.setAttribute("value",App.MODE_DEVICE),mxUtils.write(d,mxResources.get("device")),Q.appendChild(d),b.mode!=App.MODE_DEVICE&&u||d.setAttribute("selected","selected"),E&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);u&&isLocalStorage&&"0"!=urlParams.browser&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_BROWSER),mxUtils.write(u,mxResources.get("browser")),Q.appendChild(u),b.mode==App.MODE_BROWSER&&u.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));u=document.createElement("div");u.style.marginTop="26px";u.style.textAlign="center";null!=H&&(E=mxUtils.button(mxResources.get("help"),function(){b.openLink(H)}),E.className="geBtn",u.appendChild(E));E=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});E.className="geBtn";b.editor.cancelFirst&&null==c&&u.appendChild(E);null==c&&(d=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),d.className="geBtn",u.appendChild(d));F&&Editor.popupsAllowed&&(F=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),F.className="geBtn",u.appendChild(F));CreateDialog.showDownloadButton&&(F=mxUtils.button(mxResources.get("download"),function(){A("download")}),F.className="geBtn",u.appendChild(F),null!=v&&(F.style.marginTop="6px",-u.style.marginTop="6px"));null!=v&&(mxUtils.br(u),u.appendChild(v));b.editor.cancelFirst&&null==c||u.appendChild(E);mxEvent.addListener(D,"keypress",function(O){13==O.keyCode?A(App.MODE_DEVICE):27==O.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(u);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;+u.style.marginTop="6px"));null!=v&&(mxUtils.br(u),u.appendChild(v));b.editor.cancelFirst&&null==c||u.appendChild(E);mxEvent.addListener(D,"keypress",function(P){13==P.keyCode?A(App.MODE_DEVICE):27==P.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(u);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var n=document.createElement("div");n.style.textAlign="left";n.style.height="100%";mxUtils.write(n,mxResources.get("fileOpenLocation"));mxUtils.br(n);mxUtils.br(n);var p=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});p.className="geBtn";p.style.marginBottom="8px";p.style.width="280px";n.appendChild(p);mxUtils.br(n);var u=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();null!=f&&f();b.openLink(e,null,!0)});u.className="geBtn gePrimaryBtn";u.style.width=p.style.width;n.appendChild(u);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,l,n,p,u){function F(){0<K.value.length?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");"data:"!=K.value.substring(0,5)?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}n=null!=n?n:!0;var H=b.editor.graph,E=document.createElement("div");mxUtils.write(E,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var K=document.createElement("input");K.setAttribute("value",f);K.setAttribute("type","text");K.setAttribute("spellcheck","false");K.setAttribute("autocorrect","off");K.setAttribute("autocomplete","off");K.setAttribute("autocapitalize","off");K.style.marginTop="6px";K.style.width=(Graph.fileSupport?460:340)-20+"px";K.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";K.style.backgroundRepeat="no-repeat";K.style.backgroundPosition="100% 50%";K.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+-"')";mxEvent.addListener(f,"click",function(){K.value="";K.focus()});e.appendChild(K);e.appendChild(f);E.appendChild(e);var d=u,g,k,v=function(D,G,R,V){var Q="data:"==D.substring(0,5);!b.isOffline()||Q&&"undefined"===typeof chrome?0<D.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(D,function(O){b.spinner.stop();b.hideDialog();var q=!1===V?1:null!=G&&null!=R?Math.max(G/O.width,R/O.height):Math.min(1,Math.min(520/O.width,520/O.height));n&&(D=b.convertDataUri(D));c(D,-Math.round(Number(O.width)*q),Math.round(Number(O.height)*q),d,g,k)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(D,null,null,d,g,k)):(D=b.convertDataUri(D),G=null==G?120:G,R=null==R?100:R,b.hideDialog(),c(D,G,R,d,g,k))},t=function(D,G){if(null!=D){var R=l?null:H.getModel().getGeometry(H.getSelectionCell());null!=R?v(D,R.width,R.height,G):v(D,null,null,G)}else b.hideDialog(),c(null)};this.init=function(){K.focus();+"')";mxEvent.addListener(f,"click",function(){K.value="";K.focus()});e.appendChild(K);e.appendChild(f);E.appendChild(e);var d=u,g,k,v=function(D,G,R,V){var Q="data:"==D.substring(0,5);!b.isOffline()||Q&&"undefined"===typeof chrome?0<D.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(D,function(P){b.spinner.stop();b.hideDialog();var q=!1===V?1:null!=G&&null!=R?Math.max(G/P.width,R/P.height):Math.min(1,Math.min(520/P.width,520/P.height));n&&(D=b.convertDataUri(D));c(D,+Math.round(Number(P.width)*q),Math.round(Number(P.height)*q),d,g,k)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(D,null,null,d,g,k)):(D=b.convertDataUri(D),G=null==G?120:G,R=null==R?100:R,b.hideDialog(),c(D,G,R,d,g,k))},t=function(D,G){if(null!=D){var R=l?null:H.getModel().getGeometry(H.getSelectionCell());null!=R?v(D,R.width,R.height,G):v(D,null,null,G)}else b.hideDialog(),c(null)};this.init=function(){K.focus();if(Graph.fileSupport){K.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=E.parentNode,G=null;mxEvent.addListener(D,"dragleave",function(R){null!=G&&(G.parentNode.removeChild(G),G=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(D));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){null!=G&&(G.parentNode.removeChild(G),-G=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(Q,O,q,y,B,C,M,T){t(Q,T)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var O=0;O<Q.length;O++)Q[O]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var V=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(V)&&t(decodeURIComponent(V))}R.stopPropagation();R.preventDefault()}),+G=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(Q,P,q,y,B,C,M,T){t(Q,T)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var P=0;P<Q.length;P++)Q[P]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var V=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(V)&&t(decodeURIComponent(V))}R.stopPropagation();R.preventDefault()}),!1)}};u=document.createElement("div");u.style.marginTop="14px";u.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&u.appendChild(f);ImageDialog.filePicked=function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],null!=D&&(K.value=D.url));K.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");-x.setAttribute("multiple","multiple");x.setAttribute("type","file");mxEvent.addListener(x,"change",function(D){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(G,R,V,Q,O,q){t(G)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var R=0;R<G.length;R++)G[R]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});+x.setAttribute("multiple","multiple");x.setAttribute("type","file");mxEvent.addListener(x,"change",function(D){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(G,R,V,Q,P,q){t(G)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var R=0;R<G.length;R++)G[R]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";u.appendChild(e)}mxEvent.addListener(K,"keypress",function(D){13==D.keyCode&&t(K.value)});var A=mxUtils.button(mxResources.get("crop"),function(){var D=new CropImageDialog(b,K.value,d,function(G,R,V){d=G;g=R;k=V});b.showDialog(D.container,300,390,!0,!0)});p&&(A.className="geBtn",u.appendChild(A));var J=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=K.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var D=b.editor.createImageUrlConverter().convert(K.value),-G=new Image;G.onload=function(){b.editor.convertImageToDataUri(D,function(R){b.confirmImageResize(function(V){b.resizeImage(G,R,mxUtils.bind(this,function(Q,O,q){b.spinner.stop();null!=Q&&Q.length<b.maxImageBytes?(K.value=Q,F()):b.handleError({message:mxResources.get("imageTooBig")})}),V,b.maxImageSize)},G.width>b.maxImageSize||G.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};G.onerror=function(){b.spinner.stop();+G=new Image;G.onload=function(){b.editor.convertImageToDataUri(D,function(R){b.confirmImageResize(function(V){b.resizeImage(G,R,mxUtils.bind(this,function(Q,P,q){b.spinner.stop();null!=Q&&Q.length<b.maxImageBytes?(K.value=Q,F()):b.handleError({message:mxResources.get("imageTooBig")})}),V,b.maxImageSize)},G.width>b.maxImageSize||G.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};G.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};G.src=D}});J.className="geBtn";mxEvent.addListener(K,"change",function(D){d=null;F()});F();u.appendChild(J);p=mxUtils.button(mxResources.get("apply"),function(){t(K.value)});p.className="geBtn gePrimaryBtn";u.appendChild(p);b.editor.cancelFirst||u.appendChild(f);Graph.fileSupport&&(u.style.marginTop="120px",E.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",E.style.backgroundPosition="center 65%",E.style.backgroundRepeat="no-repeat",p=document.createElement("div"),p.style.position="absolute",p.style.width="420px",p.style.top="58%",p.style.textAlign="center",p.style.fontSize="18px",p.style.color="#a0c3ff",mxUtils.write(p,mxResources.get("dragImagesHere")),E.appendChild(p));E.appendChild(u);this.container=E},LinkDialog=function(b,e,f,c,l,n,p){function u(D,G){var R=document.createElement("option");mxUtils.write(R,mxResources.get(D));R.value=D;A.appendChild(R);J[D]=G}var F=document.createElement("div");F.style.height="100%";mxUtils.write(F,mxResources.get("editLink")+":");var H=document.createElement("div");H.className="geTitle";H.style.backgroundColor="transparent";H.style.borderColor="transparent";H.style.whiteSpace="nowrap";H.style.textOverflow="clip";H.style.cursor="default";var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("dragUrlsHere"));E.setAttribute("type","text");E.style.marginTop="6px";E.style.width="414px";E.style.boxSizing="border-box";E.style.backgroundImage="url('"+Dialog.prototype.clearImage+@@ -12491,53 +12491,53 @@ var RevisionDialog=function(b,e,f){var c=document.createElement("div"),l=documen"1px";n.style.borderStyle="solid";var p=document.createElement("div");p.style.position="absolute";p.style.display="none";p.style.textAlign="center";p.style.padding="8px";p.style.borderRadius="8px";p.style.left="50%";p.style.top="50%";p.style.whiteSpace="nowrap";p.style.transform="translate(-50%, -50%)";p.style.background="inherit";p.style.border="1px solid";n.appendChild(p);mxEvent.disableContextMenu(n);c.appendChild(n);var u=new Graph(n);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var F=0,H=null,E=0,K=u.getGlobalVariable;u.getGlobalVariable=function(X){return"page"==X&&null!=H&&null!=H[E]?H[E].getAttribute("name"):"pagenumber"==X?E+1:"pagecount"==X?null!=H?H.length:1:K.apply(this,arguments)};u.getLinkForCell=function(){return null};for(var d=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),g=b.getCurrentFile(),k=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),v={},t=0;t<k.length;t++)v[k[t].getAttribute("id")]=k[t];var x=null,A=null,J=null,D=null,G=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=J&&u.zoomIn()},20);G.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=J&&u.zoomOut()},20);R.setAttribute("disabled",-"disabled");var V=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=J&&(1==u.view.scale?(u.maxFitScale=8,u.fit(8)):u.zoomActual(),u.center())},20);V.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);Q.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);O.setAttribute("disabled","disabled");var q=n.cloneNode(!1);q.style.pointerEvent=+"disabled");var V=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=J&&(1==u.view.scale?(u.maxFitScale=8,u.fit(8)):u.zoomActual(),u.center())},20);V.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);Q.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);P.setAttribute("disabled","disabled");var q=n.cloneNode(!1);q.style.pointerEvent="none";n.parentNode.appendChild(q);var y=new Graph(q);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var B=document.createElement("div");B.style.textAlign="left";B.style.color="gray";B.style.backgroundColor="transparent";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.style.whiteSpace="nowrap";B.style.cursor="default";B.style.height="100%";B.style.display="inline-flex";B.style.alignItems="center";B.style.flexGrow="1";mxEvent.addListener(B,"click",function(){var X=mxUtils.getTextContent(B);""!=X&&b.alert(X)});var C=null;mxEvent.addGestureListeners(Q,function(X){try{var Z=null!=H[F]?v[H[F].getAttribute("id")]:null;mxUtils.setOpacity(Q,20);p.innerText="";if(null==Z)p.style.display="inline-block",mxUtils.write(p,mxResources.get("pageNotFound"));else{C=B.innerHTML;B.innerHTML=mxResources.get("current");n.style.display="none";q.style.display="";q.style.backgroundColor=n.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,y.getModel());y.view.scaleAndTranslate(u.view.scale,u.view.translate.x,u.view.translate.y);y.mathEnabled="1"==Y.getAttribute("math");y.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container)}}catch(ba){p.style.display="inline-block",p.innerText="",mxUtils.write(p,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(Q,-60);p.style.display="none";p.innerText="";"none"==n.style.display&&(n.style.display="",B.innerHTML=C,q.style.display="none")});mxEvent.addListener(O,"click",mxUtils.bind(this,function(X){null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{g.patch(Y,null,!0,!0),b.hideDialog(),+60);p.style.display="none";p.innerText="";"none"==n.style.display&&(n.style.display="",B.innerHTML=C,q.style.display="none")});mxEvent.addListener(P,"click",mxUtils.bind(this,function(X){null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{g.patch(Y,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var M=mxUtils.button(mxResources.get("restore"),function(X){null!=J&&null!=D&&b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(D):b.spinner.spin(document.body,mxResources.get("restoring"))&&(M.setAttribute("disabled","disabled"),g.save(!0,function(Z){b.spinner.stop();M.removeAttribute("disabled");b.replaceFileData(D);b.hideDialog()},function(Z){b.spinner.stop();M.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.userSelect="none";T.style.maxWidth="100px";T.style.marginLeft="10px";T.style.display="none";var m=null;mxEvent.addListener(T,"change",function(X){null!=m&&(m(X),mxEvent.consume(X))});var z=mxUtils.button(mxResources.get("open"),function(){null!=J&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});z.className="geBtn";z.setAttribute("disabled","disabled");var I=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});I.className="geBtn";I.setAttribute("disabled","disabled");null!=f&&(z.style.display="none");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.right="28px";k.style.left="32px";k.style.justifyContent="end";k.style.display="flex";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.display="flex";L.style.alignItems="center";L.style.justifyContent="stretch";L.style.left="32px";L.style.right="32px";L.style.border="none";L.style.top="440px";L.style.height="28px";var N=-null;if(null!=e&&0<e.length){n.style.cursor="move";var P=document.createElement("table");P.style.borderWidth="1px";P.style.borderStyle="solid";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var S=document.createElement("tbody"),U=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(F=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){d.stop();+null;if(null!=e&&0<e.length){n.style.cursor="move";var O=document.createElement("table");O.style.borderWidth="1px";O.style.borderStyle="solid";O.style.borderCollapse="collapse";O.style.borderSpacing="0px";O.style.width="100%";var S=document.createElement("tbody"),U=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(F=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){d.stop();p.innerText="";var fa=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=aa){var da=function(xa){null!=xa&&(xa=ia(Editor.parseDiagramNode(xa)));return xa},ia=function(xa){var qa=xa.getAttribute("background");if(null==qa||""==qa||qa==mxConstants.NONE)qa=u.defaultPageBackgroundColor;n.style.backgroundColor=mxUtils.getLightDarkColor(qa);(new mxCodec(xa.ownerDocument)).decode(xa,u.getModel());u.maxFitScale=1;u.fit(8);u.center();u.mathEnabled="1"==xa.getAttribute("math");u.setAdaptiveColors(xa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container);return xa};T.style.display="none";T.innerText="";J=fa;D=ca;H=parseSelectFunction=null;E=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");H=[];for(ca=0;ca<fa.length;ca++)H.push(fa[ca]);E=Math.min(F,H.length-1);0<H.length&&da(H[E]);if(1<H.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<H.length;ca++){fa=document.createElement("option");fa.setAttribute("title",pa+" ("+H[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var pa=H[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(H[ca].getAttribute("id"));var oa="";if(null!=aa){var ha=new DiagramPage(H[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ha])&&(oa=" (M)")}else oa=" (X)";mxUtils.write(fa,pa+oa);ca==E&&fa.setAttribute("selected","selected");T.appendChild(fa)}m=function(){try{var xa=parseInt(T.value);E=F=xa;da(H[xa])}catch(qa){T.value=F,b.handleError(qa)}}}else ia(aa);-pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");B.innerText="";mxUtils.write(B,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());B.setAttribute("title",Y.getAttribute("title"));G.removeAttribute("disabled");R.removeAttribute("disabled");V.removeAttribute("disabled");Q.removeAttribute("disabled");O.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&M.removeAttribute("disabled"),z.removeAttribute("disabled"),I.removeAttribute("disabled"));-mxUtils.setOpacity(G,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(V,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(O,60)}else T.style.display="none",T.innerText="",B.innerText="",p.innerText="",mxUtils.write(B,mxResources.get("errorLoadingFile")),mxUtils.write(p,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=+pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");B.innerText="";mxUtils.write(B,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());B.setAttribute("title",Y.getAttribute("title"));G.removeAttribute("disabled");R.removeAttribute("disabled");V.removeAttribute("disabled");Q.removeAttribute("disabled");P.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&M.removeAttribute("disabled"),z.removeAttribute("disabled"),I.removeAttribute("disabled"));+mxUtils.setOpacity(G,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(V,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(P,60)}else T.style.display="none",T.innerText="",B.innerText="",p.innerText="",mxUtils.write(B,mxResources.get("errorLoadingFile")),mxUtils.write(p,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding="6px";ea.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===U?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){A!=X&&(d.stop(),-null!=x&&(x.style.backgroundColor=""),A=X,x=Y,x.style.backgroundColor="light-dark(#ebf2f9, #000000)",D=J=null,B.removeAttribute("title"),B.innerText=mxResources.get("loading")+"...",n.style.backgroundColor=u.defaultPageBackgroundColor,p.innerText="",u.getModel().clear(),M.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),z.setAttribute("disabled",-"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(G,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(V,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(O,20),d.spin(n),X.getXml(function(fa){if(A==X)try{ba(fa)}catch(aa){B.innerText=mxResources.get("error")+": "+aa.message}},function(fa){d.stop();T.style.display="none";T.innerText="";B.innerText="";mxUtils.write(B,mxResources.get("errorLoadingFile"));mxUtils.write(p,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,-"dblclick",function(ca){z.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(e[t]);null!=W&&t==e.length-1&&(N=W)}P.appendChild(S);l.appendChild(P)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(n.style.display="none",L.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(n.style.display="none",L.style.display=-"none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";L.appendChild(B);L.appendChild(Q);L.appendChild(R);L.appendChild(V);L.appendChild(G);L.appendChild(T);L.appendChild(O);b.editor.cancelFirst&&k.appendChild(l);k.appendChild(z);null!=g&&g.constructor==DriveFile&&k.appendChild(I);k.appendChild(M);b.editor.cancelFirst||k.appendChild(l);c.appendChild(k);c.appendChild(L);-this.container=c},DraftDialog=function(b,e,f,c,l,n,p,u,F){var H=document.createElement("div"),E=document.createElement("div");E.style.marginTop="0px";E.style.whiteSpace="nowrap";E.style.overflow="auto";E.style.lineHeight="normal";mxUtils.write(E,e);H.appendChild(E);var K=document.createElement("select"),d=mxUtils.bind(this,function(){"-1"==K.value?(K.value=K.options[0].value,d(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this,O;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){for(O=-0;O<F.length;O++)l.apply(Q,[O,mxUtils.bind(Q,function(){})]);b.hideDialog(!0);q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(A=mxUtils.parseXml(F[K.value].data),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,this.init())});if(null!=F){K.style.marginLeft="4px";for(e=0;e<F.length;e++){var g=document.createElement("option");g.setAttribute("value",e);var k=new Date(F[e].created),v=new Date(F[e].modified);mxUtils.write(g,k.toLocaleDateString()+" "+k.toLocaleTimeString()+" - "++null!=x&&(x.style.backgroundColor=""),A=X,x=Y,x.style.backgroundColor="light-dark(#ebf2f9, #000000)",D=J=null,B.removeAttribute("title"),B.innerText=mxResources.get("loading")+"...",n.style.backgroundColor=u.defaultPageBackgroundColor,p.innerText="",u.getModel().clear(),M.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),z.setAttribute("disabled",+"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(G,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(V,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(P,20),d.spin(n),X.getXml(function(fa){if(A==X)try{ba(fa)}catch(aa){B.innerText=mxResources.get("error")+": "+aa.message}},function(fa){d.stop();T.style.display="none";T.innerText="";B.innerText="";mxUtils.write(B,mxResources.get("errorLoadingFile"));mxUtils.write(p,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,+"dblclick",function(ca){z.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(e[t]);null!=W&&t==e.length-1&&(N=W)}O.appendChild(S);l.appendChild(O)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(n.style.display="none",L.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(n.style.display="none",L.style.display=+"none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";L.appendChild(B);L.appendChild(Q);L.appendChild(R);L.appendChild(V);L.appendChild(G);L.appendChild(T);L.appendChild(P);b.editor.cancelFirst&&k.appendChild(l);k.appendChild(z);null!=g&&g.constructor==DriveFile&&k.appendChild(I);k.appendChild(M);b.editor.cancelFirst||k.appendChild(l);c.appendChild(k);c.appendChild(L);+this.container=c},DraftDialog=function(b,e,f,c,l,n,p,u,F){var H=document.createElement("div"),E=document.createElement("div");E.style.marginTop="0px";E.style.whiteSpace="nowrap";E.style.overflow="auto";E.style.lineHeight="normal";mxUtils.write(E,e);H.appendChild(E);var K=document.createElement("select"),d=mxUtils.bind(this,function(){"-1"==K.value?(K.value=K.options[0].value,d(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this,P;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){for(P=+0;P<F.length;P++)l.apply(Q,[P,mxUtils.bind(Q,function(){})]);b.hideDialog(!0);q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(A=mxUtils.parseXml(F[K.value].data),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,this.init())});if(null!=F){K.style.marginLeft="4px";for(e=0;e<F.length;e++){var g=document.createElement("option");g.setAttribute("value",e);var k=new Date(F[e].created),v=new Date(F[e].modified);mxUtils.write(g,k.toLocaleDateString()+" "+k.toLocaleTimeString()+" - "+(k.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());K.appendChild(g)}g=document.createElement("option");g.setAttribute("value","-1");mxUtils.write(g,mxResources.get("deleteAll"));K.appendChild(g);E.appendChild(K);mxEvent.addListener(K,"change",d)}null==f&&(f=F[0].data);var t=document.createElement("div");t.style.position="absolute";t.style.border="1px solid lightGray";t.style.marginTop="10px";t.style.left="40px";t.style.right="40px";t.style.top="46px";t.style.bottom="74px";t.style.overflow="hidden";mxEvent.disableContextMenu(t);H.appendChild(t);var x=new Graph(t);x.setEnabled(!1);x.setPanning(!0);x.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var A=mxUtils.parseXml(f),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,G=null,R=x.getGlobalVariable;x.getGlobalVariable=function(Q){return"page"==Q&&null!=G&&null!=G[D]?G[D].getAttribute("name"):"pagenumber"==Q?D+1:"pagecount"==Q?null!=G?G.length:1:R.apply(this,arguments)};x.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){x.zoomIn()},20);E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){x.zoomOut()},20);e=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==x.view.scale?(x.maxFitScale=8,x.fit(8)):x.zoomActual();x.center()},20);p=mxUtils.button(p||mxResources.get("discard"),-function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(O){l.apply(Q,[K.value,mxUtils.bind(Q,function(){null!=K.parentNode&&(K.options[K.selectedIndex].parentNode.removeChild(K.options[K.selectedIndex]),1<K.options.length?(K.value=K.options[0].value,d()):b.hideDialog(!0))})]);O.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});p.className="geBtn";var V=document.createElement("select");+function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(P){l.apply(Q,[K.value,mxUtils.bind(Q,function(){null!=K.parentNode&&(K.options[K.selectedIndex].parentNode.removeChild(K.options[K.selectedIndex]),1<K.options.length?(K.value=K.options[0].value,d()):b.hideDialog(!0))})]);P.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});p.className="geBtn";var V=document.createElement("select");V.style.maxWidth="80px";V.style.position="relative";V.style.top="-2px";V.style.verticalAlign="bottom";V.style.marginRight="6px";V.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[K.value])});n.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.right="40px";g.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";-this.init=function(){function Q(B){if(null!=B){var C=B.getAttribute("background");if(null==C||""==C||C==mxConstants.NONE)C="light-dark(#ffffff, transparent)";t.style.backgroundColor=C;(new mxCodec(B.ownerDocument)).decode(B,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return B}function O(B){null!=B&&(B=Q(Editor.parseDiagramNode(B)));return B}mxEvent.addListener(V,"change",function(B){D=parseInt(V.value);O(G[D]);mxEvent.consume(B)});if("mxfile"==J.nodeName){var q=J.getElementsByTagName("diagram");-G=[];for(var y=0;y<q.length;y++)G.push(q[y]);0<G.length&&O(G[D]);V.innerText="";if(1<G.length)for(V.style.display="",y=0;y<G.length;y++)q=document.createElement("option"),mxUtils.write(q,G[y].getAttribute("name")||mxResources.get("pageWithNumber",[y+1])),q.setAttribute("value",y),y==D&&q.setAttribute("selected","selected"),V.appendChild(q);else V.style.display="none"}else Q(J)};k.appendChild(V);k.appendChild(f);k.appendChild(E);k.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});+this.init=function(){function Q(B){if(null!=B){var C=B.getAttribute("background");if(null==C||""==C||C==mxConstants.NONE)C="light-dark(#ffffff, transparent)";t.style.backgroundColor=C;(new mxCodec(B.ownerDocument)).decode(B,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return B}function P(B){null!=B&&(B=Q(Editor.parseDiagramNode(B)));return B}mxEvent.addListener(V,"change",function(B){D=parseInt(V.value);P(G[D]);mxEvent.consume(B)});if("mxfile"==J.nodeName){var q=J.getElementsByTagName("diagram");+G=[];for(var y=0;y<q.length;y++)G.push(q[y]);0<G.length&&P(G[D]);V.innerText="";if(1<G.length)for(V.style.display="",y=0;y<G.length;y++)q=document.createElement("option"),mxUtils.write(q,G[y].getAttribute("name")||mxResources.get("pageWithNumber",[y+1])),q.setAttribute("value",y),y==D&&q.setAttribute("selected","selected"),V.appendChild(q);else V.style.display="none"}else Q(J)};k.appendChild(V);k.appendChild(f);k.appendChild(E);k.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.className="geBtn";u=null!=u?mxUtils.button(mxResources.get("ignore"),u):null;null!=u&&(u.className="geBtn");b.editor.cancelFirst?(g.appendChild(f),null!=u&&g.appendChild(u),g.appendChild(p),g.appendChild(n)):(g.appendChild(n),g.appendChild(p),null!=u&&g.appendChild(u),g.appendChild(f));H.appendChild(g);H.appendChild(k);this.container=H},FindWindow=function(b,e,f,c,l,n){function p(m,z,I){if("object"===typeof z.value&&null!=z.value.attributes){z=z.value.attributes;for(var L=0;L<z.length;L++)if("label"!=z[L].nodeName){var N=mxUtils.trim(z[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==m&&0<=N.indexOf(I)||null!=m&&m.test(N))return!0}}return!1}function u(){g?(C.removeAttribute("disabled"),M.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));D.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function F(m,z,I){y.innerText="";var L=E.model.getDescendants(E.model.getRoot()),N=D.value.toLowerCase(),-P=R.checked?new RegExp(N):null,S=null;v=null;K!=N&&(K=N,d=null,k=!1);var U=null==d;if(0<N.length){if(k){k=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}m=(W+1)%b.pages.length;d=null;do k=!1,L=b.pages[m],E=b.createTemporaryGraph(E.getStylesheet()),b.updatePageRoot(L),E.model.setRoot(L.root),m=(m+1)%b.pages.length;while(!F(!0,z,I)&&m!=W);d&&(d=null,I?b.editor.graph.model.execute(new SelectPage(b,L)):b.selectPage(L));k=!1;E=b.editor.graph;return F(!0,z,I)}for(X=0;X<L.length;X++){W=-E.view.getState(L[X]);z&&(U=U||W==d);if(null!=W&&null!=W.cell.value&&(U||null==S)&&(E.model.isVertex(W.cell)||E.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(Q.innerHTML=E.sanitizeHtml(E.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([Q])):label=E.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;z&&n&&W==d&&(label=label.substr(t),Z=t);var Y=""==G.value;if(null==P&&(0<=label.indexOf(N)||Y&&p(P,W.cell,N))||null!=P&&(P.test(label)||-Y&&p(P,W.cell,N)))if(n&&(null!=P?(Y=label.match(P),null!=Y&&0<Y.length&&(v=Y[0].toLowerCase(),t=Z+Y.index+v.length)):(v=N,t=Z+label.indexOf(N)+v.length)),U){S=W;break}else null==S&&(S=W)}U=U||W==d}}if(null!=S){if(X==L.length&&V.checked)return d=null,k=!0,F(!0,z,I);d=S;E.scrollCellToVisible(d.cell);E.isEnabled()&&!E.isCellLocked(d.cell)?I||E.getSelectionCell()==d.cell&&1==E.getSelectionCount()||E.setSelectionCell(d.cell):E.highlightCell(d.cell)}else{if(!m&&V.checked)return k=!0,F(!0,z,I);E.isEnabled()&&+O=R.checked?new RegExp(N):null,S=null;v=null;K!=N&&(K=N,d=null,k=!1);var U=null==d;if(0<N.length){if(k){k=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}m=(W+1)%b.pages.length;d=null;do k=!1,L=b.pages[m],E=b.createTemporaryGraph(E.getStylesheet()),b.updatePageRoot(L),E.model.setRoot(L.root),m=(m+1)%b.pages.length;while(!F(!0,z,I)&&m!=W);d&&(d=null,I?b.editor.graph.model.execute(new SelectPage(b,L)):b.selectPage(L));k=!1;E=b.editor.graph;return F(!0,z,I)}for(X=0;X<L.length;X++){W=+E.view.getState(L[X]);z&&(U=U||W==d);if(null!=W&&null!=W.cell.value&&(U||null==S)&&(E.model.isVertex(W.cell)||E.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(Q.innerHTML=E.sanitizeHtml(E.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([Q])):label=E.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;z&&n&&W==d&&(label=label.substr(t),Z=t);var Y=""==G.value;if(null==O&&(0<=label.indexOf(N)||Y&&p(O,W.cell,N))||null!=O&&(O.test(label)||+Y&&p(O,W.cell,N)))if(n&&(null!=O?(Y=label.match(O),null!=Y&&0<Y.length&&(v=Y[0].toLowerCase(),t=Z+Y.index+v.length)):(v=N,t=Z+label.indexOf(N)+v.length)),U){S=W;break}else null==S&&(S=W)}U=U||W==d}}if(null!=S){if(X==L.length&&V.checked)return d=null,k=!0,F(!0,z,I);d=S;E.scrollCellToVisible(d.cell);E.isEnabled()&&!E.isCellLocked(d.cell)?I||E.getSelectionCell()==d.cell&&1==E.getSelectionCount()||E.setSelectionCell(d.cell):E.highlightCell(d.cell)}else{if(!m&&V.checked)return k=!0,F(!0,z,I);E.isEnabled()&&!I&&E.clearSelection()}g=null!=S;n&&!m&&u();return 0==N.length||null!=S}var H=b.actions.get("findReplace"),E=b.editor.graph,K=null,d=null,g=!1,k=!1,v=null,t=0,x=1,A=document.createElement("div");A.style.userSelect="none";A.style.overflow="hidden";A.style.padding="10px";A.style.height="100%";var J=n?"260px":"200px",D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=J;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";A.appendChild(D);mxUtils.br(A);if(n){var G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("replaceWith"));G.setAttribute("type","text");G.style.marginTop="4px";G.style.marginBottom="6px";G.style.width=J;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";A.appendChild(G);mxUtils.br(A);mxEvent.addListener(G,"input",u)}var R=document.createElement("input");R.setAttribute("id","geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";A.appendChild(R);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");A.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));A.appendChild(J);J=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft="6px";J.style.top="3px";A.appendChild(J);mxUtils.br(A);var V=document.createElement("input");V.setAttribute("id","geFindWinAllPagesChck");-V.setAttribute("type","checkbox");V.style.marginRight="4px";A.appendChild(V);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");A.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));A.appendChild(J);var Q=document.createElement("div");mxUtils.br(A);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop="6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";A.appendChild(J);var O=mxUtils.button(mxResources.get("reset"),-function(){y.innerText="";D.value="";D.style.backgroundColor="";n&&(G.value="",u());K=d=null;k=!1;D.focus()});O.setAttribute("title",mxResources.get("reset"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";n||J.appendChild(O);var q=mxUtils.button(mxResources.get("find"),function(){try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(m){b.handleError(m)}});q.setAttribute("title",-mxResources.get("find")+" (Enter)");q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn gePrimaryBtn";J.appendChild(q);var y=document.createElement("div");y.style.marginTop="10px";if(n){var B=function(m,z,I,L,N){if(null==N||"1"!=N.html)return L=m.toLowerCase().indexOf(z,L),0>L?m:m.substr(0,L)+I+m.substr(L+z.length);var P=m;z=mxUtils.htmlEntities(z,!1,!1,!1);N=[];var S=-1;for(m=m.replace(/<br>/ig,-"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=m.indexOf("<",S+1));)N.push(S);S=m.match(/<[^>]*>/g);m=m.replace(/<[^>]*>/g,"");L=m.toLowerCase().indexOf(z,L);if(0>L)return P;P=L+z.length;I=mxUtils.htmlEntities(I);m=m.substr(0,L)+I+m.substr(P);for(var U=0,W=0;W<N.length;W++){if(N[W]-U<L)m=m.substr(0,N[W])+S[W]+m.substr(N[W]);else{var X=N[W]-U<P?L+U:N[W]+(I.length-z.length);m=m.substr(0,X)+S[W]+m.substr(X)}U+=S[W].length}return m.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,+V.setAttribute("type","checkbox");V.style.marginRight="4px";A.appendChild(V);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");A.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));A.appendChild(J);var Q=document.createElement("div");mxUtils.br(A);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop="6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";A.appendChild(J);var P=mxUtils.button(mxResources.get("reset"),+function(){y.innerText="";D.value="";D.style.backgroundColor="";n&&(G.value="",u());K=d=null;k=!1;D.focus()});P.setAttribute("title",mxResources.get("reset"));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";n||J.appendChild(P);var q=mxUtils.button(mxResources.get("find"),function(){try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(m){b.handleError(m)}});q.setAttribute("title",+mxResources.get("find")+" (Enter)");q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn gePrimaryBtn";J.appendChild(q);var y=document.createElement("div");y.style.marginTop="10px";if(n){var B=function(m,z,I,L,N){if(null==N||"1"!=N.html)return L=m.toLowerCase().indexOf(z,L),0>L?m:m.substr(0,L)+I+m.substr(L+z.length);var O=m;z=mxUtils.htmlEntities(z,!1,!1,!1);N=[];var S=-1;for(m=m.replace(/<br>/ig,+"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=m.indexOf("<",S+1));)N.push(S);S=m.match(/<[^>]*>/g);m=m.replace(/<[^>]*>/g,"");L=m.toLowerCase().indexOf(z,L);if(0>L)return O;O=L+z.length;I=mxUtils.htmlEntities(I);m=m.substr(0,L)+I+m.substr(O);for(var U=0,W=0;W<N.length;W++){if(N[W]-U<L)m=m.substr(0,N[W])+S[W]+m.substr(N[W]);else{var X=N[W]-U<O?L+U:N[W]+(I.length-z.length);m=m.substr(0,X)+S[W]+m.substr(X)}U+=S[W].length}return m.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")},C=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=E.getLabel(m);E.isCellEditable(m)&&E.model.setValue(m,B(z,v,G.value,t-v.length,E.getCurrentCellStyle(m)));D.style.backgroundColor=F(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(I){b.handleError(I)}});C.setAttribute("title",mxResources.get("replFind"));C.style.float="none";C.style.width="120px";C.style.marginTop="6px";C.style.marginLeft="8px";C.style.overflow="hidden";C.style.textOverflow="ellipsis";C.className="geBtn gePrimaryBtn";C.setAttribute("disabled","disabled");J.appendChild(C);mxUtils.br(J);var M=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=E.getLabel(m);E.model.setValue(m,B(z,v,G.value,t-v.length,E.getCurrentCellStyle(m)));C.setAttribute("disabled","disabled");M.setAttribute("disabled","disabled")}}catch(I){b.handleError(I)}});M.setAttribute("title",mxResources.get("replace"));M.style.float="none";M.style.width="120px";M.style.marginTop=-"6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");J.appendChild(M);var T=mxUtils.button(mxResources.get("replaceAll"),function(){y.innerText="";K=null;var m=b.currentPage,z=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;E.getModel().beginUpdate();try{for(var I=0,L={};F(!1,!0,!0)&&100>I;){var N=d.cell,P=E.getLabel(N),S=L[N.id];if(S&&S.replAllMrk==x&&S.replAllPos>=t)break;L[N.id]=-{replAllMrk:x,replAllPos:t};E.isCellEditable(N)&&(E.model.setValue(N,B(P,v,G.value,t-v.length,E.getCurrentCellStyle(N))),I++)}m!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,m));mxUtils.write(y,mxResources.get("matchesRepl",[I]))}catch(U){b.handleError(U)}finally{E.getModel().endUpdate(),b.editor.graph.setSelectionCells(z),b.editor.graph.rendering=!0}x++});T.setAttribute("title",mxResources.get("replaceAll"));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");J.appendChild(T);mxUtils.br(J);J.appendChild(O);O=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));O.setAttribute("title",mxResources.get("close"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";-J.appendChild(O);mxUtils.br(J);J.appendChild(y)}else O.style.width="90px",q.style.width="90px";mxEvent.addListener(D,"keyup",function(m){if(91==m.keyCode||93==m.keyCode||17==m.keyCode)mxEvent.consume(m);else if(27==m.keyCode)H.funct();else if(K!=D.value.toLowerCase()||13==m.keyCode)try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(z){D.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(A,"keydown",function(m){70==m.keyCode&&b.keyHandler.isControlDown(m)&&+"6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");J.appendChild(M);var T=mxUtils.button(mxResources.get("replaceAll"),function(){y.innerText="";K=null;var m=b.currentPage,z=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;E.getModel().beginUpdate();try{for(var I=0,L={};F(!1,!0,!0)&&100>I;){var N=d.cell,O=E.getLabel(N),S=L[N.id];if(S&&S.replAllMrk==x&&S.replAllPos>=t)break;L[N.id]=+{replAllMrk:x,replAllPos:t};E.isCellEditable(N)&&(E.model.setValue(N,B(O,v,G.value,t-v.length,E.getCurrentCellStyle(N))),I++)}m!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,m));mxUtils.write(y,mxResources.get("matchesRepl",[I]))}catch(U){b.handleError(U)}finally{E.getModel().endUpdate(),b.editor.graph.setSelectionCells(z),b.editor.graph.rendering=!0}x++});T.setAttribute("title",mxResources.get("replaceAll"));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");J.appendChild(T);mxUtils.br(J);J.appendChild(P);P=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));P.setAttribute("title",mxResources.get("close"));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";+J.appendChild(P);mxUtils.br(J);J.appendChild(y)}else P.style.width="90px",q.style.width="90px";mxEvent.addListener(D,"keyup",function(m){if(91==m.keyCode||93==m.keyCode||17==m.keyCode)mxEvent.consume(m);else if(27==m.keyCode)H.funct();else if(K!=D.value.toLowerCase()||13==m.keyCode)try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(z){D.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(A,"keydown",function(m){70==m.keyCode&&b.keyHandler.isControlDown(m)&&!mxEvent.isShiftDown(m)&&(H.funct(),mxEvent.consume(m))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),A,e,f,c,l,!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()?(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?V.removeAttribute("disabled"):(V.checked=!1,V.setAttribute("disabled","disabled"))):E.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,n){var p=b.editor.graph,u=document.createElement("div");u.style.textAlign="center";u.style.userSelect="none";u.style.overflow="hidden";u.style.height="100%";if(n){var F=function(){var k=p.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=mxResources.get("useBlackAndWhite"):(k="#"==k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&K.setAttribute("title",k))},H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=p.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float="left";u.appendChild(H);p.freehand.setPerfectFreehandMode(H.checked);var E=document.createElement("label");E.setAttribute("for","geFreehandBrush");@@ -12550,13 +12550,13 @@ mxUtils.button(mxResources.get("startDrawing"),function(){p.freehand.isDrawing()" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){p.freehand.isDrawing()&&p.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.height="100%";var u=document.createElement("div");u.style.display="flex";u.style.alignItems="center";u.style.justifyContent="center";u.style.paddingTop="20px";var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginRight="4px";F.checked=!0;var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var E=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(n.isSelectionEmpty()?n.getVerticesAndEdges():n.getSelectionCells(),F.checked,H.checked)}));E.setAttribute("title","Convert Colors");E.className="geBtn gePrimaryBtn";u.appendChild(E);p.appendChild(u);u=u.cloneNode(!1);u.appendChild(H);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("background"));p.appendChild(u);u=u.cloneNode(!1);u.appendChild(F);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("labels"));p.appendChild(u);this.window=new mxWindow(mxResources.get("adaptiveColors"),p,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);-this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,e,f,c,l){function n(){O=!0;t.value=q;K.isSelectionEmpty()?(A.setAttribute("disabled","disabled"),"selectionOnly"==t.value&&(t.value="includeCopyOfMyDiagram")):A.removeAttribute("disabled");b.isDiagramEmpty()?(x.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==t.value&&(t.value="help")):x.removeAttribute("disabled");-O=!1}function p(B,C,M){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==M?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,B);T.setAttribute("title",B);mxEvent.addListener(T,"click",C);return T}function u(B){var C=+this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,e,f,c,l){function n(){P=!0;t.value=q;K.isSelectionEmpty()?(A.setAttribute("disabled","disabled"),"selectionOnly"==t.value&&(t.value="includeCopyOfMyDiagram")):A.removeAttribute("disabled");b.isDiagramEmpty()?(x.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==t.value&&(t.value="help")):x.removeAttribute("disabled");+P=!1}function p(B,C,M){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==M?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,B);T.setAttribute("title",B);mxEvent.addListener(T,"click",C);return T}function u(B){var C=document.createElement("div");C.style.display="block";C.style.position="relative";C.style.backgroundColor="#e0e0e0";C.style.borderRadius="4px";C.style.wordWrap="break-word";C.style.textAlign="left";C.style.padding="6px";C.style.margin="12px";C.style.left="0px";C.style.right="0px";mxUtils.write(C,B);g.appendChild(C);return C}function F(B){var C=B.indexOf("<mxGraphModel "),M=B.indexOf("</mxGraphModel>");0>C&&(C=B.indexOf("<mxGraphModel>"));if(0<=C&&M>C){var T=mxUtils,m=T.trim,z=B.substring(0,C),I=z.indexOf("```");0<=I&&(z=z.substring(z,0,I+6));T=m.call(T,z);C=B.substring(C,M+15);m=mxUtils;z=m.trim;B=B.substring(M+15);M=B.lastIndexOf("```");0<=M&&(B=B.substring(M+3));return[T,C,z.call(m,B)]}return null}function H(B){var C=u(B);C.style.cursor="pointer";C.style.marginBottom="2px";C.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(C,"click",function(U){Q.value=B;Q.focus()});var M=u("");M.style.marginTop="2px";var T=b.currentPage,m=B,z=[],I=null;if("includeCopyOfMyDiagram"==t.value||"selectionOnly"==t.value){var L=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==t.value&&(L.isObjectIgnored=function(U){return U.constructor==mxCell&&!K.model.isRoot(U)&&!K.model.isLayer(U)&&!K.isCellSelected(U)&&!K.isAncestorSelected(U)});I=L.encode(K.getModel());L.document.appendChild(I);z.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(I)})}else"create"==t.value?(m=D.value.replace(/([A-Z])/g," $1").toLowerCase(),m="Write the declaration code for a "+(""!=m?m:"graph")+' that shows "'+(""!=B?B:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):z.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});z.push({role:"user",content:m});var N={model:Editor.gptModel,-messages:z},P=0;for(z=0;z<N.messages.length;z++)P+=N.messages[z].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){M.innerHTML="";mxUtils.write(M,mxResources.get("loading")+"...");var U=document.createElement("img");U.setAttribute("title","Processing "+P+" tokens");U.setAttribute("src",IMAGE_PATH+"/spin.gif");U.style.marginLeft="6px";M.appendChild(U);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=+messages:z},O=0;for(z=0;z<N.messages.length;z++)O+=N.messages[z].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){M.innerHTML="";mxUtils.write(M,mxResources.get("loading")+"...");var U=document.createElement("img");U.setAttribute("title","Processing "+O+" tokens");U.setAttribute("src",IMAGE_PATH+"/spin.gif");U.style.marginLeft="6px";M.appendChild(U);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=new mxXmlRequest(Editor.gptUrl,JSON.stringify(N),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();M.innerHTML="";mxUtils.write(M,ba.message);M.appendChild(p(mxResources.get("tryAgain"),S));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=F(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ia=null;null!=I&&(fa=new mxCodec(I.ownerDocument),ia=new mxGraphModel,fa.decode(I,ia));fa=mxUtils.bind(this,function(pa){K.model.beginUpdate();try{if(null!=ia&&null!=b.getPageIndex(T)){b.selectPage(T);var oa=b.diffCells(ia.root,da.root);b.patchPage(T,oa,null,!0)}else{var ha=da.getChildren(da.getChildAt(da.getRoot(),0));K.setSelectionCells(K.importCells(ha))}}finally{K.model.endUpdate()}mxEvent.consume(pa)});aa=K.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));@@ -12569,7 +12569,7 @@ S));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}fmxResources.get("create"));t.appendChild(J)}J=document.createElement("option");J.setAttribute("value","help");mxUtils.write(J,mxResources.get("help"));t.appendChild(J);J=document.createElement("option");J.setAttribute("value","reset");mxUtils.write(J,mxResources.get("reset"));t.appendChild(J);var D=document.createElement("select");D.style.textOverflow="ellipsis";D.style.flexGrow="1";D.style.padding="4px";D.style.minWidth="0";for(J=0;J<EditorUi.mermaidDiagramTypes.length;J++){var G=document.createElement("option"),R=EditorUi.mermaidDiagramTypes[J],V=R;"erDiagram"==V&&(V="entityRelationshipDiagram");V=mxResources.get(V,null,V.charAt(0).toUpperCase()+V.substring(1).replace(/[A-Z]/g," $&"));G.setAttribute("value",R);mxUtils.write(G,V);D.appendChild(G)}v.appendChild(D);v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.textOverflow="clip";v.style.cursor="default";var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100%";Q.style.outline="none";Q.style.border="none";Q.style.background="transparent";Q.style.padding="8px 26px 8px 8px";Q.style.boxSizing="border-box";v.appendChild(Q);J=document.createElement("img");J.setAttribute("src",Editor.sendImage);J.setAttribute("title",mxResources.get("sendMessage"));J.className="geAdaptiveAsset";J.style.position="relative";J.style.cursor="pointer";J.style.opacity="0.5";J.style.height="19px";J.style.left="-24px";J.style.top="5px";J.style.background="url('"+b.editor.transparentImage+"')";v.appendChild(J);k.appendChild(v);K.isSelectionEmpty()?-b.isDiagramEmpty()?t.value="help":t.value="includeCopyOfMyDiagram":t.value="selectionOnly";var O=!1,q=t.value,y=function(){Q.setAttribute("placeholder",mxResources.get("create"==t.value?"describeYourDiagram":"askMeAnything"));"create"==t.value?(t.style.width="",D.style.display=""):(t.style.width="100%",D.style.display="none")};y();mxEvent.addListener(t,"change",function(){O||("reset"==t.value?(t.value=q,g.innerHTML=""):q=t.value,y())});K.selectionModel.addListener(mxEvent.CHANGE,n);K.getModel().addListener(mxEvent.CHANGE,+b.isDiagramEmpty()?t.value="help":t.value="includeCopyOfMyDiagram":t.value="selectionOnly";var P=!1,q=t.value,y=function(){Q.setAttribute("placeholder",mxResources.get("create"==t.value?"describeYourDiagram":"askMeAnything"));"create"==t.value?(t.style.width="",D.style.display=""):(t.style.width="100%",D.style.display="none")};y();mxEvent.addListener(t,"change",function(){P||("reset"==t.value?(t.value=q,g.innerHTML=""):q=t.value,y())});K.selectionModel.addListener(mxEvent.CHANGE,n);K.getModel().addListener(mxEvent.CHANGE,n);n();mxEvent.addListener(J,"click",E);mxEvent.addListener(Q,"keydown",function(B){13!=B.keyCode||mxEvent.isShiftDown(B)||E()});d.appendChild(k);this.window=new mxWindow(mxResources.get("chatWindowTitle"),d,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){K.getModel().removeListener(n)}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();Q.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)p=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var u=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(F,H){if(n.isEnabled()){var E=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();if(null!=K&&0<K.length){K=K.split(" ");for(var d=[],g=[],k=0;k<K.length;k++){var v=mxUtils.trim(K[k]);""!=v&&(g.push(v),0>mxUtils.indexOf(F,v)&&d.push(v))}n.isSelectionEmpty()?H(F.concat(d)):n.addTagsForCells(n.getSelectionCells(),g)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(E.container,320,80,!0,!0);E.init()}},p);p=u.div;this.window=new mxWindow(mxResources.get("tags"),p,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;@@ -12578,7 +12578,7 @@ u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("aliu.src=IMAGE_PATH+"/gitlab-logo.svg",u.style.width="32px"):e==b.trello&&(p=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[p]));var F=document.createElement("input");F.setAttribute("type","checkbox");p=mxUtils.button(mxResources.get("authorize"),function(){c(F.checked)});p.insertBefore(u,p.firstChild);p.style.marginTop="6px";p.className="geBigButton";p.style.fontSize="18px";p.style.padding="14px";l.appendChild(n);l.appendChild(b);l.appendChild(p);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(F),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),l.appendChild(f),F.checked=!0,F.defaultChecked=!0,mxEvent.addListener(n,"click",function(H){F.checked=!F.checked;mxEvent.consume(H)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var n=0;n<b.sidebar.customEntries.length;n++){for(var p=b.sidebar.customEntries[n]||{},u={title:b.getResource(p.title),entries:[]},F=0;null!=p.entries&&F<p.entries.length;F++){var H=p.entries[F];u.entries.push({id:H.id,title:b.getResource(H.title),desc:b.getResource(H.desc),image:H.preview})}0<u.entries.length&&l.push(u)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)l.push(f[n]);else{u={title:f[n].title,entries:[]};for(F=0;F<f[n].entries.length;F++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,-f[n].entries[F].id)&&u.entries.push(f[n].entries[F]);0<u.entries.length&&l.push(u)}f=l;if(e){n=mxUtils.bind(this,function(R){for(var V=0;V<R.length;V++)(function(Q){var O=k.cloneNode(!1);O.style.fontWeight="bold";O.style.backgroundColor="light-dark(#e5e5e5, #505759)";O.style.padding="6px 0px 6px 20px";mxUtils.write(O,Q.title);E.appendChild(O);for(var q=0;q<Q.entries.length;q++)(function(y){var B=k.cloneNode(!1);B.style.cursor="pointer";B.style.padding="4px 0px 4px 20px";B.style.whiteSpace="nowrap";+f[n].entries[F].id)&&u.entries.push(f[n].entries[F]);0<u.entries.length&&l.push(u)}f=l;if(e){n=mxUtils.bind(this,function(R){for(var V=0;V<R.length;V++)(function(Q){var P=k.cloneNode(!1);P.style.fontWeight="bold";P.style.backgroundColor="light-dark(#e5e5e5, #505759)";P.style.padding="6px 0px 6px 20px";mxUtils.write(P,Q.title);E.appendChild(P);for(var q=0;q<Q.entries.length;q++)(function(y){var B=k.cloneNode(!1);B.style.cursor="pointer";B.style.padding="4px 0px 4px 20px";B.style.whiteSpace="nowrap";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.setAttribute("title",y.title+" ("+y.id+")");var C=document.createElement("input");C.setAttribute("type","checkbox");C.checked=b.sidebar.isEntryVisible(y.id);C.defaultChecked=C.checked;B.appendChild(C);mxUtils.write(B," "+y.title);E.appendChild(B);var M=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){K.style.textAlign="center";K.style.padding="0px";K.style.color="";K.innerText="";if(null!=y.desc){var m=document.createElement("pre");m.style.boxSizing="border-box";m.style.fontFamily="inherit";m.style.margin="20px";m.style.right="0px";m.style.textAlign="left";mxUtils.write(m,y.desc);K.appendChild(m)}null!=y.imageCallback?y.imageCallback(K):null!=y.image?(m=document.createElement("img"),m.setAttribute("border","0"),m.style.maxWidth="100%",m.setAttribute("src",y.image),K.appendChild(m)):null==y.desc&&(K.style.padding="20px",K.style.color="rgb(179, 179, 179)",mxUtils.write(K,mxResources.get("noPreview")));null!=d&&(d.style.backgroundColor="");d=B;d.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(B,"click",M);mxEvent.addListener(B,"dblclick",function(T){C.checked=!C.checked;mxEvent.consume(T)});g.push(function(){return C.checked?y.id:null});0==V&&0==q&&M()})(Q.entries[q])})(R[V])});F=document.createElement("div");F.className="geDialogTitle";mxUtils.write(F,mxResources.get("shapes"));F.style.position="absolute";F.style.top="0px";F.style.left="0px";F.style.lineHeight="40px";F.style.height=@@ -12587,8 +12587,8 @@ m.style.boxSizing="border-box";m.style.fontFamily="inherit";m.style.margin="20pxv.defaultChecked=v.checked;f.appendChild(v);n=document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(R){v.checked=!v.checked;mxEvent.consume(R)});var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(t),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),t.style.position="relative",t.style.top="1px",t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(n,"click",function(R){mxEvent.getSource(R)!=t&&(t.checked=!t.checked,mxEvent.consume(R))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(V=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=V&&0<R.splice(V,1).length)&&b.toggleScratchpad(),V=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=V&&0<R.splice(V,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),t.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),t.checked,!0);b.setSidebarTitles(v.checked,t.checked)});F.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table");-n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";F=document.createElement("tr");x.style.width="100%";e=document.createElement("td");l=document.createElement("td");p=document.createElement("td");var A=mxUtils.bind(this,function(R,V,Q){var O=document.createElement("input");O.type="checkbox";x.appendChild(O);O.checked=b.sidebar.isEntryVisible(Q);var q=document.createElement("span");mxUtils.write(q,V);V=document.createElement("div");V.style.display="block";V.appendChild(O);-V.appendChild(q);mxEvent.addListener(q,"click",function(y){O.checked=!O.checked;mxEvent.consume(y)});R.appendChild(V);return function(){return O.checked?Q:null}});F.appendChild(e);F.appendChild(l);F.appendChild(p);n.appendChild(F);x.appendChild(n);g=[];var J=0;for(n=0;n<f.length;n++)for(F=0;F<f[n].entries.length;F++)J++;var D=[e,l,p],G=0;for(n=0;n<f.length;n++)(function(R){for(var V=0;V<R.entries.length;V++){var Q=R.entries[V];g.push(A(D[Math.floor(G/(J/3))],Q.title,Q.id));G++}})(f[n]);c.appendChild(x);+n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";F=document.createElement("tr");x.style.width="100%";e=document.createElement("td");l=document.createElement("td");p=document.createElement("td");var A=mxUtils.bind(this,function(R,V,Q){var P=document.createElement("input");P.type="checkbox";x.appendChild(P);P.checked=b.sidebar.isEntryVisible(Q);var q=document.createElement("span");mxUtils.write(q,V);V=document.createElement("div");V.style.display="block";V.appendChild(P);+V.appendChild(q);mxEvent.addListener(q,"click",function(y){P.checked=!P.checked;mxEvent.consume(y)});R.appendChild(V);return function(){return P.checked?Q:null}});F.appendChild(e);F.appendChild(l);F.appendChild(p);n.appendChild(F);x.appendChild(n);g=[];var J=0;for(n=0;n<f.length;n++)for(F=0;F<f[n].entries.length;F++)J++;var D=[e,l,p],G=0;for(n=0;n<f.length;n++)(function(R){for(var V=0;V<R.entries.length;V++){var Q=R.entries[V];g.push(A(D[Math.floor(G/(J/3))],Q.title,Q.id));G++}})(f[n]);c.appendChild(x);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=!0,f.appendChild(t),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(R){t.checked=!t.checked;mxEvent.consume(R)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}b.sidebar.showEntries(0<R.length?R.join(";"):"",t.checked);b.hideDialog()});F.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(F)):(f.appendChild(F),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function l(){F=!0;if(0==u.length)p.innerText=mxResources.get("noPlugins");else{p.innerText="";for(var g=0;g<u.length;g++){var k=document.createElement("span");k.style.display="flex";k.style.alignItems="center";k.style.whiteSpace="nowrap";var v=document.createElement("img");v.src=Editor.trashImage;v.style.position="relative";v.style.cursor="pointer";v.style.marginRight="4px";v.style.display="inline-block";v.style.width="18px";v.setAttribute("title",mxResources.get("delete"));k.appendChild(v);@@ -12596,11 +12596,11 @@ mxUtils.write(k,u[g]);p.appendChild(k);mxUtils.br(p);mxEvent.addListener(v,"clicg)&&u.push(g);l()})}:function(){var g=document.createElement("div"),k=document.createElement("span");k.style.marginTop="6px";mxUtils.write(k,mxResources.get("builtinPlugins")+": ");g.appendChild(k);var v=document.createElement("select");v.style.width="150px";for(k=0;k<App.publicPlugin.length;k++){var t=document.createElement("option");mxUtils.write(t,App.publicPlugin[k]);t.value=App.publicPlugin[k];v.appendChild(t)}g.appendChild(v);mxUtils.br(g);mxUtils.br(g);k=mxUtils.button(mxResources.get("custom")+"...",function(){var x=new FilenameDialog(b,"",mxResources.get("add"),function(A){b.hideDialog();if(null!=A&&0<A.length){A=A.split(";");for(var J=0;J<A.length;J++){var D=A[J],G=App.pluginRegistry[D];null!=G&&(D=G);0<D.length&&0>mxUtils.indexOf(u,D)&&u.push(D)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(x.container,300,80,!0,!0);x.init()});k.className="geBtn";ALLOW_CUSTOM_PLUGINS||(k.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var x=App.pluginRegistry[v.value];0>mxUtils.indexOf(u,x)&&(u.push(x),l())}),null,null,null,k);b.showDialog(g.container,360,100,!0,!0)});H.className="geBtn";var E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";var K=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){F?(mxSettings.setPlugins(u),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});K.className="geBtn gePrimaryBtn";var d=document.createElement("div");-d.style.marginTop="14px";d.style.textAlign="right";b.isOffline()||d.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||d.appendChild(E),d.appendChild(H),d.appendChild(K)):(d.appendChild(H),d.appendChild(K),c||d.appendChild(E));n.appendChild(d);this.container=n},CropImageDialog=function(b,e,f,c){function l(){var R=t.checked,V=x.checked,Q=g.geometry,O=F.width,q=F.height,y=(300-O)/2,B=(300-q)/2;Q.x<y?(Q.width-=y-Q.x,Q.x=y):Q.x+Q.width>y+O&&(Q.width=y+O-Q.x,-Q.x=Math.min(Q.x,y+O));Q.y<B?(Q.height-=B-Q.y,Q.y=B):Q.y+Q.height>B+q&&(Q.height=B+q-Q.y,Q.y=Math.min(Q.y,B+q));var C=(Q.x-y)/O*100;O=100-(Q.x+Q.width-y)/O*100;y=(Q.y-B)/q*100;Q=100-(Q.y+Q.height-B)/q*100;return"inset("+mxUtils.format(y)+"% "+mxUtils.format(O)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(C)+"%"+(R?" round "+d+"%":V?" round 50%":"")+")"}function n(R){null!=E&&(!0!==R&&(E.model.setGeometry(g,K.clone()),d=5,J.value=d),E.model.setStyle(g,k+l()),E.selectAll(),A.style.visibility=t.checked?+d.style.marginTop="14px";d.style.textAlign="right";b.isOffline()||d.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||d.appendChild(E),d.appendChild(H),d.appendChild(K)):(d.appendChild(H),d.appendChild(K),c||d.appendChild(E));n.appendChild(d);this.container=n},CropImageDialog=function(b,e,f,c){function l(){var R=t.checked,V=x.checked,Q=g.geometry,P=F.width,q=F.height,y=(300-P)/2,B=(300-q)/2;Q.x<y?(Q.width-=y-Q.x,Q.x=y):Q.x+Q.width>y+P&&(Q.width=y+P-Q.x,+Q.x=Math.min(Q.x,y+P));Q.y<B?(Q.height-=B-Q.y,Q.y=B):Q.y+Q.height>B+q&&(Q.height=B+q-Q.y,Q.y=Math.min(Q.y,B+q));var C=(Q.x-y)/P*100;P=100-(Q.x+Q.width-y)/P*100;y=(Q.y-B)/q*100;Q=100-(Q.y+Q.height-B)/q*100;return"inset("+mxUtils.format(y)+"% "+mxUtils.format(P)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(C)+"%"+(R?" round "+d+"%":V?" round 50%":"")+")"}function n(R){null!=E&&(!0!==R&&(E.model.setGeometry(g,K.clone()),d=5,J.value=d),E.model.setStyle(g,k+l()),E.selectAll(),A.style.visibility=t.checked?"visible":"hidden")}var p=document.createElement("div"),u=document.createElement("div");u.style.height="300px";u.style.width="300px";u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";u.style.position="absolute";var F=document.createElement("img");F.onload=function(){function R(){E.model.setStyle(g,k+l())}E=new Graph(H);E.autoExtend=!1;E.autoScroll=!1;E.setGridEnabled(!1);E.setEnabled(!0);E.setPanning(!1);E.setConnectable(!1);E.getRubberband().setEnabled(!1);-E.graphHandler.allowLivePreview=!1;var V=E.createVertexHandler;E.createVertexHandler=function(){var P=V.apply(this,arguments);P.livePreview=!1;return P};if(null!=f)try{if("inset"==f.substring(0,5)){var Q=g.geometry,O=F.width,q=F.height,y=(300-O)/2,B=(300-q)/2,C=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),M=parseFloat(C[0]),T=parseFloat(C[1]),m=parseFloat(C[2]),z=parseFloat(C[3]);isFinite(M)&&isFinite(T)&&isFinite(m)&&isFinite(z)?(Q.x=z/100*O+y,Q.y=M/100*q+B,Q.width=(100-T)/100*O+y-Q.x,Q.height=(100--m)/100*q+B-Q.y,"round"==C[4]?"50%"==C[5]?x.setAttribute("checked","checked"):(d=parseInt(C[5]),J.value=d,t.setAttribute("checked","checked"),A.style.visibility="visible"):v.setAttribute("checked","checked")):f=null}else f=null}catch(P){}g.style=k+(f?f:l());g.vertex=!0;E.addCell(g,null,null,null,null);E.selectAll();E.addListener(mxEvent.CELLS_MOVED,R);E.addListener(mxEvent.CELLS_RESIZED,R);var I=E.graphHandler.mouseUp,L=E.graphHandler.mouseDown;E.graphHandler.mouseUp=function(){I.apply(this,arguments);+E.graphHandler.allowLivePreview=!1;var V=E.createVertexHandler;E.createVertexHandler=function(){var O=V.apply(this,arguments);O.livePreview=!1;return O};if(null!=f)try{if("inset"==f.substring(0,5)){var Q=g.geometry,P=F.width,q=F.height,y=(300-P)/2,B=(300-q)/2,C=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),M=parseFloat(C[0]),T=parseFloat(C[1]),m=parseFloat(C[2]),z=parseFloat(C[3]);isFinite(M)&&isFinite(T)&&isFinite(m)&&isFinite(z)?(Q.x=z/100*P+y,Q.y=M/100*q+B,Q.width=(100-T)/100*P+y-Q.x,Q.height=(100-+m)/100*q+B-Q.y,"round"==C[4]?"50%"==C[5]?x.setAttribute("checked","checked"):(d=parseInt(C[5]),J.value=d,t.setAttribute("checked","checked"),A.style.visibility="visible"):v.setAttribute("checked","checked")):f=null}else f=null}catch(O){}g.style=k+(f?f:l());g.vertex=!0;E.addCell(g,null,null,null,null);E.selectAll();E.addListener(mxEvent.CELLS_MOVED,R);E.addListener(mxEvent.CELLS_RESIZED,R);var I=E.graphHandler.mouseUp,L=E.graphHandler.mouseDown;E.graphHandler.mouseUp=function(){I.apply(this,arguments);H.style.backgroundColor="#fff9"};E.graphHandler.mouseDown=function(){L.apply(this,arguments);H.style.backgroundColor=""};E.dblClick=function(){};var N=E.getSelectionModel().changeSelection;E.getSelectionModel().changeSelection=function(){N.call(this,[g],[g])}};F.onerror=function(){F.onload=null;F.src=Editor.errorImage};F.setAttribute("src",e);F.style.maxWidth="300px";F.style.maxHeight="300px";u.appendChild(F);p.appendChild(u);var H=document.createElement("div");H.style.width="300px";H.style.height="300px";H.style.overflow="hidden";H.style.backgroundColor="#fff9";p.appendChild(H);var E=null,K=new mxGeometry(100,100,100,100),d=5,g=new mxCell("",K.clone(),""),k="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRect");v.setAttribute("name","croppingShape");v.setAttribute("checked","checked");v.style.margin="5px";p.appendChild(v);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));p.appendChild(e);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRounded");t.setAttribute("name","croppingShape");t.style.margin="5px";p.appendChild(t);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));p.appendChild(e);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id",@@ -12615,30 +12615,30 @@ p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");Hx.setAttribute("type","text");x.style.width="100px";x.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";H.appendChild(x);u.appendChild(F);u.appendChild(H);p.appendChild(u);n.appendChild(p);l.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<e.length;J++){var D=f.getCellGeometry(e[J]);null!=D&&(D=D.clone(),f.isCellMovable(e[J])&&(D.relative=E.checked,0<mxUtils.trim(K.value).length&&(D.x=Number(K.value)),0<mxUtils.trim(d.value).length&&(D.y=Number(d.value)),0<mxUtils.trim(g.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(k.value))),f.isCellResizable(e[J])&&(0<mxUtils.trim(v.value).length&&(D.width=Number(v.value)),0<mxUtils.trim(t.value).length&&(D.height=Number(t.value))),f.getModel().setGeometry(e[J],D));0<mxUtils.trim(x.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[e[J]])}}finally{f.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(J){13==J.keyCode&&A.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(A)):(n.appendChild(A),n.appendChild(c));l.appendChild(n);this.container=l},LibraryDialog=function(b,-e,f,c,l,n,p){function u(Q){for(Q=document.elementFromPoint(Q.clientX,Q.clientY);null!=Q&&Q.parentNode!=k;)Q=Q.parentNode;var O=null;if(null!=Q){var q=k.firstChild;for(O=0;null!=q&&q!=Q;)q=q.nextSibling,O++}return O}function F(Q,O,q,y,B,C,M,T,m){try{if(b.spinner.stop(),null==O||"image/"==O.substring(0,6))if(null==Q&&null!=M||null==t[Q]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?-Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};k.style.backgroundImage="";v.style.display="none";var I=B,L=C;if(B>b.maxImageSize||C>b.maxImageSize){var N=Math.min(1,Math.min(b.maxImageSize/Math.max(1,B)),b.maxImageSize/Math.max(1,C));B*=N;C*=N}I>L?(L=Math.round(100*L/I),I=100):(I=Math.round(100*I/L),L=100);var P=document.createElement("div");P.setAttribute("draggable","true");P.style.display="inline-block";P.style.position="relative";P.style.padding=-"0 12px";P.style.cursor="move";mxUtils.setPrefixedStyle(P.style,"transition","transform .1s ease-in-out");if(null!=Q){var S=document.createElement("img");S.setAttribute("src",D.convert(Q));S.style.width=I+"px";S.style.height=L+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-L)/2)+"px";S.style.paddingLeft=Math.floor((100-I)/2)+"px";P.appendChild(S)}else if(null!=M){var U=b.stringToCells("<"==M.xml.charAt(0)?M.xml:Graph.decompress(M.xml));0<U.length&&(b.sidebar.createThumb(U,100,100,-P,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),P.firstChild.style.display="inline-block",P.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});-(function(fa,aa,da){mxEvent.addListener(W,"click",function(ia){t[aa]=null;for(var pa=0;pa<K.length;pa++)if(null!=K[pa].data&&K[pa].data==aa||null!=K[pa].xml&&null!=da&&K[pa].xml==da.xml){K.splice(pa,1);break}P.parentNode.removeChild(fa);0==K.length&&(k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(P,Q,M);P.appendChild(W);P.style.marginBottom="30px";var X=document.createElement("div");+e,f,c,l,n,p){function u(Q){for(Q=document.elementFromPoint(Q.clientX,Q.clientY);null!=Q&&Q.parentNode!=k;)Q=Q.parentNode;var P=null;if(null!=Q){var q=k.firstChild;for(P=0;null!=q&&q!=Q;)q=q.nextSibling,P++}return P}function F(Q,P,q,y,B,C,M,T,m){try{if(b.spinner.stop(),null==P||"image/"==P.substring(0,6))if(null==Q&&null!=M||null==t[Q]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?+Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};k.style.backgroundImage="";v.style.display="none";var I=B,L=C;if(B>b.maxImageSize||C>b.maxImageSize){var N=Math.min(1,Math.min(b.maxImageSize/Math.max(1,B)),b.maxImageSize/Math.max(1,C));B*=N;C*=N}I>L?(L=Math.round(100*L/I),I=100):(I=Math.round(100*I/L),L=100);var O=document.createElement("div");O.setAttribute("draggable","true");O.style.display="inline-block";O.style.position="relative";O.style.padding=+"0 12px";O.style.cursor="move";mxUtils.setPrefixedStyle(O.style,"transition","transform .1s ease-in-out");if(null!=Q){var S=document.createElement("img");S.setAttribute("src",D.convert(Q));S.style.width=I+"px";S.style.height=L+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-L)/2)+"px";S.style.paddingLeft=Math.floor((100-I)/2)+"px";O.appendChild(S)}else if(null!=M){var U=b.stringToCells("<"==M.xml.charAt(0)?M.xml:Graph.decompress(M.xml));0<U.length&&(b.sidebar.createThumb(U,100,100,+O,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),O.firstChild.style.display="inline-block",O.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});+(function(fa,aa,da){mxEvent.addListener(W,"click",function(ia){t[aa]=null;for(var pa=0;pa<K.length;pa++)if(null!=K[pa].data&&K[pa].data==aa||null!=K[pa].xml&&null!=da&&K[pa].xml==da.xml){K.splice(pa,1);break}O.parentNode.removeChild(fa);0==K.length&&(k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(O,Q,M);O.appendChild(W);O.style.marginBottom="30px";var X=document.createElement("div");X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=Q?(Z={data:Q,w:B,h:C,title:m},null!=T&&(Z.aspect=T),t[Q]=S,K.push(Z)):null!=M&&(M.aspect="fixed",K.push(M),Z=M);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=J&&(J(),J=null,mxEvent.consume(fa))});-z();P.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});U=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,z())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=-J&&(J(),J=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);J=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);z()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",U);mxEvent.addListener(P,"dblclick",-U);k.appendChild(P);mxEvent.addListener(P,"dragstart",function(fa){null==J&&(null==Q&&null!=M&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=M.xml&&fa.dataTransfer.setData("Text",M.xml),x=u(fa),mxClient.IS_GC&&(P.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(P,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(P,"dragend",function(fa){"hidden"==W.style.visibility&&-(W.style.visibility="",X.style.visibility="");x=null;mxUtils.setOpacity(P,100);mxUtils.setPrefixedStyle(P.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{B=!1;try{if(I=mxUtils.parseXml(Q),"mxlibrary"==I.documentElement.nodeName){L=JSON.parse(mxUtils.getTextContent(I.documentElement));if(null!=L&&0<L.length)for(var Y=0;Y<L.length;Y++)null!=L[Y].xml?F(null,null,0,0,0,0,L[Y]):F(L[Y].data,null,0,0,L[Y].w,L[Y].h,null,"fixed",L[Y].title);B=!0}else if("mxfile"==+z();O.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});U=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,z())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=+J&&(J(),J=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);J=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);z()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",U);mxEvent.addListener(O,"dblclick",+U);k.appendChild(O);mxEvent.addListener(O,"dragstart",function(fa){null==J&&(null==Q&&null!=M&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=M.xml&&fa.dataTransfer.setData("Text",M.xml),x=u(fa),mxClient.IS_GC&&(O.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(O,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(O,"dragend",function(fa){"hidden"==W.style.visibility&&+(W.style.visibility="",X.style.visibility="");x=null;mxUtils.setOpacity(O,100);mxUtils.setPrefixedStyle(O.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{B=!1;try{if(I=mxUtils.parseXml(Q),"mxlibrary"==I.documentElement.nodeName){L=JSON.parse(mxUtils.getTextContent(I.documentElement));if(null!=L&&0<L.length)for(var Y=0;Y<L.length;Y++)null!=L[Y].xml?F(null,null,0,0,0,0,L[Y]):F(L[Y].data,null,0,0,L[Y].w,L[Y].h,null,"fixed",L[Y].title);B=!0}else if("mxfile"==I.documentElement.nodeName){var ba=I.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);U=b.stringToCells(ea);if(0<U.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(U);null!=ca&&F(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}B=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}B||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&console.log("Error in library dialog: "+fa)}return null}function H(Q){Q.dataTransfer.dropEffect=null!=x?"move":"copy";Q.stopPropagation();Q.preventDefault()}function E(Q){Q.stopPropagation();Q.preventDefault();G=!1;A=u(Q);if(null!=x)null!=A&&A<k.children.length?(K.splice(A>x?A-1:A,0,K.splice(x,1)[0]),k.insertBefore(k.children[x],k.children[A])):(K.push(K.splice(x,1)[0]),k.appendChild(k.children[x]));else if(0<Q.dataTransfer.files.length)b.importFiles(Q.dataTransfer.files,0,0,b.maxImageSize,R(Q));-else if(0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")){var O=decodeURIComponent(Q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(O)||/(\.png)($|\?)/i.test(O)||/(\.gif)($|\?)/i.test(O)||/(\.svg)($|\?)/i.test(O))&&b.loadImage(O,function(q){F(O,null,0,0,q.width,q.height);k.scrollTop=k.scrollHeight})}Q.stopPropagation();Q.preventDefault()}var K=[];f=document.createElement("div");f.style.height="100%";var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.height=+else if(0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")){var P=decodeURIComponent(Q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(P)||/(\.png)($|\?)/i.test(P)||/(\.gif)($|\?)/i.test(P)||/(\.svg)($|\?)/i.test(P))&&b.loadImage(P,function(q){F(P,null,0,0,q.width,q.height);k.scrollTop=k.scrollHeight})}Q.stopPropagation();Q.preventDefault()}var K=[];f=document.createElement("div");f.style.height="100%";var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.height="40px";f.appendChild(d);mxUtils.write(d,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var g=document.createElement("input");g.setAttribute("value",e);g.style.marginRight="20px";g.style.marginLeft="10px";g.style.width="500px";null==l||l.isRenamable()||g.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};d.appendChild(g);Editor.enableUncompressedLibraries&&(g.style.width="420px",e=document.createElement("input"),e.setAttribute("type","checkbox"),e.style.marginRight="10px",d.appendChild(e),mxUtils.write(d,mxResources.get("compressed")));var k=document.createElement("div");k.style.borderWidth="1px 0px 1px 0px";k.style.borderColor="#d3d3d3";k.style.borderStyle="solid";k.style.marginTop="6px";k.style.overflow="auto";k.style.height="340px";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";0==K.length&&Graph.fileSupport&&(k.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"));f.appendChild(v);var t={},x=null,A=null,J=null;d=function(Q){"true"!=mxEvent.getSource(Q).getAttribute("contentEditable")&&null!=J&&(J(),J=null,mxEvent.consume(Q))};mxEvent.addListener(k,"mousedown",d);mxEvent.addListener(k,"pointerdown",-d);mxEvent.addListener(k,"touchstart",d);var D=new mxUrlConverter,G=!1;if(null!=c)for(d=0;d<c.length;d++)e=c[d],F(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(k,"dragleave",function(Q){v.style.cursor="";for(var O=mxEvent.getSource(Q);null!=O;){if(O==k||O==v){Q.stopPropagation();Q.preventDefault();break}O=O.parentNode}});var R=function(Q){return function(O,q,y,B,C,M,T,m,z){null!=z&&EditorUi.isVisioFilename(z.name)?b.importVisio(z,mxUtils.bind(this,function(I){F(I,q,y,B,C,M,T,"fixed",-mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(O,z.name)?b.isExternalDataComms()?b.parseFile(z,mxUtils.bind(this,function(I){4==I.readyState&&(b.spinner.stop(),200<=I.status&&299>=I.status&&(F(I.responseText,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):-(F(O,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight)}};mxEvent.addListener(k,"dragover",H);mxEvent.addListener(k,"drop",E);mxEvent.addListener(v,"dragover",H);mxEvent.addListener(v,"drop",E);f.appendChild(k);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&-c.appendChild(d);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(l,function(Q){if(null!=Q){var O=b.getSearch("create title mode url drive splash state clibs ui".split(" "));O+=(0==O.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(Q);Q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+O,null,null,null,null,"Check out the library I made using @drawio");+d);mxEvent.addListener(k,"touchstart",d);var D=new mxUrlConverter,G=!1;if(null!=c)for(d=0;d<c.length;d++)e=c[d],F(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(k,"dragleave",function(Q){v.style.cursor="";for(var P=mxEvent.getSource(Q);null!=P;){if(P==k||P==v){Q.stopPropagation();Q.preventDefault();break}P=P.parentNode}});var R=function(Q){return function(P,q,y,B,C,M,T,m,z){null!=z&&EditorUi.isVisioFilename(z.name)?b.importVisio(z,mxUtils.bind(this,function(I){F(I,q,y,B,C,M,T,"fixed",+mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(P,z.name)?b.isExternalDataComms()?b.parseFile(z,mxUtils.bind(this,function(I){4==I.readyState&&(b.spinner.stop(),200<=I.status&&299>=I.status&&(F(I.responseText,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):+(F(P,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight)}};mxEvent.addListener(k,"dragover",H);mxEvent.addListener(k,"drop",E);mxEvent.addListener(v,"dragover",H);mxEvent.addListener(v,"drop",E);f.appendChild(k);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&+c.appendChild(d);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(l,function(Q){if(null!=Q){var P=b.getSearch("create title mode url drive splash state clibs ui".split(" "));P+=(0==P.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(Q);Q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+P,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(Q.container,450,240,!0);Q.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId(),l)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var Q=b.createLibraryDataFromImages(K),-O=g.value;/(\.xml)$/i.test(O)||(O+=".xml");b.isLocalFileSave()?b.saveLocalFile(Q,O,"text/xml",null,null,null!=p?p:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(O)+"&format=xml&xml="+encodeURIComponent(Q))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var V=document.createElement("input");V.setAttribute("multiple","multiple");V.setAttribute("type","file");mxEvent.addListener(V,-"change",function(Q){G=!1;b.importFiles(V.files,0,0,b.maxImageSize,function(O,q,y,B,C,M,T,m,z){null!=V.files&&(R(Q)(O,q,y,B,C,M,T,m,z),V.type="",V.type="file",V.value="")});k.scrollTop=k.scrollHeight});V.style.display="none";document.body.appendChild(V);b.libDlgFileInputElt=V}e=mxUtils.button(mxResources.get("import"),function(){null!=J&&(J(),J=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),-function(){null!=J&&(J(),J=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(Q,O,q){G=!1;if(null!=Q){if("data:image/"==Q.substring(0,11)){var y=Q.indexOf(",");0<y&&(Q=Q.substring(0,y)+";base64,"+Q.substring(y+1))}F(Q,null,0,0,O,q);k.scrollTop=k.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(Q,O,q,y){b.saveLibrary(Q,O,q,y)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=J&&+P=g.value;/(\.xml)$/i.test(P)||(P+=".xml");b.isLocalFileSave()?b.saveLocalFile(Q,P,"text/xml",null,null,null!=p?p:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(P)+"&format=xml&xml="+encodeURIComponent(Q))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var V=document.createElement("input");V.setAttribute("multiple","multiple");V.setAttribute("type","file");mxEvent.addListener(V,+"change",function(Q){G=!1;b.importFiles(V.files,0,0,b.maxImageSize,function(P,q,y,B,C,M,T,m,z){null!=V.files&&(R(Q)(P,q,y,B,C,M,T,m,z),V.type="",V.type="file",V.value="")});k.scrollTop=k.scrollHeight});V.style.display="none";document.body.appendChild(V);b.libDlgFileInputElt=V}e=mxUtils.button(mxResources.get("import"),function(){null!=J&&(J(),J=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),+function(){null!=J&&(J(),J=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(Q,P,q){G=!1;if(null!=Q){if("data:image/"==Q.substring(0,11)){var y=Q.indexOf(",");0<y&&(Q=Q.substring(0,y)+";base64,"+Q.substring(y+1))}F(Q,null,0,0,P,q);k.scrollTop=k.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(Q,P,q,y){b.saveLibrary(Q,P,q,y)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=J&&(J(),J=null);this.saveBtnClickHandler(g.value,K,l,n)}));e.setAttribute("id","btnSave");e.className="geBtn gePrimaryBtn";c.appendChild(e);b.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var n=document.createElement("table"),p=document.createElement("tbody");n.style.cellPadding="4px";var u=document.createElement("tr");var F=document.createElement("td");F.setAttribute("colspan","2");F.style.fontSize="10pt";mxUtils.write(F,f);u.appendChild(F);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");var H=document.createElement("textarea");H.style.outline="none";H.style.resize="none";H.style.width=c-200+"px";H.style.height=l+"px";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};F.appendChild(H);u.appendChild(F);F=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);F.appendChild(f);var E=new Graph(f);E.setEnabled(!1);var K=b.editor.graph.cloneCell(e);E.addCells([K]);f=E.view.getState(K);var d="";null!=f.shape&&null!=f.shape.stencil&&(d=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(H,d||"");f=E.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);E.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);u.appendChild(F);p.appendChild(u);u=document.createElement("tr");@@ -12659,7 +12659,7 @@ k.style.width="250px";k.className="dlg_fontName_g";H=document.createElement("td"null,"Font Name")+":");F.appendChild(H);var t=document.createElement("input");"w"==c&&(Editor.enableWebFonts?t.setAttribute("value",e):d.setAttribute("value",e));t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_w";H=document.createElement("td");H.appendChild(t);F.appendChild(H);Editor.enableWebFonts&&u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontUrl",null,"Font URL")+":");F.appendChild(H);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";H=document.createElement("td");H.appendChild(x);F.appendChild(H);Editor.enableWebFonts&&u.appendChild(F);this.init=function(){var J=d;"g"==c?J=k:"w"==c&&Editor.enableWebFonts&&(J=t);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null)};F=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||H.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&H.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){if(E.checked){var J=d.value;var D="s"}else if(g.checked){J=-k.value;var G=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");D="g"}else v.checked&&(J=t.value,G=x.value,D="w");var R=J;var V=G,Q=D,O=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,q=p.querySelector(".dlg_fontName_"+Q);null==q||null!=R&&0!=R.length?(q=p.querySelector(".dlg_fontUrl"),null==q||"w"!=Q||O.test(V)?R=!0:(q.style.border="1px solid red",R=!1)):(q.style.border="1px solid red",R=!1);R&&(l(J,G,D),b.hideDialog())});A.className="geBtn gePrimaryBtn";+k.value;var G=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");D="g"}else v.checked&&(J=t.value,G=x.value,D="w");var R=J;var V=G,Q=D,P=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,q=p.querySelector(".dlg_fontName_"+Q);null==q||null!=R&&0!=R.length?(q=p.querySelector(".dlg_fontUrl"),null==q||"w"!=Q||P.test(V)?R=!0:(q.style.border="1px solid red",R=!1)):(q.style.border="1px solid red",R=!1);R&&(l(J,G,D),b.hideDialog())});A.className="geBtn gePrimaryBtn";mxEvent.addListener(d,"keypress",n);mxEvent.addListener(k,"keypress",n);mxEvent.addListener(t,"keypress",n);mxEvent.addListener(x,"keypress",n);mxEvent.addListener(d,"focus",function(){E.setAttribute("checked","checked");E.checked=!0});mxEvent.addListener(k,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(t,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});H.appendChild(A);b.editor.cancelFirst||H.appendChild(e);F.appendChild(H);u.appendChild(F);p.appendChild(u);this.container=p};function AspectDialog(b,e,f,c,l){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("pages"));e.appendChild(n);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("layers"));e.appendChild(n);n=document.createElement("div");n.className="geAspectDlgList";@@ -12685,8 +12685,8 @@ p.style.textOverflow="ellipsis",p.style.display="block",p.style.margin="2px 0px"10pt",mxUtils.write(d,mxResources.get("pathFilename")+":"),K.appendChild(d),p=document.createElement("input"),p.setAttribute("title",n.fileObject.path),p.setAttribute("value",n.fileObject.path),p.setAttribute("disabled","disabled"),p.style.marginLeft="4px",p.style.width="100%",d=document.createElement("td"),d.appendChild(p),K.appendChild(d),l.appendChild(K));this.init=null!=this.init?this.init:function(){};p=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&H(function(){b.spinner.stop();b.hideDialog()},function(D){b.spinner.stop();b.handleError(D,mxResources.get("error"))})});p.className="geBtn gePrimaryBtn";K=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&d.appendChild(u);d.appendChild(p);b.editor.cancelFirst||d.appendChild(u);K.appendChild(d);l.appendChild(K);c.appendChild(l);this.container=c},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function n(B,C,M){B=new mxCell("",new mxGeometry(B,C,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");B.vertex=!0;B.cp=!0;B.constObj=M;return K.addCell(B)}function p(B){B=K.getSelectionCells();K.deleteCells(B)}-function u(){var B=parseInt(Q.value)||0;B=0>B?0:100<B?100:B;Q.value=B;var C=parseInt(q.value)||0;C=0>C?0:100<C?100:C;q.value=C;var M=parseInt(O.value)||0,T=parseInt(y.value)||0;M=new mxConnectionConstraint(new mxPoint(B/100,C/100),!1,null,M,T);B=K.getConnectionPoint(k,M);C=K.getSelectionCell();if(null!=C){C.constObj=M;M=C.geometry.clone();T=K.view.scale;var m=K.view.translate;M.x=(B.x-3*T)/T-m.x;M.y=(B.y-3*T)/T-m.y;K.model.setGeometry(C,M)}}function F(B){if(B.constObj)return{x:B.constObj.point.x,-y:B.constObj.point.y,dx:B.constObj.dx,dy:B.constObj.dy};var C=0,M=0,T=d.geometry,m=mxUtils.format((B.geometry.x+3-T.x)/T.width);B=mxUtils.format((B.geometry.y+3-T.y)/T.height);0>m?(C=m*T.width,m=0):1<m&&(C=(m-1)*T.width,m=1);0>B?(M=B*T.height,B=0):1<B&&(M=(B-1)*T.height,B=1);return{x:m,y:B,dx:parseInt(C),dy:parseInt(M)}}function H(B){if(1==K.getSelectionCount()){var C=K.getSelectionCell();B&&(C.constObj=null);B=F(C);Q.value=100*B.x;q.value=100*B.y;O.value=B.dx;y.value=B.dy;V.style.visibility=""}else V.style.visibility=+function u(){var B=parseInt(Q.value)||0;B=0>B?0:100<B?100:B;Q.value=B;var C=parseInt(q.value)||0;C=0>C?0:100<C?100:C;q.value=C;var M=parseInt(P.value)||0,T=parseInt(y.value)||0;M=new mxConnectionConstraint(new mxPoint(B/100,C/100),!1,null,M,T);B=K.getConnectionPoint(k,M);C=K.getSelectionCell();if(null!=C){C.constObj=M;M=C.geometry.clone();T=K.view.scale;var m=K.view.translate;M.x=(B.x-3*T)/T-m.x;M.y=(B.y-3*T)/T-m.y;K.model.setGeometry(C,M)}}function F(B){if(B.constObj)return{x:B.constObj.point.x,+y:B.constObj.point.y,dx:B.constObj.dx,dy:B.constObj.dy};var C=0,M=0,T=d.geometry,m=mxUtils.format((B.geometry.x+3-T.x)/T.width);B=mxUtils.format((B.geometry.y+3-T.y)/T.height);0>m?(C=m*T.width,m=0):1<m&&(C=(m-1)*T.width,m=1);0>B?(M=B*T.height,B=0):1<B&&(M=(B-1)*T.height,B=1);return{x:m,y:B,dx:parseInt(C),dy:parseInt(M)}}function H(B){if(1==K.getSelectionCount()){var C=K.getSelectionCell();B&&(C.constObj=null);B=F(C);Q.value=100*B.x;q.value=100*B.y;P.value=B.dx;y.value=B.dy;V.style.visibility=""}else V.style.visibility="hidden"}var E=document.createElement("div");E.style.width="350px";E.style.height="350px";E.style.overflow="hidden";E.style.border="1px solid lightGray";E.style.boxSizing="border-box";mxEvent.disableContextMenu(E);c.appendChild(E);var K=new Graph(E);K.transparentBackground=!1;K.autoExtend=!1;K.autoScroll=!1;K.setGridEnabled(!1);K.setEnabled(!0);K.setPanning(!0);K.setConnectable(!1);K.setTooltips(!1);K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;K.maxFitScale=2;E=e.geometry;var d=new mxCell(e.value,new mxGeometry(0,0,E.width,E.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");d.vertex=!0;K.addCell(d);K.dblClick=function(B,C){if(null!=C&&C!=d)K.setSelectionCell(C);else{C=mxUtils.convertPoint(K.container,mxEvent.getClientX(B),mxEvent.getClientY(B));mxEvent.consume(B);B=K.view.scale;var M=K.view.translate;K.setSelectionCell(n((C.x-3*B)/B-M.x,(C.y-3*B)/B-M.y))}};l=new mxKeyHandler(K);l.bindKey(46,p);l.bindKey(8,p);K.getRubberband().isForceRubberbandEvent=function(B){return 0==B.evt.button&&(null==B.getCell()||B.getCell()==d)};K.panningHandler.isForcePanningEvent=function(B){return 2==B.evt.button};var g=K.isCellSelectable;K.isCellSelectable=function(B){return B==d?!1:g.apply(this,arguments)};K.getLinkForCell=function(){return null};var k=K.view.getState(d);E=K.getAllConnectionConstraints(k);for(var v=0;null!=E&&v<E.length;v++){var t=K.getConnectionPoint(k,E[v]);n(t.x-3,t.y-3,E[v])}K.fit(8);K.center();v=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),@@ -12694,9 +12694,9 @@ function(){K.zoomIn()},20);t=b.createToolbarButton(Editor.zoomOutImage,mxResourcA():(K.setGridEnabled(!K.isGridEnabled()),K.refresh())},20);mxEvent.addListener(J,"dblclick",A);var D=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),p,20);mxUtils.setOpacity(D,10);E=document.createElement("div");E.style.display="flex";E.style.alignItems="center";E.style.paddingTop="6px";E.appendChild(v);E.appendChild(t);E.appendChild(x);E.appendChild(J);E.appendChild(D);c.appendChild(E);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min","1");G.setAttribute("value","1");G.style.width="45px";G.style.position="relative";G.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";t=["left","right","top","bottom"];for(v=0;v<t.length;v++)x=t[v],J=document.createElement("option"),mxUtils.write(J,mxResources.get(x)),J.value=x,R.appendChild(J);v=mxUtils.button(mxResources.get("add"),function(){var B=parseInt(G.value);B=1>B?1:100<B?100:B;G.value=B;for(var C=R.value,M=d.geometry,T=[],m=0;m<B;m++){switch(C){case "left":var z=M.x;var I=M.y+(m+1)*M.height/(B+1);break;case "right":z=M.x+M.width;I=M.y+(m+1)*M.height/(B+1);break;case "top":z=M.x+(m+1)*M.width/(B+1);I=M.y;break;case "bottom":z=M.x+(m+1)*M.width/(B+1),I=M.y+M.height}T.push(n(z-3,I-3))}K.setSelectionCells(T)});v.style.marginLeft="auto";E.appendChild(v);E.appendChild(G);E.appendChild(R);var V=document.createElement("div");V.style.margin="4px 0px 8px 0px";V.style.whiteSpace="nowrap";V.style.height="24px";E=document.createElement("span");mxUtils.write(E,mxResources.get("dx"));-V.appendChild(E);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.setAttribute("max","100");Q.style.width="45px";Q.style.margin="0 4px 0 4px";V.appendChild(Q);mxUtils.write(V,"%");var O=document.createElement("input");O.setAttribute("type","number");O.style.width="45px";O.style.margin="0 4px 0 4px";V.appendChild(O);mxUtils.write(V,"pt");E=document.createElement("span");mxUtils.write(E,mxResources.get("dy"));E.style.marginLeft="12px";V.appendChild(E);+V.appendChild(E);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.setAttribute("max","100");Q.style.width="45px";Q.style.margin="0 4px 0 4px";V.appendChild(Q);mxUtils.write(V,"%");var P=document.createElement("input");P.setAttribute("type","number");P.style.width="45px";P.style.margin="0 4px 0 4px";V.appendChild(P);mxUtils.write(V,"pt");E=document.createElement("span");mxUtils.write(E,mxResources.get("dy"));E.style.marginLeft="12px";V.appendChild(E);var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.setAttribute("max","100");q.style.width="45px";q.style.margin="0 4px 0 4px";V.appendChild(q);mxUtils.write(V,"%");var y=document.createElement("input");y.setAttribute("type","number");y.style.width="45px";y.style.margin="0 4px 0 4px";V.appendChild(y);mxUtils.write(V,"pt");c.appendChild(V);H();K.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<K.getSelectionCount()?mxUtils.setOpacity(D,60):-mxUtils.setOpacity(D,10);H()});K.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(Q,"change",u);mxEvent.addListener(q,"change",u);mxEvent.addListener(O,"change",u);mxEvent.addListener(y,"change",u);E=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});E.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){var B=K.model.cells,C=[],M=[],T;for(T in B){var m=B[T];m.cp&&M.push(F(m))}M.sort(function(z,I){return z.x!=I.x?z.x-I.x:z.y!=I.y?z.y-I.y:z.dx!=I.dx?z.dx-+mxUtils.setOpacity(D,10);H()});K.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(Q,"change",u);mxEvent.addListener(q,"change",u);mxEvent.addListener(P,"change",u);mxEvent.addListener(y,"change",u);E=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});E.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){var B=K.model.cells,C=[],M=[],T;for(T in B){var m=B[T];m.cp&&M.push(F(m))}M.sort(function(z,I){return z.x!=I.x?z.x-I.x:z.y!=I.y?z.y-I.y:z.dx!=I.dx?z.dx-I.dx:z.dy-I.dy});for(B=0;B<M.length;B++)0<B&&M[B].x==M[B-1].x&&M[B].y==M[B-1].y&&M[B].dx==M[B-1].dx&&M[B].dy==M[B-1].dy||C.push("["+M[B].x+","+M[B].y+",0,"+M[B].dx+","+M[B].dy+"]");b.editor.graph.setCellStyles("points","["+C.join(",")+"]",[e]);f();b.hideDialog()});v.className="geBtn gePrimaryBtn";t=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[e]);f();b.hideDialog()});t.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign="right";b.isOffline()||x.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&x.appendChild(E);x.appendChild(t);x.appendChild(v);b.editor.cancelFirst||x.appendChild(E);c.appendChild(x)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";@@ -12778,33 +12778,33 @@ type:"bool",defVal:!1,isVisible:function(m,z){z=z.editorUi.editor.graph.model;redefVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(m,z){var I=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||z.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(m,z){return 0<m.vertices.length&&z.editorUi.editor.graph.isContainer(m.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\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, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#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,[email protected],default,#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,[email protected],default,#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,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';-Editor.createRoughCanvas=function(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(I){var L=I.sets||[];I=I.options||this.getDefaultOptions();for(var N=0;N<L.length;N++){var P=L[N];switch(P.type){case "path":null!=I.stroke&&this._drawToContext(m,P,I);break;case "fillPath":this._drawToContext(m,P,I);break;case "fillSketch":this.fillSketch(m,P,I)}}};z.fillSketch=function(I,L,N){var P=m.state.strokeColor,S=m.state.strokeWidth,U=m.state.strokeAlpha,W=m.state.dashed,X=N.fillWeight;-0>X&&(X=N.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(N.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(I,L,N);m.setDashed(W);m.setStrokeWidth(S);m.setStrokeColor(P);m.setStrokeAlpha(U)};z._drawToContext=function(I,L,N){I.begin();for(var P=0;P<L.ops.length;P++){var S=L.ops[P],U=S.data;switch(S.op){case "move":I.moveTo(U[0],U[1]);break;case "bcurveTo":I.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":I.lineTo(U[0],U[1])}}I.end();"fillPath"===L.type&&-N.filled?I.fill():I.stroke()};return z};(function(){function m(P,S,U){this.canvas=P;this.rc=S;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=+Editor.createRoughCanvas=function(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(I){var L=I.sets||[];I=I.options||this.getDefaultOptions();for(var N=0;N<L.length;N++){var O=L[N];switch(O.type){case "path":null!=I.stroke&&this._drawToContext(m,O,I);break;case "fillPath":this._drawToContext(m,O,I);break;case "fillSketch":this.fillSketch(m,O,I)}}};z.fillSketch=function(I,L,N){var O=m.state.strokeColor,S=m.state.strokeWidth,U=m.state.strokeAlpha,W=m.state.dashed,X=N.fillWeight;+0>X&&(X=N.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(N.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(I,L,N);m.setDashed(W);m.setStrokeWidth(S);m.setStrokeColor(O);m.setStrokeAlpha(U)};z._drawToContext=function(I,L,N){I.begin();for(var O=0;O<L.ops.length;O++){var S=L.ops[O],U=S.data;switch(S.op){case "move":I.moveTo(U[0],U[1]);break;case "bcurveTo":I.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":I.lineTo(U[0],U[1])}}I.end();"fillPath"===L.type&&+N.filled?I.fill():I.stroke()};return z};(function(){function m(O,S,U){this.canvas=O;this.rc=S;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,m.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,m.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,m.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,m.prototype.fillAndStroke);-this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(P,S){var U=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)U=(U<<5)-U+W.charCodeAt(X)<<0}U={strokeWidth:this.canvas.state.strokeWidth,seed:U,preserveVertices:!0};W=this.rc.getDefaultOptions();U.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:-mxConstants.NONE;P=null;(U.filled=S)?(U.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):U.fill="";U.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);U.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);U.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);U.roughness=mxUtils.getValue(this.shape.style,"jiggle",+this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(O,S){var U=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)U=(U<<5)-U+W.charCodeAt(X)<<0}U={strokeWidth:this.canvas.state.strokeWidth,seed:U,preserveVertices:!0};W=this.rc.getDefaultOptions();U.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:+mxConstants.NONE;O=null;(U.filled=S)?(U.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):U.fill="";U.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);U.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);U.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);U.roughness=mxUtils.getValue(this.shape.style,"jiggle",W.roughness);U.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);U.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);U.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);U.hachureGap="auto"==S?-1:S;U.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);U.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",-S);U.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);U.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=U.fill&&(null!=P||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(U.fill)))?-"solid":W.fillStyle);U.fillStyle=S;return U};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};-m.prototype.lineTo=function(P,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,P,S),this.lastX=P,this.lastY=S)};m.prototype.moveTo=function(P,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,S),this.lastX=P,this.lastY=S,this.firstX=P,this.firstY=S)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(P,S,U,W){this.passThrough?-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,S,U,W),this.lastX=U,this.lastY=W)};m.prototype.curveTo=function(P,S,U,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,S,U,W,X,Z),this.lastX=X,this.lastY=Z)};m.prototype.arcTo=function(P,S,U,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,P,S,U,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=-6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};m.prototype.rect=function(P,S,U,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,S,U,W,this.getStyle(!0,!0)))};m.prototype.ellipse=function(P,S,U,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+U/2,S+W/2,U,W,this.getStyle(!0,!0)))};m.prototype.roundrect=-function(P,S,U,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(P+X,S),this.lineTo(P+U-X,S),this.quadTo(P+U,S,P+U,S+Z),this.lineTo(P+U,S+W-Z),this.quadTo(P+U,S+W,P+U-X,S+W),this.lineTo(P+X,S+W),this.quadTo(P,S+W,P,S+W-Z),this.lineTo(P,S+Z),this.quadTo(P,S,P+X,S))};m.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in P)this.nextShape.options[S]=-P[S];P.stroke!=mxConstants.NONE&&null!=P.stroke||delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?+S);U.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);U.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=U.fill&&(null!=O||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(U.fill)))?+"solid":W.fillStyle);U.fillStyle=S;return U};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};+m.prototype.lineTo=function(O,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,O,S),this.lastX=O,this.lastY=S)};m.prototype.moveTo=function(O,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,S),this.lastX=O,this.lastY=S,this.firstX=O,this.firstY=S)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(O,S,U,W){this.passThrough?+this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,S,U,W),this.lastX=U,this.lastY=W)};m.prototype.curveTo=function(O,S,U,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,S,U,W,X,Z),this.lastX=X,this.lastY=Z)};m.prototype.arcTo=function(O,S,U,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,O,S,U,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=+6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};m.prototype.rect=function(O,S,U,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,S,U,W,this.getStyle(!0,!0)))};m.prototype.ellipse=function(O,S,U,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+U/2,S+W/2,U,W,this.getStyle(!0,!0)))};m.prototype.roundrect=+function(O,S,U,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+X,S),this.lineTo(O+U-X,S),this.quadTo(O+U,S,O+U,S+Z),this.lineTo(O+U,S+W-Z),this.quadTo(O+U,S+W,O+U-X,S+W),this.lineTo(O+X,S+W),this.quadTo(O,S+W,O,S+W-Z),this.lineTo(O,S+Z),this.quadTo(O,S,O+X,S))};m.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in O)this.nextShape.options[S]=+O[S];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};m.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(P){return new m(P,Editor.createRoughCanvas(P),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,-"sketchStyle","rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,S,U,W,X){null!=P.handJiggle&&P.handJiggle.passThrough||I.apply(this,arguments)};var L=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var S=P.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==m&&!this.outline){P.save();-var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=P.setStrokeColor;P.setStrokeColor=function(){};var ba=P.setFillColor;P.setFillColor=function(){};U||null==W||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;L.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ba;P.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;P.restore();U&&null!=W&&(P.addTolerance=function(){})}L.apply(this,arguments);P.addTolerance=-S};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,S,U,W,X,Z){null!=P.handJiggle&&P.handJiggle.constructor==m?(P.handJiggle.passThrough=!0,N.apply(this,arguments),P.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),-{to:"string"})};Editor.extractGraphModel=function(m,z,I){if(null!=m&&"undefined"!==typeof pako){var L=m.ownerDocument.getElementsByTagName("div"),N=[];if(null!=L&&0<L.length)for(var P=0;P<L.length;P++)if("mxgraph"==L[P].getAttribute("class")){N.push(L[P]);break}0<N.length&&(L=N[0].getAttribute("data-mxgraph"),null!=L?(N=JSON.parse(L),null!=N&&null!=N.xml&&(m=mxUtils.parseXml(N.xml),m=m.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(L=mxUtils.getTextContent(N[0]),L=Graph.decompress(L,+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(O){return new m(O,Editor.createRoughCanvas(O),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,+"sketchStyle","rough")?this.createComicCanvas(O):this.createRoughCanvas(O)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,S,U,W,X){null!=O.handJiggle&&O.handJiggle.passThrough||I.apply(this,arguments)};var L=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var S=O.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();+var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var ba=O.setFillColor;O.setFillColor=function(){};U||null==W||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;L.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=ba;O.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;O.restore();U&&null!=W&&(O.addTolerance=function(){})}L.apply(this,arguments);O.addTolerance=+S};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(O,S,U,W,X,Z){null!=O.handJiggle&&O.handJiggle.constructor==m?(O.handJiggle.passThrough=!0,N.apply(this,arguments),O.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),+{to:"string"})};Editor.extractGraphModel=function(m,z,I){if(null!=m&&"undefined"!==typeof pako){var L=m.ownerDocument.getElementsByTagName("div"),N=[];if(null!=L&&0<L.length)for(var O=0;O<L.length;O++)if("mxgraph"==L[O].getAttribute("class")){N.push(L[O]);break}0<N.length&&(L=N[0].getAttribute("data-mxgraph"),null!=L?(N=JSON.parse(L),null!=N&&null!=N.xml&&(m=mxUtils.parseXml(N.xml),m=m.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(L=mxUtils.getTextContent(N[0]),L=Graph.decompress(L,null,I),0<L.length&&(m=mxUtils.parseXml(L),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(L=m.getAttribute("content"),null!=L&&"<"!=L.charAt(0)&&"%"!=L.charAt(0)&&(L=unescape(window.atob?atob(L):Base64.decode(cont,L))),null!=L&&"%"==L.charAt(0)&&(L=decodeURIComponent(L)),null!=L&&0<L.length)m=mxUtils.parseXml(L).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||z||(N=null,"diagram"==m.nodeName?N=m:"mxfile"==m.nodeName&&(L=m.getElementsByTagName("diagram"),0<L.length&&(N=L[Math.max(0,Math.min(L.length-1,urlParams.page||0))])),null!=N&&(m=Editor.parseDiagramNode(N,I)));null==m||"mxGraphModel"==m.nodeName||z&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,z,I){Editor.validateDiagramNode(m);var L=mxUtils.trim(mxUtils.getTextContent(m)),N=null;0<L.length?(z=Graph.decompress(L,null,z),null!=z&&0<z.length&&(N=mxUtils.parseXml(z).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(N=m[0],I&&(N=Editor.parseDiagramNode(N,z,!1)),z=mxUtils.createXmlDocument(),z.appendChild(z.importNode(N,!0)),N=z.documentElement));return N};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var z=mxUtils.getNodeValue(m),I=null;0<z.length?I=Graph.decompress(z):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(I=mxUtils.getXml(m[0])));return I};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var z=new mxCodec,I=new mxGraphModel;m.appendChild(z.encode(I))}return m};Editor.extractGraphModelFromPdf=function(m){var z=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var I=m.indexOf("EmbeddedFile");if(-1<I){var L=m.indexOf("stream",I)+9;if(0<m.substring(I,L).indexOf("application#2Fvnd.jgraph.mxfile")){var N=m.indexOf("endstream",L-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"})}}for(I=m.indexOf("/ObjStm");0<I;){L=-m.indexOf("stream",I)+9;N=m.indexOf("endstream",L-1);L=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"});N=L.indexOf("/Subject <");if(0<N){I=L.substring(N+14,L.indexOf(">",N));if(null!=I){z=I;I=[];for(L=0;L<z.length;L+=2)N=z.substr(L,2),"00"!=N&&I.push(String.fromCharCode(parseInt(N,16)));z=I.join("")}break}I=m.indexOf("/ObjStm",I+1)}}if(null==z&&"%PDF-1.4"==m.substring(0,8)){I="";N=L=0;for(var P=[],S=null;N<m.length;){var U=m.charCodeAt(N);N+=1;10!=U&&(I+=String.fromCharCode(U));-U=="/Subject (%3Cmxfile".charCodeAt(L)?L++:L=0;if(19==L){var W=m.indexOf("%3C%2Fmxfile%3E",N)+15;N-=9;if(W>N){z=m.substring(N,W);break}}10==U&&("endobj"==I?S=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(S=[],P[I.split(" ")[0]]=S):null!=S&&S.push(I),I="")}}null==z&&null!=P&&(z=Editor.extractGraphModelFromXref(P));null!=z&&(z=decodeURIComponent(z.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return z};Editor.extractGraphModelFromXref=function(m){var z=m.trailer,I=null;null!=+m.indexOf("stream",I)+9;N=m.indexOf("endstream",L-1);L=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"});N=L.indexOf("/Subject <");if(0<N){I=L.substring(N+14,L.indexOf(">",N));if(null!=I){z=I;I=[];for(L=0;L<z.length;L+=2)N=z.substr(L,2),"00"!=N&&I.push(String.fromCharCode(parseInt(N,16)));z=I.join("")}break}I=m.indexOf("/ObjStm",I+1)}}if(null==z&&"%PDF-1.4"==m.substring(0,8)){I="";N=L=0;for(var O=[],S=null;N<m.length;){var U=m.charCodeAt(N);N+=1;10!=U&&(I+=String.fromCharCode(U));+U=="/Subject (%3Cmxfile".charCodeAt(L)?L++:L=0;if(19==L){var W=m.indexOf("%3C%2Fmxfile%3E",N)+15;N-=9;if(W>N){z=m.substring(N,W);break}}10==U&&("endobj"==I?S=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(S=[],O[I.split(" ")[0]]=S):null!=S&&S.push(I),I="")}}null==z&&null!=O&&(z=Editor.extractGraphModelFromXref(O));null!=z&&(z=decodeURIComponent(z.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return z};Editor.extractGraphModelFromXref=function(m){var z=m.trailer,I=null;null!=z&&(z=/.* \/Info (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(z=m[z[1]],null!=z&&(z=/.* \/Subject (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(m=m[z[1]],null!=m&&(m=m.join("\n"),I=m.substring(1,m.length-1))))));return I};Editor.extractParserError=function(m,z){var I=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(I=z||mxResources.get("invalidChars"),z=m[0].getElementsByTagName("div"),0<z.length&&(I=mxUtils.getTextContent(z[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(m,z){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=z))};Editor.mermaidToDrawio=function(m,z,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,z,I)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");null!=m.defaultFonts&&(Menus.prototype.defaultFonts=m.defaultFonts);null!=m.presetColors&&(ColorDialog.prototype.presetColors=m.presetColors);null!=m.defaultColors&&(ColorDialog.prototype.defaultColors=m.defaultColors);null!=m.colorNames&&(ColorDialog.prototype.colorNames=m.colorNames);null!=m.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.defaultColorSchemes);null!=m.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=m.defaultEdgeLength);null!=m.selectParentLayer&&(Graph.selectParentLayer=m.selectParentLayer);null!=m.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=m.autosaveDelay);null!=m.templateFile&&(EditorUi.templateFile=@@ -12834,38 +12834,38 @@ Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.ma!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){L=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var L=null;Editor.doMathJaxRender=function(S){try{null==L?(MathJax.typesetClear([S]),MathJax.typeset([S]),I()):L!=S&&Editor.mathJaxQueue.push(S)}catch(U){MathJax.typesetClear([S]),null!=U.retry?(L=S,U.retry.then(function(){MathJax.typesetPromise([S]).then(I)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+W.toString());I()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,-arguments);var S=mxUtils.bind(this,function(U,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};z=document.getElementsByTagName("script");if(null!=z&&0<z.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",m);z[0].parentNode.appendChild(P)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z=-"",I=[""],L=0,N=!0,P;m=$jscomp.makeIterator(m);for(P=m.next();!P.done;P=m.next())P=P.value,'"'===P?(N&&P===z&&(I[L]+=P),N=!N):","===P&&N?P=I[++L]="":I[L]+=P,z=P;return I}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var z=EditorUi.isVisioFilename(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var I="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)++arguments);var S=mxUtils.bind(this,function(U,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};z=document.getElementsByTagName("script");if(null!=z&&0<z.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",m);z[0].parentNode.appendChild(O)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z=+"",I=[""],L=0,N=!0,O;m=$jscomp.makeIterator(m);for(O=m.next();!O.done;O=m.next())O=O.value,'"'===O?(N&&O===z&&(I[L]+=O),N=!N):","===O&&N?O=I[++L]="":I[L]+=O,z=O;return I}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var z=EditorUi.isVisioFilename(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var I="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+I+(z?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.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(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var z=m.convert,I=this;m.convert=function(L){null!=L&&navigator.onLine&&("http://"!=L.substring(0,7)&&"https://"!=L.substring(0,8)||L.substring(0,m.baseUrl.length)==m.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(L)?"chrome-extension://"!=L.substring(0,19)&&(L=z.apply(this,arguments)):L=PROXY_URL+"?url="+encodeURIComponent(L));return L};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+-btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,z,I,L,N){try{var P=!0,S=window.setTimeout(mxUtils.bind(this,function(){P=!1;z(m)}),this.timeout),U=mxUtils.bind(this,function(){null!=L?this.convertImageToDataUri(m,z,I,L,!0):z(m)});if(/(\.svg)$/i.test(m)&&!N)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(S);P&&(200>X.getStatus()||299<X.getStatus()?U():z(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);-P&&U()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(P)try{L=null!=L&&N?L:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(L,L);X.height=W.height*L;X.width=W.width*L;Z.drawImage(W,0,0);z(X.toDataURL())}catch(Y){z(m)}};W.onerror=function(){window.clearTimeout(S);P&&(null!=I?I():z(m))};W.src=m}}catch(X){null!=I?I():z(m)}};Editor.prototype.convertImages=function(m,z,I,L){function N(){0<P.length?P.shift()():-z(m)}null==L&&(L=this.createImageUrlConverter());var P=[],S=I||{};I=mxUtils.bind(this,function(U,W){U=m.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(Z){P.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=L.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));N()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),N())}else null!=Y&&Z.setAttribute(W,-Y),N()}}catch(ea){N()}}))})(U[X])});I("image","xlink:href");I("img","src");N()};Editor.base64Encode=function(m){for(var z="",I=0,L=m.length,N,P,S;I<L;){N=m.charCodeAt(I++)&255;if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);z+="==";break}P=m.charCodeAt(I++);if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&-3)<<4|(P&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);z+="=";break}S=m.charCodeAt(I++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(P&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};-Editor.prototype.loadUrl=function(m,z,I,L,N,P,S,U){try{var W=!S&&(L||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=z){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();-Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}P=null!=P?P:"data:image/png;base64,";Y=P+Editor.base64Encode(Y)}z(Y)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?I({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):I({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){N&&null!=I&&I({code:App.ERROR_TIMEOUT,+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,z,I,L,N){try{var O=!0,S=window.setTimeout(mxUtils.bind(this,function(){O=!1;z(m)}),this.timeout),U=mxUtils.bind(this,function(){null!=L?this.convertImageToDataUri(m,z,I,L,!0):z(m)});if(/(\.svg)$/i.test(m)&&!N)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(S);O&&(200>X.getStatus()||299<X.getStatus()?U():z(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);+O&&U()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(O)try{L=null!=L&&N?L:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(L,L);X.height=W.height*L;X.width=W.width*L;Z.drawImage(W,0,0);z(X.toDataURL())}catch(Y){z(m)}};W.onerror=function(){window.clearTimeout(S);O&&(null!=I?I():z(m))};W.src=m}}catch(X){null!=I?I():z(m)}};Editor.prototype.convertImages=function(m,z,I,L){function N(){0<O.length?O.shift()():+z(m)}null==L&&(L=this.createImageUrlConverter());var O=[],S=I||{};I=mxUtils.bind(this,function(U,W){U=m.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(Z){O.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=L.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));N()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),N())}else null!=Y&&Z.setAttribute(W,+Y),N()}}catch(ea){N()}}))})(U[X])});I("image","xlink:href");I("img","src");N()};Editor.base64Encode=function(m){for(var z="",I=0,L=m.length,N,O,S;I<L;){N=m.charCodeAt(I++)&255;if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);z+="==";break}O=m.charCodeAt(I++);if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&+3)<<4|(O&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);z+="=";break}S=m.charCodeAt(I++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(O&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};+Editor.prototype.loadUrl=function(m,z,I,L,N,O,S,U){try{var W=!S&&(L||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=z){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();+Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}O=null!=O?O:"data:image/png;base64,";Y=O+Editor.base64Encode(Y)}z(Y)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?I({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):I({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){N&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:X})},U)});X()}catch(Z){null!=I&&I(Z)}};Editor.prototype.getErrorMessage=function(m){var z=mxResources.get("error")+" "+m.getStatus();try{var I=m.getText(),L=JSON.parse(I);null!=L&&null!=L.error&&null!=L.error.message&&(z=L.error.message+" ("+z+")")}catch(N){}return z};Editor.prototype.absoluteCssFonts=function(m){var z=null;if(null!=m){var I=m.split("url(");if(0<I.length){z=[I[0]];m=window.location.pathname;var L=null!=m?m.lastIndexOf("/"):-1;0<=L&&(m=m.substring(0,L+1));L=document.getElementsByTagName("base");-var N=null;null!=L&&0<L.length&&(N=L[0].getAttribute("href"));for(var P=1;P<I.length;P++)if(L=I[P].indexOf(")"),0<L){var S=Editor.trimCssUrl(I[P].substring(0,L));this.graph.isRelativeUrl(S)&&(S=null!=N?N+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":m)+S);z.push('url("'+S+'"'+I[P].substring(L))}else z.push(I[P])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,I){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+-encodeURIComponent(z));I(m,z)};Editor.prototype.embedCssFonts=function(m,z){var I=m.split("url("),L=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==L){for(var W=[I[0]],X=1;X<I.length;X++){var Z=I[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(I[X].substring(0,Z))]);W.push('"'+I[X].substring(Z))}z(W.join(""))}});if(0<I.length){for(m=1;m<I.length;m++){var P=I[m].indexOf(")"),S=null,U=I[m].indexOf("format(",P);0<U&&(S=Editor.trimCssUrl(I[m].substring(U++var N=null;null!=L&&0<L.length&&(N=L[0].getAttribute("href"));for(var O=1;O<I.length;O++)if(L=I[O].indexOf(")"),0<L){var S=Editor.trimCssUrl(I[O].substring(0,L));this.graph.isRelativeUrl(S)&&(S=null!=N?N+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":m)+S);z.push('url("'+S+'"'+I[O].substring(L))}else z.push(I[O])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,I){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="++encodeURIComponent(z));I(m,z)};Editor.prototype.embedCssFonts=function(m,z){var I=m.split("url("),L=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==L){for(var W=[I[0]],X=1;X<I.length;X++){var Z=I[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(I[X].substring(0,Z))]);W.push('"'+I[X].substring(Z))}z(W.join(""))}});if(0<I.length){for(m=1;m<I.length;m++){var O=I[m].indexOf(")"),S=null,U=I[m].indexOf("format(",O);0<U&&(S=Editor.trimCssUrl(I[m].substring(U+7,I[m].indexOf(")",U))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;L++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";-else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;L--;N()}),mxUtils.bind(this,function(ba){L--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[m].substring(0,P)),S)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=-z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var I=[],L=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==L&&this.embedCssFonts(I.join(""),m)}),P=0;P<z.length;P++)mxUtils.bind(this,function(S,U){Graph.isCssFontUrl(U)?-null==this.cachedGoogleFonts[U]?(L++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(W){this.cachedGoogleFonts[U]=W;I.push(W+"\n");L--;N()}),mxUtils.bind(this,function(W){L--;I.push("@import url("+U+");\n");N()}))):I.push(this.cachedGoogleFonts[U]+"\n"):I.push('@font-face {font-family: "'+S+'";src: url("'+U+'")}\n')})(z[P].name,z[P].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),-I=0;I<z.length;I++){var L=mxUtils.getTextContent(z[I]);0>L.indexOf("mxPageSelector")&&0<L.indexOf("MathJax")&&m[0].appendChild(z[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var I=mxUtils.getSvgDefs(m),L=z.split("\n");z=[];for(var N=[],P=0;P<L.length;P++)"@import"==L[P].substring(0,7)?z.push(L[P]):N.push(L[P]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");-m.setAttribute("type","text/css");0<z.length&&(mxUtils.setTextContent(m,z.join("\n")),I.appendChild(m));0<N.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,N.join("\n")),I.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,z,I){var L=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(L/m,L/z))};Editor.prototype.exportToCanvas=function(m,z,I,L,N,P,S,U,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{P=-null!=P?P:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=L);null==ia&&0==W&&(ia="dark"==fa&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,function(pa){try{var oa=new Image;oa.onload=mxUtils.bind(this,function(){try{var xa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(oa,0,0);m(qa,pa)},-0):(ja.drawImage(oa,0,0),m(qa,pa))},qa=document.createElement("canvas"),ua=parseInt(pa.getAttribute("width")),ya=parseInt(pa.getAttribute("height"));U=null!=U?U:1;null!=z&&(U=P?Math.min(1,Math.min(3*z/(4*ya),z/ua)):z/ua);U=this.getMaxCanvasScale(ua,ya,U);ua=Math.ceil(U*ua);ya=Math.ceil(U*ya);qa.setAttribute("width",ua);qa.setAttribute("height",ya);var ja=qa.getContext("2d");null!=ia&&(ja.beginPath(),ja.rect(0,0,ua,ya),ja.fillStyle=ia,ja.fill());1!=U&&ja.scale(U,U);if(ca){var ma=Y.view,ka=ma.scale;+else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;L--;N()}),mxUtils.bind(this,function(ba){L--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[m].substring(0,O)),S)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=+z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var I=[],L=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==L&&this.embedCssFonts(I.join(""),m)}),O=0;O<z.length;O++)mxUtils.bind(this,function(S,U){Graph.isCssFontUrl(U)?+null==this.cachedGoogleFonts[U]?(L++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(W){this.cachedGoogleFonts[U]=W;I.push(W+"\n");L--;N()}),mxUtils.bind(this,function(W){L--;I.push("@import url("+U+");\n");N()}))):I.push(this.cachedGoogleFonts[U]+"\n"):I.push('@font-face {font-family: "'+S+'";src: url("'+U+'")}\n')})(z[O].name,z[O].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),+I=0;I<z.length;I++){var L=mxUtils.getTextContent(z[I]);0>L.indexOf("mxPageSelector")&&0<L.indexOf("MathJax")&&m[0].appendChild(z[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var I=mxUtils.getSvgDefs(m),L=z.split("\n");z=[];for(var N=[],O=0;O<L.length;O++)"@import"==L[O].substring(0,7)?z.push(L[O]):N.push(L[O]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");+m.setAttribute("type","text/css");0<z.length&&(mxUtils.setTextContent(m,z.join("\n")),I.appendChild(m));0<N.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,N.join("\n")),I.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,z,I){var L=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(L/m,L/z))};Editor.prototype.exportToCanvas=function(m,z,I,L,N,O,S,U,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{O=+null!=O?O:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=L);null==ia&&0==W&&(ia="dark"==fa&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,function(pa){try{var oa=new Image;oa.onload=mxUtils.bind(this,function(){try{var xa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(oa,0,0);m(qa,pa)},+0):(ja.drawImage(oa,0,0),m(qa,pa))},qa=document.createElement("canvas"),ua=parseInt(pa.getAttribute("width")),ya=parseInt(pa.getAttribute("height"));U=null!=U?U:1;null!=z&&(U=O?Math.min(1,Math.min(3*z/(4*ya),z/ua)):z/ua);U=this.getMaxCanvasScale(ua,ya,U);ua=Math.ceil(U*ua);ya=Math.ceil(U*ya);qa.setAttribute("width",ua);qa.setAttribute("height",ya);var ja=qa.getContext("2d");null!=ia&&(ja.beginPath(),ja.rect(0,0,ua,ya),ja.fillStyle=ia,ja.fill());1!=U&&ja.scale(U,U);if(ca){var ma=Y.view,ka=ma.scale;ma.scale=1;var Ba=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=ka;Ba="data:image/svg+xml;base64,"+Ba;var sa=Y.gridSize*ma.gridSteps*U,Ea=Y.getGraphBounds(),wa=ma.translate.x*ka,Ca=ma.translate.y*ka,Da=wa+(Ea.x-wa)/ka-ba,Ka=Ca+(Ea.y-Ca)/ka-ba,Aa=new Image;Aa.onload=function(){try{for(var Fa=-Math.round(sa-mxUtils.mod((wa-Da)*U,sa)),Ja=-Math.round(sa-mxUtils.mod((Ca-Ka)*U,sa));Fa<ua;Fa+=sa)for(var Ra=Ja;Ra<ya;Ra+=sa)ja.drawImage(Aa,Fa/U,Ra/U);xa()}catch(Sa){null!=N&&N(Sa)}};Aa.onerror=function(Fa){null!=N&&N(Fa)};Aa.src=Ba}else xa()}catch(Fa){null!=N&&N(Fa)}});oa.onerror=function(xa){null!=N&&N(xa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ha=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),oa.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(xa){null!=N&&N(xa)}});this.embedExtFonts(mxUtils.bind(this,function(xa){try{null!=xa&&this.addFontCss(pa,xa),this.loadFonts(ha)}catch(qa){null!=-N&&N(qa)}}))}catch(xa){null!=N&&N(xa)}}),I,Z)}catch(pa){null!=N&&N(pa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var n=l,p=0;8>p;p++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[l]=n;Editor.updateCRC=function(m,z,I,L){for(var N=0;N<L;N++)m=Editor.crcTable[(m^z.charCodeAt(I+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,I=0;I<m.length;I++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(I))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,I,L,N){function P(Z,Y){var ba=-W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=P(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function U(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var W=0;if(P(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(P(m,4),"IHDR"!=P(m,4))null!=N&&N();else{P(m,17);N=m.substring(0,W);do{var X=S(m);if("IDAT"==P(m,4)){N=m.substring(0,-W-8);"pHYs"==z&&"dpi"==I?(I=Math.round(L/.0254),I=U(I)+U(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+L;L=4294967295;L=Editor.updateCRC(L,z,0,4);L=Editor.updateCRC(L,I,0,I.length);N+=U(I.length)+z+I+U(L^4294967295);N+=m.substring(W-8,m.length);break}N+=m.substring(W-8,W-4+X);P(m,X);P(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";+N&&N(qa)}}))}catch(xa){null!=N&&N(xa)}}),I,Z)}catch(pa){null!=N&&N(pa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var n=l,p=0;8>p;p++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[l]=n;Editor.updateCRC=function(m,z,I,L){for(var N=0;N<L;N++)m=Editor.crcTable[(m^z.charCodeAt(I+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,I=0;I<m.length;I++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(I))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,I,L,N){function O(Z,Y){var ba=+W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=O(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function U(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var W=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(O(m,4),"IHDR"!=O(m,4))null!=N&&N();else{O(m,17);N=m.substring(0,W);do{var X=S(m);if("IDAT"==O(m,4)){N=m.substring(0,+W-8);"pHYs"==z&&"dpi"==I?(I=Math.round(L/.0254),I=U(I)+U(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+L;L=4294967295;L=Editor.updateCRC(L,z,0,4);L=Editor.updateCRC(L,I,0,I.length);N+=U(I.length)+z+I+U(L^4294967295);N+=m.substring(W-8,m.length);break}N+=m.substring(W-8,W-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var u=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){u.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()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,z){var I=null;null!=m.editor.graph.getModel().getParent(z)?I=z.getId():null!=m.currentPage&&(I=m.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var E=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?E.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var K=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=K.apply(this,arguments);var z=this.editorUi,I=z.editor.graph;if(I.isEnabled()){var L=z.getCurrentFile();null!=L&&L.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return z.editor.autosave},function(S){z.editor.setAutosave(S);z.editor.autosave&&L.isModified()&&L.fileChanged()},{install:function(S){this.listener=function(){S(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(S){z.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(I.mathEnabled)};z.addListener("mathEnabledChanged",-this.listener)},destroy:function(){z.removeListener(this.listener)}});m.appendChild(N);if(!z.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var P=z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");P.style.position="absolute";P.style.left="85%";N.appendChild(P)}}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",+this.listener)},destroy:function(){z.removeListener(this.listener)}});m.appendChild(N);if(!z.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var O=z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");O.style.position="absolute";O.style.left="85%";N.appendChild(O)}}return m};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,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize",@@ -12889,31 +12889,31 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispNamestroke:"#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(m,z,I,L){if(null!=z){var N=mxUtils.bind(this,function(S){if(null!=S)if(I)for(var U=0;U<S.length;U++){if("function"!==typeof S[U].isVisible||S[U].isVisible(L,this))z[S[U].name]=S[U]}else for(var W in z){var X=!1;for(U=0;U<S.length;U++)if(S[U].name==W&&S[U].type==z[W].type){X=!0;break}X||delete z[W]}}),P=this.editorUi.editor.graph.view.getState(m);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],-P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),N(P.shape.customProperties));m=m.getAttribute("customProperties");if(null!=m)try{N(JSON.parse(m))}catch(S){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&+function(m,z,I,L){if(null!=z){var N=mxUtils.bind(this,function(S){if(null!=S)if(I)for(var U=0;U<S.length;U++){if("function"!==typeof S[U].isVisible||S[U].isVisible(L,this))z[S[U].name]=S[U]}else for(var W in z){var X=!1;for(U=0;U<S.length;U++)if(S[U].name==W&&S[U].type==z[W].type){X=!0;break}X||delete z[W]}}),O=this.editorUi.editor.graph.view.getState(m);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],+O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),N(O.shape.customProperties));m=m.getAttribute("customProperties");if(null!=m)try{N(JSON.parse(m))}catch(S){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));d.apply(this,arguments);if(Editor.enableCustomProperties){for(var z={},I=m.vertices,L=m.edges,N=0;N<I.length;N++)this.findCommonProperties(I[N],z,0==N,m);for(N=0;N<L.length;N++)this.findCommonProperties(L[N],z,0==I.length&&0==N,m);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(z).length&&this.container.appendChild(this.addProperties(this.createPanel(),z,m))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){var z=this.editorUi.getSelectionState();1==z.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=z.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);g.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,z,I,L){function N(ja,ma,ka,Ba,sa){if(null!=ka.valueChanged)ka.valueChanged(ma,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ea=[];if(null!=ka.index){for(var wa=[],Ca=ka.parentRow.nextSibling;Ca&&Ca.getAttribute("data-pName")==ja;)wa.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ka.index<wa.length?null!=Ba?wa.splice(Ba,1):wa[ka.index]=ma:wa.push(ma);null!=ka.size&&wa.length>ka.size&&(wa=wa.slice(0,ka.size));ma=wa.join(",");null!=ka.countProperty&&(ba.setCellStyles(ka.countProperty,wa.length,ba.getSelectionCells()),sa.push(ka.countProperty),Ea.push(wa.length))}ba.setCellStyles(ja,ma,ba.getSelectionCells());sa.push(ja);Ea.push(ma);if(null!=ka.dependentProps)for(ja=0;ja<ka.dependentProps.length;ja++){var Da=ka.dependentPropsDefVal[ja],Ka=ka.dependentPropsVals[ja];if(Ka.length>ma)Ka=Ka.slice(0,ma);else for(var Aa=Ka.length;Aa<ma;Aa++)Ka.push(Da);Ka=Ka.join(",");ba.setCellStyles(ka.dependentProps[ja],Ka,ba.getSelectionCells());sa.push(ka.dependentProps[ja]);Ea.push(Ka)}if("function"==typeof ka.onChange)ka.onChange(ba,ma);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ea,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}-function P(ja,ma,ka){var Ba=mxUtils.getOffset(m,!0),sa=mxUtils.getOffset(ja,!0);ma.style.position="absolute";ma.style.left=sa.x-Ba.x+"px";ma.style.top=sa.y-Ba.y+"px";ma.style.width=ja.offsetWidth+"px";ma.style.height=ja.offsetHeight-(ka?4:0)+"px";ma.style.zIndex=5}function S(ja,ma,ka){function Ba(Ea){if(null==Ea||Ea==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ea)sa.style.background="";else{var wa=mxUtils.getLightDarkColor(Ea);mxUtils.isLightDarkColor(Ea)&&+function O(ja,ma,ka){var Ba=mxUtils.getOffset(m,!0),sa=mxUtils.getOffset(ja,!0);ma.style.position="absolute";ma.style.left=sa.x-Ba.x+"px";ma.style.top=sa.y-Ba.y+"px";ma.style.width=ja.offsetWidth+"px";ma.style.height=ja.offsetHeight-(ka?4:0)+"px";ma.style.zIndex=5}function S(ja,ma,ka){function Ba(Ea){if(null==Ea||Ea==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ea)sa.style.background="";else{var wa=mxUtils.getLightDarkColor(Ea);mxUtils.isLightDarkColor(Ea)&&wa.light!=wa.dark?sa.style.background="linear-gradient(to right bottom, "+wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(wa).cssText+" 50.3%)":sa.style.background=Ea}}var sa=document.createElement("div");sa.style.width="32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Ba(ma);btn=mxUtils.button("",mxUtils.bind(Y,function(Ea){this.editorUi.pickColor(ma,function(wa){N(ja,wa,ka);Ba(wa)});mxEvent.consume(Ea)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function U(ja,ma,ka,Ba,sa,Ea,wa){null!=ma&&(ma=ma.split(","),ea.push({name:ja,values:ma,type:ka,defVal:Ba,countProperty:sa,parentRow:Ea,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ca){for(var Da=Ea,Ka=0;null!=Da.nextSibling;)if(Da.nextSibling.getAttribute("data-pName")==ja)Da=Da.nextSibling,Ka++;else break;var Aa={type:ka,parentRow:Ea,index:Ka,isDeletable:!0,defVal:Ba,countProperty:sa};Ka=Z(ja,"",Aa,0==Ka%2,wa);N(ja,Ba,Aa);Da.parentNode.insertBefore(Ka,Da.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function W(ja,ma,ka,Ba,sa,Ea,wa){if(0<sa){var Ca=Array(sa);ma=null!=ma?ma.split(","):[];for(var Da=0;Da<sa;Da++)Ca[Da]=null!=ma[Da]?ma[Da]:null!=Ba?Ba:"";ea.push({name:ja,values:Ca,type:ka,defVal:Ba,parentRow:Ea,flipBkg:wa,size:sa})}return document.createElement("div")}function X(ja,ma,ka){var Ba=document.createElement("input");Ba.type="checkbox";Ba.checked="1"==ma;mxEvent.addListener(Ba,"change",function(){N(ja,Ba.checked?"1":"0",ka)});return Ba}function Z(ja,ma,ka,Ba,sa){var Ea=ka.dispName,wa=ka.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(sa?"Dark":"")+(Ba?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ja);Ca.setAttribute("data-pValue",ma);Ba=!1;null!=ka.index&&(Ca.setAttribute("data-index",ka.index),Ea=(null!=Ea?Ea:"")+"["+ka.index+"]",Ba=!0);var Da=document.createElement("td");Da.className="gePropRowCell";Ea=mxResources.get(Ea,null,Ea);mxUtils.write(Da,Ea);Da.setAttribute("title",Ea);Ba&&(Da.style.textAlign="right");Ca.appendChild(Da);Da=document.createElement("td");Da.className="gePropRowCell";Da.setAttribute("title",null!=ma?ma:mxResources.get("none"));if("color"==wa)Da.appendChild(S(ja,ma,ka));else if("bool"==wa||"boolean"==wa)Da.appendChild(X(ja,ma,ka));else if("enum"==wa){var Ka=ka.enumList;for(sa=0;sa<Ka.length;sa++)if(Ea=Ka[sa],-Ea.val==ma){mxUtils.write(Da,mxResources.get(Ea.dispName,null,Ea.dispName));break}mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){var Aa=document.createElement("select"),Fa=null;P(Da,Aa);for(var Ja=0;Ja<Ka.length;Ja++){var Ra=Ka[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));Aa.appendChild(Sa);null==Ra.val&&(Sa.value="null",Fa=Sa)}Aa.value=null==ma&&null!=Fa?"null":ma;m.appendChild(Aa);mxEvent.addListener(Aa,+Ea.val==ma){mxUtils.write(Da,mxResources.get(Ea.dispName,null,Ea.dispName));break}mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){var Aa=document.createElement("select"),Fa=null;O(Da,Aa);for(var Ja=0;Ja<Ka.length;Ja++){var Ra=Ka[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));Aa.appendChild(Sa);null==Ra.val&&(Sa.value="null",Fa=Sa)}Aa.value=null==ma&&null!=Fa?"null":ma;m.appendChild(Aa);mxEvent.addListener(Aa,"change",function(){var ab=mxUtils.htmlEntities(Aa.value);if(Aa[Aa.selectedIndex]==Fa||"null"==ab.value)ab=null;N(ja,ab,ka)});Aa.focus();mxEvent.addListener(Aa,"blur",function(){m.removeChild(Aa)})}))}else"dynamicArr"==wa?Da.appendChild(U(ja,ma,ka.subType,ka.subDefVal,ka.countProperty,Ca,sa)):"staticArr"==wa?Da.appendChild(W(ja,ma,ka.subType,ka.subDefVal,ka.size,Ca,sa)):"readOnly"==wa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ma,sa.style.borderWidth="0px","id"==ja?(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ca.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",ma),Ca.firstChild.appendChild(sa)):(sa.style.width="96px",Da.appendChild(sa))):(Da.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ma)),mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){function Aa(){var Ja=Fa.value;Ja=0==Ja.length&&"string"!=wa&&"numbers"!=wa?0:Ja;ka.allowAuto&&-(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",wa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ka.min&&Ja<ka.min?Ja=ka.min:null!=ka.max&&Ja>ka.max&&(Ja=ka.max);var Ra=null;try{Ra="numbers"==wa?Ja.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==wa?parseInt(Ja):Ja)+"")}catch(Sa){}N(ja,Ra,ka,null,Fa)}var Fa=document.createElement("input");P(Da,Fa,!0);Fa.value=decodeURIComponent(ma);Fa.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(Fa.type="number",+(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",wa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ka.min&&Ja<ka.min?Ja=ka.min:null!=ka.max&&Ja>ka.max&&(Ja=ka.max);var Ra=null;try{Ra="numbers"==wa?Ja.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==wa?parseInt(Ja):Ja)+"")}catch(Sa){}N(ja,Ra,ka,null,Fa)}var Fa=document.createElement("input");O(Da,Fa,!0);Fa.value=decodeURIComponent(ma);Fa.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(Fa.type="number",Fa.step="int"==wa?"1":"any",null!=ka.min&&(Fa.min=parseFloat(ka.min)),null!=ka.max&&(Fa.max=parseFloat(ka.max)));m.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ja){13==Ja.keyCode&&Aa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Aa()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(Aa){N(ja,"",ka,ka.index);mxEvent.consume(Aa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Da.appendChild(sa));Ca.appendChild(Da);return Ca}var Y=this,ba=this.editorUi.editor.graph,ea=[];m.style.position="relative";m.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ma="none";for(var ka=m.childNodes.length-1;0<=ka;ka--)try{var Ba=m.childNodes[ka],sa=Ba.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||m.removeChild(Ba)}catch(Ea){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ma="";for(ka=0;ka<ja.length;ka++)ja[ka].style.display=ma};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ia=document.createElement("th");ia.className="gePropHeaderCell";ia.style.paddingLeft="4px";mxUtils.write(ia,mxResources.get("value"));fa.appendChild(ia);ca.appendChild(fa);var pa=ia=!1;fa=null;1==I.vertices.length&&0==I.edges.length?fa=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(fa=I.edges[0].id);null==fa||L||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),{dispName:"id",type:"readOnly"},!0,!1));for(var oa in z)if(L=z[oa],"function"!=typeof L.isVisible||L.isVisible(I,this)){var ha=null!=L.getValue?L.getValue():null!=I.style[oa]?mxUtils.htmlEntities(I.style[oa]+""):null!=L.getDefaultValue?L.getDefaultValue(I,this):L.defVal;if("separator"==L.type)pa=!pa;else{if("staticArr"==L.type)L.size=parseInt(I.style[L.sizeProperty]||z[L.sizeProperty].defVal)||0;else if(null!=L.dependentProps){var xa=L.dependentProps,qa=[],ua=[];for(fa=0;fa<xa.length;fa++){var ya=I.style[xa[fa]];ua.push(z[xa[fa]].subDefVal);qa.push(null!=ya?ya.split(","):[])}L.dependentPropsDefVal=ua;L.dependentPropsVals=qa}ca.appendChild(Z(oa,ha,L,ia,pa));ia=!ia}}for(fa=0;fa<ea.length;fa++)for(L=ea[fa],z=L.parentRow,I=0;I<L.values.length;I++)oa=Z(L.name,L.values[I],{type:L.type,parentRow:L.parentRow,isDeletable:L.isDeletable,index:I,defVal:L.defVal,countProperty:L.countProperty,size:L.size},0==I%2,L.flipBkg),z.parentNode.insertBefore(oa,z.nextSibling),z=oa;m.appendChild(ca);da();return m};-StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var z=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},I=this.editorUi,L=I.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";N.style.paddingRight="20px";m.style.paddingLeft="16px";m.style.paddingBottom="6px";m.style.position="relative";m.appendChild(N);var P=document.createElement("div");-P.style.whiteSpace="nowrap";P.style.position="relative";P.style.textAlign="center";P.style.width="210px";for(var S=[],U=0;U<this.defaultColorSchemes.length;U++){var W=document.createElement("div");W.style.display="inline-block";W.style.width="6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",-mxUtils.bind(this,function(){X(ea)}))})(U);S.push(W);P.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(L.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=+StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var z=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},I=this.editorUi,L=I.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";N.style.paddingRight="20px";m.style.paddingLeft="16px";m.style.paddingBottom="6px";m.style.position="relative";m.appendChild(N);var O=document.createElement("div");+O.style.whiteSpace="nowrap";O.style.position="relative";O.style.textAlign="center";O.style.width="210px";for(var S=[],U=0;U<this.defaultColorSchemes.length;U++){var W=document.createElement("div");W.style.display="inline-block";W.style.width="6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",+mxUtils.bind(this,function(){X(ea)}))})(U);S.push(W);O.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(L.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";L.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ia=mxUtils.button("",mxUtils.bind(this,function(ha){L.getModel().beginUpdate();try{for(var xa=I.getSelectionState().cells,qa=0;qa<xa.length;qa++){var ua=L.getModel().getStyle(xa[qa]);null!=da?(mxEvent.isShiftDown(ha)||(ua=""==da.fill||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,da.fill),ua=""==da.gradient||null==da.gradient?mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ha)||mxClient.IS_MAC&&mxEvent.isMetaDown(ha)||!L.getModel().isVertex(xa[qa])||(ua=""==da.font||null==da.font?mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ha)||(ua=""==da.stroke||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,da.stroke))):(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null),L.getModel().isVertex(xa[qa])&&@@ -12923,21 +12923,21 @@ qa=0;qa<xa.length;qa++){var ua=L.getModel().getStyle(xa[qa]);null!=da?(mxEvent.ioa;ia.style.borderRadius="0";N.appendChild(ia);null!=da&&null!=da.gradient&&(pa=ia.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",N.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ia.click()}))});N.innerText="";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(N),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+U+"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(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+U+"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&&(m.appendChild(Y),m.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));z(Y);z(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(P)}return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+1<this.defaultColorSchemes.length&&(m.appendChild(Y),m.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));z(Y);z(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(O)}return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||m.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.rewriteGoogleFontUrl=function(m){null!=m&&m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(m=Editor.GOOGLE_FONTS_CSS2+m.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return m};Graph.createFontElement=function(m,z){var I=Graph.fontMapping[z];null==I&&Graph.isCssFontUrl(z)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",Graph.rewriteGoogleFontUrl(z))):(null==I&&(I='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+z+'");\n}'),m=document.createElement("style"),mxUtils.write(m,I));return m};Graph.addRecentCustomFont=function(m,z){};Graph.addFont=function(m,z,I){if(null!=m&&0<m.length&&null!=z&&0<z.length){var L=m.toLowerCase();if("helvetica"!=L&&"arial"!=m&&"sans-serif"!=L){var N=Graph.customFontElements[L];null!=N&&N.url!=z&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=z,"http:"==z.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(z)),N={name:m,url:z,elt:Graph.createFontElement(m,N)},Graph.customFontElements[L]=N,z=document.getElementsByTagName("head")[0],null!=I&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=I,N.elt.onerror=I):I()),null!=z&&z.appendChild(N.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();return m};Graph.getFontUrl=function(m,z){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(z=m.url);return z};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var z=0;z<m.length;z++){var I=m[z].getAttribute("data-font-src");if(null!=I){var L="FONT"==m[z].nodeName?m[z].getAttribute("face"):m[z].style.fontFamily;null!=L&&Graph.addFont(L,I)}}};Graph.processFontStyle=function(m){if(null!=m){var z=mxUtils.getValue(m,"fontSource",null);if(null!=z){var I=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(z))}catch(L){}}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var k=Graph.prototype.init;Graph.prototype.init=function(){function m(N){z=N}k.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(N){z=null});this.isMouseInsertPoint=function(){return null!=-z};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):I.apply(this,arguments)};var L=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var P=this.graph.getCellStyle(N);if(null!=P&&"rack"==P.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=P.marginLeft||0;S.marginRight=P.marginRight||0;S.marginTop=-P.marginTop||0;S.marginBottom=P.marginBottom||0;S.allowGaps=P.allowGaps||0;S.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return L.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(v.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,I,L,N,P,S,U,W,X,-Z,Y){t.apply(this,arguments);Graph.processFontAttributes(Y)};var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,I,L){function N(){for(var fa=U.getSelectionCells(),aa=[],da=0;da<fa.length;da++)U.isCellVisible(fa[da])&&aa.push(fa[da]);U.setSelectionCells(aa)}function P(fa){U.setHiddenTags(fa?[]:W.slice());N();U.refresh()}function S(fa,+z};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):I.apply(this,arguments)};var L=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var O=this.graph.getCellStyle(N);if(null!=O&&"rack"==O.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=O.marginLeft||0;S.marginRight=O.marginRight||0;S.marginTop=+O.marginTop||0;S.marginBottom=O.marginBottom||0;S.allowGaps=O.allowGaps||0;S.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return L.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(v.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,I,L,N,O,S,U,W,X,+Z,Y){t.apply(this,arguments);Graph.processFontAttributes(Y)};var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,I,L){function N(){for(var fa=U.getSelectionCells(),aa=[],da=0;da<fa.length;da++)U.isCellVisible(fa[da])&&aa.push(fa[da]);U.setSelectionCells(aa)}function O(fa){U.setHiddenTags(fa?[]:W.slice());N();U.refresh()}function S(fa,aa){Z.innerText="";if(0<fa.length){var da=document.createElement("table");da.setAttribute("cellpadding","2");da.style.boxSizing="border-box";da.style.tableLayout="fixed";da.style.width="100%";var ia=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var pa=0;pa<fa.length;pa++)(function(oa){function ha(){var ma=U.getCellsForTags([oa],null,null,!0);U.isEnabled()?U.setSelectionCells(ma):U.highlightCells(ma,null,null,70)}var xa=0>mxUtils.indexOf(U.hiddenTags,oa),qa=document.createElement("tr"),ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";var ya=document.createElement("img");ya.setAttribute("src",xa?Editor.visibleImage:Editor.hiddenImage);ya.setAttribute("title",mxResources.get(xa?"hideIt":"show",[oa]));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";ua.appendChild(ya);mxEvent.addListener(ya,"click",function(ma){mxEvent.isShiftDown(ma)?-P(0<=mxUtils.indexOf(U.hiddenTags,oa)):(U.toggleHiddenTag(oa),N(),U.refresh());mxEvent.consume(ma)});qa.appendChild(ua);ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.selectImage);ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter=-"invert(100%)";mxEvent.addListener(ya,"click",function(ma){P(!0);ha();mxEvent.consume(ma)});ua.appendChild(ya);qa.appendChild(ua);ua=document.createElement("td");ua.style.overflow="hidden";ua.style.whiteSpace="nowrap";ua.style.textOverflow="ellipsis";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.setAttribute("title",oa);a=document.createElement("a");mxUtils.write(a,oa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,xa?100:40);ua.appendChild(a);mxEvent.addListener(ua,-"click",function(ma){if(mxEvent.isShiftDown(ma))P(!0),ha();else if(xa&&0<U.hiddenTags.length)P(!0);else{var ka=W.slice(),Ba=mxUtils.indexOf(ka,oa);ka.splice(Ba,1);U.setHiddenTags(ka);N();U.refresh()}mxEvent.consume(ma)});qa.appendChild(ua);if(U.isEnabled()){ua=document.createElement("td");ua.style.verticalAlign="middle";ua.style.textAlign="center";ua.style.width="18px";if(null==aa){ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.trashImage);+O(0<=mxUtils.indexOf(U.hiddenTags,oa)):(U.toggleHiddenTag(oa),N(),U.refresh());mxEvent.consume(ma)});qa.appendChild(ua);ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.selectImage);ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter=+"invert(100%)";mxEvent.addListener(ya,"click",function(ma){O(!0);ha();mxEvent.consume(ma)});ua.appendChild(ya);qa.appendChild(ua);ua=document.createElement("td");ua.style.overflow="hidden";ua.style.whiteSpace="nowrap";ua.style.textOverflow="ellipsis";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.setAttribute("title",oa);a=document.createElement("a");mxUtils.write(a,oa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,xa?100:40);ua.appendChild(a);mxEvent.addListener(ua,+"click",function(ma){if(mxEvent.isShiftDown(ma))O(!0),ha();else if(xa&&0<U.hiddenTags.length)O(!0);else{var ka=W.slice(),Ba=mxUtils.indexOf(ka,oa);ka.splice(Ba,1);U.setHiddenTags(ka);N();U.refresh()}mxEvent.consume(ma)});qa.appendChild(ua);if(U.isEnabled()){ua=document.createElement("td");ua.style.verticalAlign="middle";ua.style.textAlign="center";ua.style.width="18px";if(null==aa){ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.trashImage);ya.setAttribute("title",mxResources.get("removeIt",[oa]));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";mxEvent.addListener(ya,"click",function(ma){var ka=mxUtils.indexOf(W,oa);0<=ka&&W.splice(ka,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[oa]);U.refresh();mxEvent.consume(ma)});ua.appendChild(ya)}else{var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.margin="0px";ja.defaultChecked=null!=aa&&0<=mxUtils.indexOf(aa,oa);ja.checked=ja.defaultChecked;ja.style.background="transparent";ja.setAttribute("title",mxResources.get(ja.defaultChecked?"removeIt":"add",[oa]));mxEvent.addListener(ja,"change",function(ma){ja.checked?U.addTagsForCells(U.getSelectionCells(),[oa]):U.removeTagsForCells(U.getSelectionCells(),[oa]);mxEvent.consume(ma)});ua.appendChild(ja)}qa.appendChild(ua)}ia.appendChild(qa)})(fa[pa]);da.appendChild(ia);Z.appendChild(da)}}var U=this,W=U.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);U.addListener(mxEvent.ROOT,function(){W=U.hiddenTags.slice()});@@ -12945,37 +12945,37 @@ var Y=mxUtils.bind(this,function(fa,aa){if(m()){fa=U.getAllTags();for(aa=0;aa<fa"0px";ba.style.right="0px";ba.style.height="26px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(U.isEnabled()){Z.style.bottom="34px";var ea=document.createElement("a");ea.className="geToolbarButton geAdaptiveAsset geToggleItem";ea.style.width="16px";ea.style.height="18px";ea.style.backgroundPosition="center center";ea.style.backgroundRepeat="no-repeat";ea.style.backgroundSize="20px";ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(fa){U.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=U.hiddenTags.slice());N();U.refresh();mxEvent.consume(fa)});ba.appendChild(ca);null!=I&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),mxEvent.addListener(ea,"click",function(fa){I(W,function(aa){W=aa;Y()});mxEvent.consume(fa)}),ba.appendChild(ea));X.appendChild(ba)}null!=L&&ba.appendChild(L);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var z in Graph.customFontElements){var I=Graph.customFontElements[z];m.push({name:I.name,url:I.url})}return m};Graph.prototype.setFont=function(m,z){Graph.addFont(m,z);var I=Editor.guid();document.execCommand("fontname",!1,I);for(var L=-this.cellEditor.textarea.getElementsByTagName("font"),N=!1,P=0;P<L.length;P++)L[P].getAttribute("face")==I&&(N=!0,L[P].setAttribute("face",m),null!=z?L[P].setAttribute("data-font-src",z):L[P].removeAttribute("data-font-src"));N||document.execCommand("fontname",!1,m)};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;+this.cellEditor.textarea.getElementsByTagName("font"),N=!1,O=0;O<L.length;O++)L[O].getAttribute("face")==I&&(N=!0,L[O].setAttribute("face",m),null!=z?L[O].setAttribute("data-font-src",z):L[O].removeAttribute("data-font-src"));N||document.execCommand("fontname",!1,m)};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.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 m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var z in m)this.globalVars[z]=m[z]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var z=J.apply(this,arguments);-null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,I,L,N,P,S,U,W,X,Z,Y,ba,ea,ca,fa){var aa=D.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");+null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,I,L,N,O,S,U,W,X,Z,Y,ba,ea,ca,fa){var aa=D.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");null==da&&(da="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ia=this.getCustomFonts();if(Z&&0<ia.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var oa="",ha="",xa=0;xa<ia.length;xa++){var qa=ia[xa].name,ua=ia[xa].url;Graph.isCssFontUrl(ua)?oa+="@import url("+Graph.rewriteGoogleFontUrl(ua)+");\n":ha+='@font-face {\nfont-family: "'+qa+'";\nsrc: url("'+ua+'");\n}\n'}da.appendChild(pa.createTextNode(oa+ha));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),null!=da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var G=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){G.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=0};var V=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return V.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var z="1"==mxUtils.getValue(m.style,"enumerate",0);z&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):z||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);z=m.secondLabel;if(null!=z){var I=m.view.scale,L=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?-new mxRectangle(m.x+m.width-4*I,m.y+4*I,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==L&&z.scale==I||(z.bounds=m,z.value=L,z.scale=I,z.redraw())}};var Q=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();Q.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var O=-Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){O.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,z){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,z))};Graph.prototype.executeCustomActions=function(m,z,I){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 L=!1,N=0,P=0,S=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,function(){L&&(L=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<N&&N--;0==N&&X()}),X=mxUtils.bind(this,function(){if(P<m.length){var Z=this.stoppingCustomActions,Y=m[P++],ba=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,+new mxRectangle(m.x+m.width-4*I,m.y+4*I,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==L&&z.scale==I||(z.bounds=m,z.value=L,z.scale=I,z.redraw())}};var Q=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();Q.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var P=+Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){P.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,z){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,z))};Graph.prototype.executeCustomActions=function(m,z,I){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 L=!1,N=0,O=0,S=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,function(){L&&(L=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<N&&N--;0==N&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var Z=this.stoppingCustomActions,Y=m[O++],ba=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,I))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),N++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),U());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),1);this.setCellsVisible(ea,!0)}null!=Y.hide&&(S(),ea=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ea=[];null!=Y.select&&this.isEnabled()&&(ea=this.getCellsForAction(Y.select),this.setSelectionCells(ea));null!=Y.highlight&&(ea=this.getCellsForAction(Y.highlight),this.highlightCells(ea,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(ea=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);null!=I&&null!=Y.explore&&Graph.exploreFromCell(this,I,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ca=Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var fa=this.getAllTags();for(ea=0;ea<fa.length;ea++)0>mxUtils.indexOf(Y.tags.visible,fa[ea])&&0>mxUtils.indexOf(ca,fa[ea])&&ca.push(fa[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(N++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==N?X():U()}else this.stoppingCustomActions=-this.executingCustomActions=!1,U(),null!=z&&z()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,z){var I=this.getLinkForCell(z);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,I));if(this.isHtmlLabel(z)){var L=document.createElement("div");L.innerHTML=Graph.sanitizeHtml(this.getLabel(z));for(var N=L.getElementsByTagName("a"),P=!1,S=0;S<N.length;S++)I=N[S].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(N[S].setAttribute("href",-this.updateCustomLink(m,I)),P=!0);P&&this.labelChanged(z,L.innerHTML)}};Graph.prototype.updateCustomLink=function(m,z){if("data:action/json,"==z.substring(0,17))try{var I=JSON.parse(z.substring(17));null!=I.actions&&(this.updateCustomLinkActions(m,I.actions),z="data:action/json,"+JSON.stringify(I))}catch(L){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var I=0;I<z.length;I++){var L=z[I],N;for(N in L)this.updateCustomLinkAction(m,L[N],"cells"),this.updateCustomLinkAction(m,L[N],-"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,I){if(null!=z&&null!=z[I]){for(var L=[],N=0;N<z[I].length;N++)if("*"==z[I][N])L.push(z[I][N]);else{var P=m[z[I][N]];null!=P?""!=P&&L.push(P):L.push(z[I][N])}z[I]=L}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var I=[],L=0;L<z.length;L++)0>m.excludeCells.indexOf(z[L].id)&&I.push(z[L]);z=I}return z};Graph.prototype.getCellsById=-function(m){var z=[];if(null!=m)for(var I=0;I<m.length;I++)if("*"==m[I]){var L=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(P){return P!=L},L))}else{var N=this.model.getCell(m[I]);null!=N&&z.push(N)}return z};var q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};+this.executingCustomActions=!1,U(),null!=z&&z()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,z){var I=this.getLinkForCell(z);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,I));if(this.isHtmlLabel(z)){var L=document.createElement("div");L.innerHTML=Graph.sanitizeHtml(this.getLabel(z));for(var N=L.getElementsByTagName("a"),O=!1,S=0;S<N.length;S++)I=N[S].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(N[S].setAttribute("href",+this.updateCustomLink(m,I)),O=!0);O&&this.labelChanged(z,L.innerHTML)}};Graph.prototype.updateCustomLink=function(m,z){if("data:action/json,"==z.substring(0,17))try{var I=JSON.parse(z.substring(17));null!=I.actions&&(this.updateCustomLinkActions(m,I.actions),z="data:action/json,"+JSON.stringify(I))}catch(L){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var I=0;I<z.length;I++){var L=z[I],N;for(N in L)this.updateCustomLinkAction(m,L[N],"cells"),this.updateCustomLinkAction(m,L[N],+"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,I){if(null!=z&&null!=z[I]){for(var L=[],N=0;N<z[I].length;N++)if("*"==z[I][N])L.push(z[I][N]);else{var O=m[z[I][N]];null!=O?""!=O&&L.push(O):L.push(z[I][N])}z[I]=L}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var I=[],L=0;L<z.length;L++)0>m.excludeCells.indexOf(z[L].id)&&I.push(z[L]);z=I}return z};Graph.prototype.getCellsById=+function(m){var z=[];if(null!=m)for(var I=0;I<m.length;I++)if("*"==m[I]){var L=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(O){return O!=L},L))}else{var N=this.model.getCell(m[I]);null!=N&&z.push(N)}return z};var q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(m){var z=mxUtils.indexOf(this.hiddenTags,m);0>z?this.hiddenTags.push(m):0<=z&&this.hiddenTags.splice(z,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var z=0;z<m.length;z++)if(0>mxUtils.indexOf(this.hiddenTags,m[z]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,z,I,-L){var N=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var P=0,S={},U=0;U<m.length;U++)0<m[U].length&&(S[m[U]]=!0,P++);for(U=0;U<z.length;U++)if(I&&this.model.getParent(z[U])==this.model.root||this.model.isVertex(z[U])||this.model.isEdge(z[U])){var W=this.getTagsForCell(z[U]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=m.length)){for(var Z=X=0;Z<W.length&&X<P;Z++)null!=S[W[Z]]&&X++;X=X==P}X&&(1!=L||this.isCellVisible(z[U]))&&N.push(z[U])}}return N};Graph.prototype.getAllTags=-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,I=[],L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);I=[];if(0<N.length){N=N.split(" ");for(var P={},S=0;S<N.length;S++)if(null==z||null!=z[N[S]])P[N[S]]=!0,I.push(N[S]);z=P}else return[]}return I};Graph.prototype.getTagsForCells=function(m){for(var z=[],I={},L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);if(0<N.length){N=N.split(" ");for(var P=-0;P<N.length;P++)null==I[N[P]]&&(I[N[P]]=!0,z.push(N[P]))}}return z};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){for(var L=this.getTagsForCell(m[I]),N=L.split(" "),P=!1,S=0;S<z.length;S++){var U=mxUtils.trim(z[S]);""!=U&&0>mxUtils.indexOf(N,U)&&(L=0<L.length?L+" "+U:U,P=!0)}P&&this.setAttributeForCell(m[I],"tags",L)}}finally{this.model.endUpdate()}}};-Graph.prototype.removeTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){var L=this.getTagsForCell(m[I]);if(0<L.length){for(var N=L.split(" "),P=!1,S=0;S<z.length;S++){var U=mxUtils.indexOf(N,z[S]);0<=U&&(N.splice(U,1),P=!0)}P&&this.setAttributeForCell(m[I],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var z=0;z<m.length;z++)this.model.setVisible(m[z],!this.model.isVisible(m[z]))}finally{this.model.endUpdate()}};-Graph.prototype.setCellsVisible=function(m,z){this.model.beginUpdate();try{for(var I=0;I<m.length;I++)this.model.setVisible(m[I],z)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,z,I,L){for(var N=0;N<m.length;N++)this.highlightCell(m[N],z,I,L)};Graph.prototype.highlightCell=function(m,z,I,L,N){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;m=this.view.getState(m);var P=null;null!=m&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,-1)+N),P=new mxCellHighlight(this,z,N,!1),null!=L&&(P.opacity=L),P.highlight(m),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},I));return P};Graph.prototype.addSvgShadow=function(m,z,I,L){I=null!=I?I:!1;L=null!=L?L:!0;var N=m.ownerDocument,P=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");P.setAttribute("id",-this.shadowId);var S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");P.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",-"offsetBlur");P.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");P.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");-S.setAttribute("result","offsetBlur");P.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");P.appendChild(S);S=m.getElementsByTagName("defs");0==S.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=m.firstChild?m.insertBefore(N,m.firstChild):m.appendChild(N)):N=S[0];N.appendChild(P);I||(z=null!=z?z:m.getElementsByTagName("g")[0],-null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(m.getAttribute("width")))&&L&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+6),m.setAttribute("height",parseInt(m.getAttribute("height"))+6),z=m.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,m.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(m,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=+L){var N=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var O=0,S={},U=0;U<m.length;U++)0<m[U].length&&(S[m[U]]=!0,O++);for(U=0;U<z.length;U++)if(I&&this.model.getParent(z[U])==this.model.root||this.model.isVertex(z[U])||this.model.isEdge(z[U])){var W=this.getTagsForCell(z[U]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=m.length)){for(var Z=X=0;Z<W.length&&X<O;Z++)null!=S[W[Z]]&&X++;X=X==O}X&&(1!=L||this.isCellVisible(z[U]))&&N.push(z[U])}}return N};Graph.prototype.getAllTags=+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,I=[],L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);I=[];if(0<N.length){N=N.split(" ");for(var O={},S=0;S<N.length;S++)if(null==z||null!=z[N[S]])O[N[S]]=!0,I.push(N[S]);z=O}else return[]}return I};Graph.prototype.getTagsForCells=function(m){for(var z=[],I={},L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);if(0<N.length){N=N.split(" ");for(var O=+0;O<N.length;O++)null==I[N[O]]&&(I[N[O]]=!0,z.push(N[O]))}}return z};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){for(var L=this.getTagsForCell(m[I]),N=L.split(" "),O=!1,S=0;S<z.length;S++){var U=mxUtils.trim(z[S]);""!=U&&0>mxUtils.indexOf(N,U)&&(L=0<L.length?L+" "+U:U,O=!0)}O&&this.setAttributeForCell(m[I],"tags",L)}}finally{this.model.endUpdate()}}};+Graph.prototype.removeTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){var L=this.getTagsForCell(m[I]);if(0<L.length){for(var N=L.split(" "),O=!1,S=0;S<z.length;S++){var U=mxUtils.indexOf(N,z[S]);0<=U&&(N.splice(U,1),O=!0)}O&&this.setAttributeForCell(m[I],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var z=0;z<m.length;z++)this.model.setVisible(m[z],!this.model.isVisible(m[z]))}finally{this.model.endUpdate()}};+Graph.prototype.setCellsVisible=function(m,z){this.model.beginUpdate();try{for(var I=0;I<m.length;I++)this.model.setVisible(m[I],z)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,z,I,L){for(var N=0;N<m.length;N++)this.highlightCell(m[N],z,I,L)};Graph.prototype.highlightCell=function(m,z,I,L,N){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;m=this.view.getState(m);var O=null;null!=m&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,+1)+N),O=new mxCellHighlight(this,z,N,!1),null!=L&&(O.opacity=L),O.highlight(m),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},I));return O};Graph.prototype.addSvgShadow=function(m,z,I,L){I=null!=I?I:!1;L=null!=L?L:!0;var N=m.ownerDocument,O=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");O.setAttribute("id",+this.shadowId);var S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",+"offsetBlur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");+S.setAttribute("result","offsetBlur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");O.appendChild(S);S=m.getElementsByTagName("defs");0==S.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=m.firstChild?m.insertBefore(N,m.firstChild):m.appendChild(N)):N=S[0];N.appendChild(O);I||(z=null!=z?z:m.getElementsByTagName("g")[0],+null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(m.getAttribute("width")))&&L&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+6),m.setAttribute("height",parseInt(m.getAttribute("height"))+6),z=m.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,m.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return O};Graph.prototype.setShadowVisible=function(m,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=null!=z?z:!0,(this.shadowVisible=m)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),z&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var m=this.model.getChildCount(this.model.root),z=0;do var I=this.model.getChildAt(this.model.root,z);while(z++<m&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+@@ -12989,33 +12989,33 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT[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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=-[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var z=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?z="mxgraph.er":"sysML"==m.substring(0,5)&&(z="mxgraph.sysml"));return z};var y=mxMarker.createMarker;mxMarker.createMarker=function(m,z,I,L,N,P,S,U,W,X){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=Z&&mxStencilRegistry.getStencil(Z)}return y.apply(this,arguments)};var B=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,-z,I,L,N,P){"1"==mxUtils.getValue(z.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return B.apply(this,arguments)};PrintDialog.prototype.create=function(m,z,I){function L(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function N(Aa){m.lastPrintPagesRadioChecked=Y.checked;m.lastPrintSelectionOnlyChecked=fa.checked;m.lastPrintCropRadioChecked=+[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var z=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?z="mxgraph.er":"sysML"==m.substring(0,5)&&(z="mxgraph.sysml"));return z};var y=mxMarker.createMarker;mxMarker.createMarker=function(m,z,I,L,N,O,S,U,W,X){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=Z&&mxStencilRegistry.getStencil(Z)}return y.apply(this,arguments)};var B=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,+z,I,L,N,O){"1"==mxUtils.getValue(z.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return B.apply(this,arguments)};PrintDialog.prototype.create=function(m,z,I){function L(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function N(Aa){m.lastPrintPagesRadioChecked=Y.checked;m.lastPrintSelectionOnlyChecked=fa.checked;m.lastPrintCropRadioChecked=da.checked;m.lastPrintFitRadioChecked=ia.checked;Y.checked&&ba.value<ea.value?(m.lastPrintPagesFromInput=ba.value,m.lastPrintPagesToInput=ea.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);sa.value=Math.max(1,Math.min(1600,parseInt(sa.value)))+"%";m.lastPrintZoom=sa.value;m.lastPrintBorder=Ba.value;m.lastPrintGrid=Ea.checked;m.lastPrintTransparent=wa.checked;m.lastPrintInclude=Ca.checked;m.lastPrintSheetsAcross=ma.value;m.lastPrintSheetsDown=ka.value;var Fa={};Fa.border=parseInt(Ba.value);-Fa.scale=parseInt(sa.value)/100;Fa.grid=Ea.checked;Fa.transparent=wa.checked;Fa.includeCopy=Ca.checked;Fa.sheetsAcross=parseInt(ma.value);Fa.sheetsDown=parseInt(ka.value);Fa.pagesFrom=parseInt(ba.value);Fa.pagesTo=parseInt(ea.value);Fa.allPages=Z.checked;Fa.selection=fa.checked;Fa.pageView=aa.checked;Fa.crop=da.checked;Fa.fit=ia.checked;return null!=I?I(!Aa,Fa):m.print(!Aa,Fa)}var P=m.editor.graph,S=document.createElement("div"),U=document.createElement("h3");U.style.width="100%";U.style.textAlign=+Fa.scale=parseInt(sa.value)/100;Fa.grid=Ea.checked;Fa.transparent=wa.checked;Fa.includeCopy=Ca.checked;Fa.sheetsAcross=parseInt(ma.value);Fa.sheetsDown=parseInt(ka.value);Fa.pagesFrom=parseInt(ba.value);Fa.pagesTo=parseInt(ea.value);Fa.allPages=Z.checked;Fa.selection=fa.checked;Fa.pageView=aa.checked;Fa.crop=da.checked;Fa.fit=ia.checked;return null!=I?I(!Aa,Fa):m.print(!Aa,Fa)}var O=m.editor.graph,S=document.createElement("div"),U=document.createElement("h3");U.style.width="100%";U.style.textAlign="center";U.style.marginTop="0px";mxUtils.write(U,z||mxResources.get("print"));S.appendChild(U);var W=1,X=1;U=document.createElement("div");U.style.whiteSpace="nowrap";var Z=document.createElement("input");Z.style.marginRight="8px";Z.style.marginBottom="8px";Z.setAttribute("type","radio");Z.setAttribute("name","pages-printdialog");U.appendChild(Z);z=document.createElement("span");mxUtils.write(z,mxResources.get("allPages"));mxEvent.addListener(z,"click",function(){Z.checked=!0});U.appendChild(z);mxUtils.br(U);var Y=Z.cloneNode(!0);U.appendChild(Y);z=document.createElement("span");mxUtils.write(z,mxResources.get("pages")+":");U.appendChild(z);mxEvent.addListener(z,"click",function(){Y.checked=!0});var ba=document.createElement("input");ba.style.margin="0 4px";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="40px";U.appendChild(ba);z=document.createElement("span");mxUtils.write(z,mxResources.get("to"));U.appendChild(z);var ea=ba.cloneNode(!0);U.appendChild(ea);mxEvent.addListener(ba,"focus",function(){Y.checked=!0});mxEvent.addListener(ea,"focus",function(){Y.checked=!0});mxEvent.addListener(ba,"change",L);mxEvent.addListener(ea,"change",L);if(null!=m.pages&&(X=m.pages.length,null!=m.currentPage))for(var ca=0;ca<X;ca++)if(m.currentPage==m.pages[ca]){W=ca+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(ba.value=Math.min(X,Math.max(1,m.lastPrintPagesFromInput)),ea.value=Math.min(X,Math.max(1,m.lastPrintPagesToInput))):(ba.value=W,ea.value=W);ba.setAttribute("max",X);ea.setAttribute("max",X);ca=mxUtils.button(mxResources.get("currentPage"),function(Aa){ba.value=W;ea.value=W;Y.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";U.appendChild(ca);1<X&&S.appendChild(U);U=document.createElement("div");U.style.borderBottom="1px solid lightGray";U.style.paddingBottom="12px";-U.style.marginBottom="12px";U.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";P.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");P.isEnabled()&&(U.appendChild(fa),z=document.createElement("span"),mxUtils.write(z,mxResources.get("selectionOnly")),U.appendChild(z));(P.isEnabled()||1<X)&&S.appendChild(U);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Y.checked=-!0:!P.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;P.isSelectionEmpty()||mxEvent.addListener(z,"click",function(){fa.checked=!fa.checked});P=document.createElement("div");P.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");P.appendChild(aa);z=document.createElement("span");mxUtils.write(z,mxResources.get("pageView"));P.appendChild(z);-mxEvent.addListener(P,"click",function(){aa.checked=!0});S.appendChild(P);P=document.createElement("div");P.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");P.appendChild(da);z=document.createElement("span");mxUtils.write(z,mxResources.get("crop"));P.appendChild(z);mxEvent.addListener(P,"click",function(){da.checked=!0});S.appendChild(P);P=document.createElement("div");-P.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");z=document.createElement("div");z.style.display="inline-block";z.style.verticalAlign="top";z.style.paddingTop="2px";z.appendChild(ia);P.appendChild(z);U=document.createElement("table");U.style.display="inline-block";U.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),-oa=pa.cloneNode(!0),ha=document.createElement("td"),xa=ha.cloneNode(!0),qa=ha.cloneNode(!0),ua=ha.cloneNode(!0),ya=ha.cloneNode(!0),ja=ha.cloneNode(!0);ha.style.textAlign="right";ua.style.textAlign="right";mxUtils.write(ha,mxResources.get("fitTo"));mxEvent.addListener(P,"click",function(Aa){mxEvent.getSource(Aa)!=ia&&(ia.checked=!ia.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",m.lastPrintSheetsAcross||"1");ma.setAttribute("min",+U.style.marginBottom="12px";U.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";O.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");O.isEnabled()&&(U.appendChild(fa),z=document.createElement("span"),mxUtils.write(z,mxResources.get("selectionOnly")),U.appendChild(z));(O.isEnabled()||1<X)&&S.appendChild(U);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Y.checked=+!0:!O.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;O.isSelectionEmpty()||mxEvent.addListener(z,"click",function(){fa.checked=!fa.checked});O=document.createElement("div");O.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");O.appendChild(aa);z=document.createElement("span");mxUtils.write(z,mxResources.get("pageView"));O.appendChild(z);+mxEvent.addListener(O,"click",function(){aa.checked=!0});S.appendChild(O);O=document.createElement("div");O.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");O.appendChild(da);z=document.createElement("span");mxUtils.write(z,mxResources.get("crop"));O.appendChild(z);mxEvent.addListener(O,"click",function(){da.checked=!0});S.appendChild(O);O=document.createElement("div");+O.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");z=document.createElement("div");z.style.display="inline-block";z.style.verticalAlign="top";z.style.paddingTop="2px";z.appendChild(ia);O.appendChild(z);U=document.createElement("table");U.style.display="inline-block";U.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),+oa=pa.cloneNode(!0),ha=document.createElement("td"),xa=ha.cloneNode(!0),qa=ha.cloneNode(!0),ua=ha.cloneNode(!0),ya=ha.cloneNode(!0),ja=ha.cloneNode(!0);ha.style.textAlign="right";ua.style.textAlign="right";mxUtils.write(ha,mxResources.get("fitTo"));mxEvent.addListener(O,"click",function(Aa){mxEvent.getSource(Aa)!=ia&&(ia.checked=!ia.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",m.lastPrintSheetsAcross||"1");ma.setAttribute("min","1");ma.setAttribute("type","number");ma.style.width="40px";xa.appendChild(ma);z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsAcross"));qa.appendChild(z);mxUtils.write(ua,mxResources.get("fitToBy"));var ka=ma.cloneNode(!0);ka.setAttribute("value",m.lastPrintSheetsDown||"1");ya.appendChild(ka);mxEvent.addListener(ma,"click",function(Aa){ia.checked=!0;mxEvent.consume(Aa)});mxEvent.addListener(ka,"click",function(Aa){ia.checked=!0;mxEvent.consume(Aa)});m.lastPrintCropRadioChecked?-da.checked=!0:m.lastPrintFitRadioChecked?ia.checked=!0:aa.checked=!0;z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsDown"));ja.appendChild(z);pa.appendChild(ha);pa.appendChild(xa);pa.appendChild(qa);oa.appendChild(ua);oa.appendChild(ya);oa.appendChild(ja);ca.appendChild(pa);ca.appendChild(oa);U.appendChild(ca);P.appendChild(U);S.appendChild(P);P=document.createElement("div");P.style.borderTop="1px solid lightGray";P.style.whiteSpace="nowrap";P.style.paddingTop="12px";-P.style.marginTop="12px";P.style.paddingLeft="8px";mxUtils.write(P,mxResources.get("borderWidth")+":");var Ba=document.createElement("input");Ba.setAttribute("type","number");Ba.setAttribute("min","0");Ba.style.width="40px";Ba.style.marginLeft="4px";Ba.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;P.appendChild(Ba);z=document.createElement("span");z.style.marginLeft="8px";mxUtils.write(z,mxResources.get("zoom")+":");P.appendChild(z);var sa=document.createElement("input");-sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";P.appendChild(sa);mxUtils.br(P);var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="12px";Ea.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;P.appendChild(Ea);z=document.createElement("span");z.style.marginLeft="4px";z.style.marginRight="8px";mxUtils.write(z,mxResources.get("grid"));P.appendChild(z);mxEvent.addListener(z,"click",function(Aa){Ea.checked=!0;-mxEvent.consume(Aa)});var wa=document.createElement("input");wa.setAttribute("type","checkbox");wa.style.marginTop="10px";wa.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=I&&(P.appendChild(wa),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("transparentBackground")),P.appendChild(z),mxEvent.addListener(z,"click",function(Aa){wa.checked=!0;mxEvent.consume(Aa)}));var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");-Ca.style.marginTop="10px";Ca.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(P),P.appendChild(Ca),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram")),P.appendChild(z),mxEvent.addListener(z,"click",function(Aa){Ca.checked=!0;mxEvent.consume(Aa)}));S.appendChild(P);z=document.createElement("div");z.style.marginTop="40px";z.style.textAlign=-"right";z.style.whiteSpace="nowrap";m.isOffline()||null!=I||z.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));P=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});P.className="geBtn";m.editor.cancelFirst&&z.appendChild(P);PrintDialog.previewEnabled&&null==I&&(U=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),N(!1)}catch(Aa){m.handleError(Aa)}}),U.className="geBtn",z.appendChild(U));U=mxUtils.button(mxResources.get(null!=I?"export":-PrintDialog.previewEnabled?"print":"ok"),function(){try{m.hideDialog(),N(!0)}catch(Aa){m.handleError(Aa)}});U.className="geBtn gePrimaryBtn";z.appendChild(U);m.editor.cancelFirst||z.appendChild(P);S.appendChild(z);if(m.editor.isChromelessView()){var Da=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};m.addListener("darkModeChanged",Da);Da();var Ka=function(Aa,Fa){Aa=Fa.getProperty("dialog");S.parentNode==+da.checked=!0:m.lastPrintFitRadioChecked?ia.checked=!0:aa.checked=!0;z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsDown"));ja.appendChild(z);pa.appendChild(ha);pa.appendChild(xa);pa.appendChild(qa);oa.appendChild(ua);oa.appendChild(ya);oa.appendChild(ja);ca.appendChild(pa);ca.appendChild(oa);U.appendChild(ca);O.appendChild(U);S.appendChild(O);O=document.createElement("div");O.style.borderTop="1px solid lightGray";O.style.whiteSpace="nowrap";O.style.paddingTop="12px";+O.style.marginTop="12px";O.style.paddingLeft="8px";mxUtils.write(O,mxResources.get("borderWidth")+":");var Ba=document.createElement("input");Ba.setAttribute("type","number");Ba.setAttribute("min","0");Ba.style.width="40px";Ba.style.marginLeft="4px";Ba.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;O.appendChild(Ba);z=document.createElement("span");z.style.marginLeft="8px";mxUtils.write(z,mxResources.get("zoom")+":");O.appendChild(z);var sa=document.createElement("input");+sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";O.appendChild(sa);mxUtils.br(O);var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="12px";Ea.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;O.appendChild(Ea);z=document.createElement("span");z.style.marginLeft="4px";z.style.marginRight="8px";mxUtils.write(z,mxResources.get("grid"));O.appendChild(z);mxEvent.addListener(z,"click",function(Aa){Ea.checked=!0;+mxEvent.consume(Aa)});var wa=document.createElement("input");wa.setAttribute("type","checkbox");wa.style.marginTop="10px";wa.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=I&&(O.appendChild(wa),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("transparentBackground")),O.appendChild(z),mxEvent.addListener(z,"click",function(Aa){wa.checked=!0;mxEvent.consume(Aa)}));var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");+Ca.style.marginTop="10px";Ca.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(O),O.appendChild(Ca),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram")),O.appendChild(z),mxEvent.addListener(z,"click",function(Aa){Ca.checked=!0;mxEvent.consume(Aa)}));S.appendChild(O);z=document.createElement("div");z.style.marginTop="40px";z.style.textAlign=+"right";z.style.whiteSpace="nowrap";m.isOffline()||null!=I||z.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));O=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});O.className="geBtn";m.editor.cancelFirst&&z.appendChild(O);PrintDialog.previewEnabled&&null==I&&(U=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),N(!1)}catch(Aa){m.handleError(Aa)}}),U.className="geBtn",z.appendChild(U));U=mxUtils.button(mxResources.get(null!=I?"export":+PrintDialog.previewEnabled?"print":"ok"),function(){try{m.hideDialog(),N(!0)}catch(Aa){m.handleError(Aa)}});U.className="geBtn gePrimaryBtn";z.appendChild(U);m.editor.cancelFirst||z.appendChild(O);S.appendChild(z);if(m.editor.isChromelessView()){var Da=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};m.addListener("darkModeChanged",Da);Da();var Ka=function(Aa,Fa){Aa=Fa.getProperty("dialog");S.parentNode==Aa.container&&(m.editor.removeListener(Ka),m.removeListener(Da))};m.editor.addListener("hideDialog",Ka)}this.container=S};var C=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 m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else C.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(m=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=m?m:"default"),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 M=document.createElement("canvas"),T=new Image;T.onload=function(){try{M.getContext("2d").drawImage(T,0,0);var m=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=m&&6<m.length}catch(z){}};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(m){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;c.previousAdaptiveColors=c.adaptiveColors;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(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.13";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.15";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -13035,10 +13035,10 @@ g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalDatEditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){var g=this.editor.graph;g.mathEnabled=d;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();g.refresh();g.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(d){this.editor.graph.setAdaptiveColors(d);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,k){var v=null==d||null==g;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),x=this.timeout,A=t.spin,J=null,D=null,G=mxUtils.bind(this,function(V){null!=V&&V()});t.spin=function(V,Q,O,q){q=null!=q?q:x;var y=!1;if(!this.active){var B=Date.now();null!=O&&(J=window.setTimeout(function(){t.stop();J=null;O({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},q));A.call(this,V);this.active=!0;null!=Q&&(v&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),x=this.timeout,A=t.spin,J=null,D=null,G=mxUtils.bind(this,function(V){null!=V&&V()});t.spin=function(V,Q,P,q){q=null!=q?q:x;var y=!1;if(!this.active){var B=Date.now();null!=P&&(J=window.setTimeout(function(){t.stop();J=null;P({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},q));A.call(this,V);this.active=!0;null!=Q&&(v&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),y=document.createElement("div"),y.className="geSpinnerStatus",y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,d)+"px",y.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform",-"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=Q.substring(Q.length-3,Q.length)&&"!"!=Q.charAt(Q.length-1)&&(Q+="..."),y.innerHTML=mxUtils.htmlEntities(Q),V.appendChild(y),t.status=y);this.pause=mxUtils.bind(this,function(){var C=G;this.active&&(q=Math.max(0,q-(Date.now()-B)),C=mxUtils.bind(this,function(M){this.spin(V,Q,O,q);if(null!=M)try{M(),D=mxUtils.bind(this,function(){this.spin(V,Q,O,q);try{M()}catch(T){null!=O&&O(T)}})}catch(T){null!=-O&&O(T)}}));this.stop();return C});y=!0}return y};var R=t.stop;t.stop=function(){R.call(this);this.active&&(this.active=!1,null!=J&&(window.clearTimeout(J),J=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),t.status=null)};t.pause=function(){return G};return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(v){}return!1};+"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=Q.substring(Q.length-3,Q.length)&&"!"!=Q.charAt(Q.length-1)&&(Q+="..."),y.innerHTML=mxUtils.htmlEntities(Q),V.appendChild(y),t.status=y);this.pause=mxUtils.bind(this,function(){var C=G;this.active&&(q=Math.max(0,q-(Date.now()-B)),C=mxUtils.bind(this,function(M){this.spin(V,Q,P,q);if(null!=M)try{M(),D=mxUtils.bind(this,function(){this.spin(V,Q,P,q);try{M()}catch(T){null!=P&&P(T)}})}catch(T){null!=+P&&P(T)}}));this.stop();return C});y=!0}return y};var R=t.stop;t.stop=function(){R.call(this);this.active&&(this.active=!1,null!=J&&(window.clearTimeout(J),J=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),t.status=null)};t.pause=function(){return G};return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(v){}return!1};EditorUi.isVisioFilename=function(d){return/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d)};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,v=this.editor.graph,t=this;g.getFunction=function(x){if(v.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var A=t.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<A&&t.movePage(A,A-1)};if(38==x.keyCode)return function(){0<A&&t.movePage(A,0)};if(39==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,A+1)};if(40==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,t.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&@@ -13047,11 +13047,11 @@ arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;Edg=null!=x?mxUtils.getXml(x):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",g);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var k=null!=d?this.editor.extractGraphModel(d,!0):null;null!=k&&(d=k);if(null!=d){k=this.editor.graph;k.model.beginUpdate();try{var v=null!=this.pages?this.pages.slice():null,t=d.getElementsByTagName("diagram");if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var x=t.length-1;0<=x;x--){var A=this.updatePageRoot(new DiagramPage(t[x]));null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[x+1]));k.model.execute(new ChangePage(this,A,0==x?A:null,0))}}else null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=v)for(x=0;x<v.length;x++)k.model.execute(new ChangePage(this,-v[x],null));var J=this.getCurrentFile();null!=J&&J.fileReplaced(g)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;R=null!=R?R:!Editor.defaultCompressed;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else O=q=v;if(null==d)return"";var y=d;if("mxfile"!=y.nodeName.toLowerCase()){if(R){var B=d.ownerDocument.createElement("diagram");B.setAttribute("name",+v[x],null));var J=this.getCurrentFile();null!=J&&J.fileReplaced(g)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;R=null!=R?R:!Editor.defaultCompressed;var P=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else P=q=v;if(null==d)return"";var y=d;if("mxfile"!=y.nodeName.toLowerCase()){if(R){var B=d.ownerDocument.createElement("diagram");B.setAttribute("name",mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());B.appendChild(d)}else{B=Graph.zapGremlins(mxUtils.getXml(d));y=Graph.compress(B);if(Graph.decompress(y)!=B)return B;B=d.ownerDocument.createElement("diagram");B.setAttribute("name",mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());mxUtils.setTextContent(B,y)}y=d.ownerDocument.createElement("mxfile");y.appendChild(B)}G?(y=y.cloneNode(!0),y.removeAttribute("modified"),y.removeAttribute("host"),y.removeAttribute("agent"),y.removeAttribute("etag"),y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("type")):(y.removeAttribute("userAgent"),y.removeAttribute("modified"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("pages"),y.removeAttribute("type"),y.removeAttribute("etag"),mxClient.IS_CHROMEAPP?y.setAttribute("host","Chrome"):EditorUi.isElectronApp?y.setAttribute("host","Electron"):y.setAttribute("host",window.location.hostname),y.setAttribute("agent",-null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),1<y.getElementsByTagName("diagram").length&&null!=this.pages&&y.setAttribute("pages",this.pages.length));null!=V&&(y=y.cloneNode(!0),y.setAttribute("scale",V));null!=Q&&(y=y.cloneNode(!0),y.setAttribute("border",Q));d=R?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!x&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))d=this.getHtml2(mxUtils.getXml(y),g,null!=k?k.getTitle():null,q,O);else if(x||-!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(v=null),k=this.getSvgFileProperties(y),d=this.getEmbeddedSvg(d,g,v,null,J,D,O,null,null,k.scale,k.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,k,v){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(d,v);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel"),+null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),1<y.getElementsByTagName("diagram").length&&null!=this.pages&&y.setAttribute("pages",this.pages.length));null!=V&&(y=y.cloneNode(!0),y.setAttribute("scale",V));null!=Q&&(y=y.cloneNode(!0),y.setAttribute("border",Q));d=R?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!x&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))d=this.getHtml2(mxUtils.getXml(y),g,null!=k?k.getTitle():null,q,P);else if(x||+!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(v=null),k=this.getSvgFileProperties(y),d=this.getEmbeddedSvg(d,g,v,null,J,D,P,null,null,k.scale,k.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,k,v){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(d,v);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel"),R=0<G.length?G[0]:null;G=D;null==R&&k?(R=mxUtils.getNodeValue(D),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(G=D.cloneNode(!1),G.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||k?G=D.cloneNode(!0):(G=D.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(R)));t.appendChild(G)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],A=x.node;if(x!=this.currentPage)if(x.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,J,null,v);EditorUi.removeChildNodes(A);A.appendChild(J);delete x.needsUpdate}else v&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,J,null,v),A=A.cloneNode(!1),A.appendChild(J)));d(A)}return t};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],v=0;v<d.length;v++){var t=d.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?@@ -13061,9 +13061,9 @@ null!=A[J].xmlValue&&(A[J].xmlValue="["+A[J].xmlValue.length+"]"),null!=A[J].styg){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),-mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){t=null!=t?t:!0;x=null!=x?x:!1;G=null!=G?G:!Editor.defaultCompressed;var O=this.editor.graph;if((g||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var y=-null!=this.pages?this.pages[0]:null;null==y||this.currentPage==y?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&O.setBackgroundImage(y.viewState.backgroundImage);O.getGlobalVariable=function(B){return"page"==B&&null!=y?y.getName():"pagenumber"==B?1:q.apply(this,arguments)};document.body.appendChild(O.container);null!=y&&O.model.setRoot(y.root)}A=null!=A?A:this.getXmlFileData(t,x,G,R);D=null!=D?D:this.getCurrentFile();d=this.createFileData(A,O,D,window.location.href,-d,g,k,v,t,J,G,V,Q);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return d};EditorUi.prototype.getHtml=function(d,g,k,v,t,x){x=null!=x?x:!0;var A=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var D=g.view.scale;x=Math.floor(A.x/D-g.view.translate.x);D=Math.floor(A.y/D-g.view.translate.y);A=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(J=EditorUi.drawHost+"/embed.js?s="+g));+mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){t=null!=t?t:!0;x=null!=x?x:!1;G=null!=G?G:!Editor.defaultCompressed;var P=this.editor.graph;if((g||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;var y=+null!=this.pages?this.pages[0]:null;null==y||this.currentPage==y?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&P.setBackgroundImage(y.viewState.backgroundImage);P.getGlobalVariable=function(B){return"page"==B&&null!=y?y.getName():"pagenumber"==B?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=y&&P.model.setRoot(y.root)}A=null!=A?A:this.getXmlFileData(t,x,G,R);D=null!=D?D:this.getCurrentFile();d=this.createFileData(A,P,D,window.location.href,+d,g,k,v,t,J,G,V,Q);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return d};EditorUi.prototype.getHtml=function(d,g,k,v,t,x){x=null!=x?x:!0;var A=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var D=g.view.scale;x=Math.floor(A.x/D-g.view.translate.x);D=Math.floor(A.y/D-g.view.translate.y);A=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(J=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",x);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=v&&d.setAttribute("edit",v));null!=t&&(t=t.replace(/&/g,"&"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";v=Graph.compress(d);Graph.decompress(v)!=d&&(v=encodeURIComponent(d));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+v+"</div>\n</div>\n"+(null==t?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,v,t){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,@@ -13073,20 +13073,20 @@ function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPagek={},0<d.length)){var v=this.getHashObject(),t=null;this.fileNode=g;this.pages=[];for(var x=0;x<d.length;x++){null==d[x].getAttribute("id")&&d[x].setAttribute("id",x);g=new DiagramPage(d[x]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[x+1]));this.pages.push(g);if(null==v.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=v.pageId&&g.getId()==v.pageId)t=g;if(null==k[g.getId()])k[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=null!=t?t:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(x=0;x<A.length;x++)g[A[x]]=!0;var J=this.editor.graph.getModel(),D=J.getChildren(J.root);for(x=0;x<D.length;x++){var G=D[x];J.setVisible(G,g[G.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=-g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var B=this.getBaseFilename(!t),C=B+("xml"==d||"pdf"==d&&R?".drawio":"")+"."+d;+g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var B=this.getBaseFilename(!t),C=B+("xml"==d||"pdf"==d&&R?".drawio":"")+"."+d;if("xml"==d){var M=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,t,null,null,null,g);this.saveData(C,d,M,"text/xml")}else if("html"==d)M=this.getHtml2(this.getFileData(!0),this.editor.graph,B),this.saveData(C,d,M,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?C=B+".png":"jpeg"==d&&(C=B+".jpg"),this.saveRequest(C,d,mxUtils.bind(this,function(L,N){try{return this.createDownloadRequest(L,d,v,N,A,t,J,D,G,R,V,void 0,-void 0,!x,Q,O,q,y)}catch(P){this.handleError(P)}}));else{var T=null,m=mxUtils.bind(this,function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(C,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var z=this.editor.graph.background;if(A||z==mxConstants.NONE)z=null;var I=this.editor.graph.getSvg(z,null,null,null,null,v);k&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,-mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();m(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else C=B+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();m(L)}),v)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y,B,C){d=this.downloadRequestBuilder(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y,B,C);g="";for(var M in d)k=d[M],null!=k&&(g+=M+"="+encodeURIComponent(k)+-"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y,B,C){var M=this.editor.graph,T=M.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var m=null,z=null,I=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==g&&(null!=R?(m=R.from,z=R.to):0==x&&(I=+void 0,!x,Q,P,q,y)}catch(O){this.handleError(O)}}));else{var T=null,m=mxUtils.bind(this,function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(C,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var z=this.editor.graph.background;if(A||z==mxConstants.NONE)z=null;var I=this.editor.graph.getSvg(z,null,null,null,null,v);k&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,+mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();m(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else C=B+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();m(L)}),v)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y,B,C){d=this.downloadRequestBuilder(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y,B,C);g="";for(var M in d)k=d[M],null!=k&&(g+=M+"="+encodeURIComponent(k)++"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y,B,C){var M=this.editor.graph,T=M.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var m=null,z=null,I=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==g&&(null!=R?(m=R.from,z=R.to):0==x&&(I="1"));"xmlpng"==g&&(G="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){m=x;break}x=M.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!t?t||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;t={globalVars:M.getExportVariables()};D&&(t.grid={size:M.gridSize,steps:M.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:M.view.gridColor});Graph.translateDiagram&&-(t.diagramLanguage=Graph.diagramLanguage);return{format:g,from:m,to:z,allPages:I,bg:null!=x?x:mxConstants.NONE,base64:v,embedXml:G,xml:k,filename:null!=d?d:"",extras:JSON.stringify(t),scale:A,border:J,pageMargin:q,w:V&&isFinite(V)?V:null,h:Q&&isFinite(Q)?Q:null,crop:null!=O&&O?"1":"0",fit:null!=y&&y?"1":"0",sheetsAcross:B,sheetsDown:C}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));+(t.diagramLanguage=Graph.diagramLanguage);return{format:g,from:m,to:z,allPages:I,bg:null!=x?x:mxConstants.NONE,base64:v,embedXml:G,xml:k,filename:null!=d?d:"",extras:JSON.stringify(t),scale:A,border:J,pageMargin:q,w:V&&isFinite(V)?V:null,h:Q&&isFinite(Q)?Q:null,crop:null!=P&&P?"1":"0",fit:null!=y&&y?"1":"0",sheetsAcross:B,sheetsDown:C}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var k=d.lastIndexOf("#");if(0<k){d=decodeURIComponent(d.substring(k+1));try{g=JSON.parse(d)}catch(v){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var k=g.lastIndexOf("#");0<k&&(g=g.substring(0,k));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(v){}0<k&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,k){var v=window.location.hash,t=mxUtils.bind(this,function(A){var J=null!=d.data?d.data:"";null!=A&&0<A.length&&(0<J.length&&(J+="\n"),J+=A);A=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return v};this.fileLoaded(A);"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Q){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,R=mxUtils.bind(this,function(){var Q=this.currentPage;-mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){Q===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),V()):this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),V=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(R,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){V();+mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){Q===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),V()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),V=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(R,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){V();R()}));V();R()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var x=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(x,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(d){function g(T){var m=new mxCellOverlay(T.image||t.warningImage,T.tooltip,T.align,T.valign,T.offset);m.addListener(mxEvent.CLICK,function(z,I){v.alert(T.tooltip)});return m}var k=null,v=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var t=this.editor.graph,x=t.getModel();x.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=x.getCell(d.getAttribute("id"));if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))x.setValue(J,G);else for(var R=G.attributes,V=0;V<R.length;V++)t.setAttributeForCell(J,R[V].nodeName,0<R[V].nodeValue.length?-R[V].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+J.id+": "+T)}try{var Q=d.getAttribute("style");null!=Q&&t.model.setStyle(J,Q)}catch(T){null!=window.console&&console.log("Error in style for "+J.id+": "+T)}try{var O=d.getAttribute("icon");if(null!=O){var q=0<O.length?JSON.parse(O):null;null!=q&&q.append||t.removeCellOverlays(J);null!=q&&t.addCellOverlay(J,g(q))}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}try{var y=d.getAttribute("geometry");+R[V].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+J.id+": "+T)}try{var Q=d.getAttribute("style");null!=Q&&t.model.setStyle(J,Q)}catch(T){null!=window.console&&console.log("Error in style for "+J.id+": "+T)}try{var P=d.getAttribute("icon");if(null!=P){var q=0<P.length?JSON.parse(P):null;null!=q&&q.append||t.removeCellOverlays(J);null!=q&&t.addCellOverlay(J,g(q))}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}try{var y=d.getAttribute("geometry");if(null!=y){y=JSON.parse(y);var B=t.getCellGeometry(J);if(null!=B){B=B.clone();for(key in y){var C=parseFloat(y[key]);"dx"==key?B.x+=C:"dy"==key?B.y+=C:"dw"==key?B.width+=C:"dh"==key?B.height+=C:B[key]=parseFloat(y[key])}t.model.setGeometry(J,B)}}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}}}else if("model"==d.nodeName){for(var M=d.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(d.firstChild)).decode(M,x)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(t.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(A=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{x.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var v=k.lastIndexOf(".");0<=v&&(d=k.substring(v),k=k.substring(0,v));if(g){g=k;var t=new Date;k=t.getFullYear();v=t.getMonth()+1;var x=t.getDate(),A=t.getHours(),J=t.getMinutes();t=t.getSeconds();k=g+(" "+(k+"-"+v+"-"+x+"-"+A+"-"+J+"-"+t))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.logIfModified=function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",[d])}catch(k){}};EditorUi.prototype.fileLoaded=function(d,g,k){var v=@@ -13107,14 +13107,14 @@ function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):thithis.openLibraries);break}t={file:d,images:g,title:k,expand:v};this.openLibraries.push(t)}else this.scratchpad=d;x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var A=null,J=mxUtils.bind(this,function(C,M){0==C.length&&d.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),M.appendChild(A)):this.addLibraryEntries(C,M)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),k,null!=v?v:!0,mxUtils.bind(this,function(C){J(g,C)}));null!=t&&(t.div=D);this.repositionLibrary(x,"L.scratchpad"!=d.getHash());v=D.parentNode.previousSibling;k=v.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=d.title&&v.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+k);var G=document.createElement("div");G.style.backgroundColor="inherit";v.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var V=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,-function(C){if(!mxEvent.isConsumed(C)){var M=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(d)});null!=V?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(C)}}));if(d.isEditable()){var Q=this.editor.graph,O=null;k=mxUtils.bind(this,function(C){this.showLibraryDialog(d.getTitle(),D,g,d,d.getMode());mxEvent.consume(C)});var q=mxUtils.bind(this,function(C){d.setModified(!0);-d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=R.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",G.insertBefore(O,G.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O)})):null==V&&(V=R.cloneNode(!1),V.setAttribute("src",Editor.saveImage),V.setAttribute("title",mxResources.get("save")),+function(C){if(!mxEvent.isConsumed(C)){var M=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(d)});null!=V?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(C)}}));if(d.isEditable()){var Q=this.editor.graph,P=null;k=mxUtils.bind(this,function(C){this.showLibraryDialog(d.getTitle(),D,g,d,d.getMode());mxEvent.consume(C)});var q=mxUtils.bind(this,function(C){d.setModified(!0);+d.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=R.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",P.style.marginTop="-2px",G.insertBefore(P,G.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==V&&(V=R.cloneNode(!1),V.setAttribute("src",Editor.saveImage),V.setAttribute("title",mxResources.get("save")),G.insertBefore(V,G.firstChild),mxEvent.addListener(V,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==V||d.isModified()||(V.parentNode.removeChild(V),V=null)});mxEvent.consume(M)})))}),y=mxUtils.bind(this,function(C,M,T,m){C=Q.cloneCells(mxUtils.sortCells(Q.model.getTopmostCells(C)));for(var z=0;z<C.length;z++){var I=Q.getCellGeometry(C[z]);null!=I&&I.translate(-M.x,-M.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(C,M.width,M.height,m||"",!0,null,!1));C=mxUtils.getXml(this.editor.graph.encodeCells(C));Editor.defaultCompressed&&(C=Graph.compress(C));M={xml:C,w:M.width,h:M.height};null!=m&&(M.title=m);g.push(M);q(T);null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)}),B=mxUtils.bind(this,function(C){if(Q.isSelectionEmpty())Q.getRubberband().isActive()?(Q.getRubberband().execute(C),Q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var M=Q.getSelectionCells(),T=Q.view.getBounds(M);if(null!=T&&0<T.width&&0<T.height){var m=Q.view.scale;T.x/=m;T.y/=m;T.width/=m;T.height/=m;T.x-=Q.view.translate.x;T.y-=Q.view.translate.y;y(M,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(C)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler.first&&(Q.graphHandler.suspend(),null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",Q.panningManager.stop(),Q.autoScroll=!1,mxEvent.consume(C))}),mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,Q.panningManager.stop(),Q.graphHandler.reset(),Q.isMouseDown=!1,Q.autoScroll=!0,B(C),mxEvent.consume(C))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.graphHandler.first&&(Q.graphHandler.resume(),null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",Q.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(C){D.style.backgroundColor="light-dark(#fefefe, #000000)";C.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()})),-mxEvent.addListener(D,"drop",mxUtils.bind(this,function(C){D.style.cursor="";D.style.backgroundColor="";0<C.dataTransfer.files.length&&this.importFiles(C.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,T,m,z,I,L,N,P,S){if(null!=M&&"image/"==T.substring(0,6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,I,L),M)],M[0].vertex=!0,y(M,new mxRectangle(0,0,I,L),C,mxEvent.isAltDown(C)?+mxEvent.addListener(D,"drop",mxUtils.bind(this,function(C){D.style.cursor="";D.style.backgroundColor="";0<C.dataTransfer.files.length&&this.importFiles(C.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,T,m,z,I,L,N,O,S){if(null!=M&&"image/"==T.substring(0,6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,I,L),M)],M[0].vertex=!0,y(M,new mxRectangle(0,0,I,L),C,mxEvent.isAltDown(C)?null:N.substring(0,N.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null);else{var U=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));J(Y,D);g=g.concat(Y);q(C);this.spinner.stop();U=!0}catch(fa){}else if("mxfile"==X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&y(ea,new mxRectangle(0,0,ca.width,ca.height),C)}U=!0}catch(fa){null!=window.console&&console.log("error in drop handler:",fa)}U||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)});null!=S&&null!=N&&EditorUi.isVisioFilename(N)?this.importVisio(S,function(X){W(X,"text/xml")},null,N):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,N)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?W(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),@@ -13129,25 +13129,25 @@ v?A:null,t),t.ignoreColor=!v,null!=J&&v&&(t.shadowVisible=J),this.editor.graph.mfunction(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,k,v,t,x,A){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",d)}catch(Q){}if(null!=D||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var G=mxResources.get("ok"),R=null;g=null!=g?g:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),R=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){A=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var V=null!=t?null:null!=x?x:window.location.hash;if(null!=V&&("#G"==V.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==V.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||-404==D.code||404==D.status)){V="#U"==V.substring(0,2)?V.substring(45,V.lastIndexOf("%26ex")):V.substring(2);this.showError(g,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+V);null!=v&&v()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Q(){B.innerText="";for(var C=0;C<O.length;C++){var M=document.createElement("option");mxUtils.write(M,O[C].displayName);M.value=C;B.appendChild(M);M=document.createElement("option");-M.innerHTML=" ";mxUtils.write(M,"<"+O[C].email+">");M.setAttribute("disabled","disabled");B.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=O.length;B.appendChild(M)}var O=this.drive.getUsersList(),q=document.createElement("div"),y=document.createElement("div");y.style.marginBottom="6px";mxUtils.write(y,mxResources.get("changeUser")+": ");q.appendChild(y);var B=document.createElement("select");B.style.width="100%";Q();mxEvent.addListener(B,-"change",mxUtils.bind(this,function(){var C=B.value,M=O.length!=C;M&&this.drive.setUser(O[C]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(O=this.drive.getUsersList(),Q())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));q.appendChild(B);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),+404==D.code||404==D.status)){V="#U"==V.substring(0,2)?V.substring(45,V.lastIndexOf("%26ex")):V.substring(2);this.showError(g,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+V);null!=v&&v()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Q(){B.innerText="";for(var C=0;C<P.length;C++){var M=document.createElement("option");mxUtils.write(M,P[C].displayName);M.value=C;B.appendChild(M);M=document.createElement("option");+M.innerHTML=" ";mxUtils.write(M,"<"+P[C].email+">");M.setAttribute("disabled","disabled");B.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=P.length;B.appendChild(M)}var P=this.drive.getUsersList(),q=document.createElement("div"),y=document.createElement("div");y.style.marginBottom="6px";mxUtils.write(y,mxResources.get("changeUser")+": ");q.appendChild(y);var B=document.createElement("select");B.style.width="100%";Q();mxEvent.addListener(B,+"change",mxUtils.bind(this,function(){var C=B.value,M=P.length!=C;M&&this.drive.setUser(P[C]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(P=this.drive.getUsersList(),Q())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));q.appendChild(B);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),520,150);return}}null!=D.message?A=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?A=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?A=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(A=mxUtils.htmlEntities(D,!1)))}t=d=null;null!=D&&null!=D.helpLink?(d=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(d=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+d+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(d=D.alternateAction.label,t=D.alternateAction.funct);this.showError(g,A,G,k,R,null,null,d,t,null,null,null,v?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,v,t,x){d=null!=d?d:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){A();null!=g&&g()},function(){A();null!=k&&k()},v,t,null,null,null,null,J);this.showDialog(d.container,340,46+J,!0,x);d.init()};EditorUi.prototype.showBanner=function(d,g,k,v,t,x,A,J,D){var G=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){x=null!=x?x:"bottom:10px;left:50%;";A=null!=A?A:"translate(-50%,120%)";J=null!=J?J:"translate(-50%,0%)";var R=t?500:1E3;G=t?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var V=document.createElement("div");V.style.cssText="position:absolute;"+x+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+G;mxUtils.setPrefixedStyle(V.style,"transform",A);mxUtils.setPrefixedStyle(V.style,"transition","all "+R+"ms ease");V.className="geBtn gePrimaryBtn"+(t?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(V.style,"box-shadow","1px 1px 2px 0px #ddd");null!=D&&mxUtils.setPrefixedStyle(V.style,"transform-origin",D);if(!t){var Q=document.createElement("img");Q.setAttribute("src",IMAGE_PATH+"/logo.png");Q.setAttribute("border","0");Q.setAttribute("align","absmiddle");Q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";V.appendChild(Q);Q=document.createElement("img");Q.setAttribute("src",Dialog.prototype.closeImage);Q.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));Q.setAttribute("border","0");Q.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";V.appendChild(Q)}mxUtils.write(V,-g);document.body.appendChild(V);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var O=document.createElement("input");O.setAttribute("type","checkbox");O.setAttribute("id","geDoNotShowAgainCheckbox");O.style.marginRight="6px";if(!v){g.appendChild(O);var q=document.createElement("label");q.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(q,-mxResources.get("doNotShowAgain"));g.appendChild(q);V.style.paddingBottom=t?"16px":"30px";V.appendChild(g)}var y=mxUtils.bind(this,function(){null!=V.parentNode&&(V.parentNode.removeChild(V),this.bannerShowing=!1,O.checked||v)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=Q&&mxEvent.addListener(Q,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,-"transform",A);window.setTimeout(mxUtils.bind(this,function(){y()}),R)});mxEvent.addListener(V,"click",mxUtils.bind(this,function(C){var M=mxEvent.getSource(C);M!=O&&M!=q?(null!=k&&k(),y(),mxEvent.consume(C)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,"transform",J)}),R/2);window.setTimeout(B,t?4E3:3E4);G=!0}return G};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};+g);document.body.appendChild(V);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var P=document.createElement("input");P.setAttribute("type","checkbox");P.setAttribute("id","geDoNotShowAgainCheckbox");P.style.marginRight="6px";if(!v){g.appendChild(P);var q=document.createElement("label");q.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(q,+mxResources.get("doNotShowAgain"));g.appendChild(q);V.style.paddingBottom=t?"16px":"30px";V.appendChild(g)}var y=mxUtils.bind(this,function(){null!=V.parentNode&&(V.parentNode.removeChild(V),this.bannerShowing=!1,P.checked||v)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=Q&&mxEvent.addListener(Q,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,+"transform",A);window.setTimeout(mxUtils.bind(this,function(){y()}),R)});mxEvent.addListener(V,"click",mxUtils.bind(this,function(C){var M=mxEvent.getSource(C);M!=P&&M!=q?(null!=k&&k(),y(),mxEvent.consume(C)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,"transform",J)}),R/2);window.setTimeout(B,t?4E3:3E4);G=!0}return G};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,v){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<v&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,v,t){var x="jpeg"==k?"jpg":k;v=this.getBaseFilename(v)+(null!=g?".drawio":"")+"."+x;d=this.createImageDataUri(d,g,k,t);this.saveData(v,x,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,v,t,x){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=v?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,k,v);else{var A=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);x=65==(J?parseInt(J[2],10):!1)?!1:x}if(x||this.isOffline()){A.href=URL.createObjectURL(v?this.base64ToBlob(d,k):new Blob([d],{type:k}));x?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},2E4),A.click(),A.parentNode.removeChild(A)}catch(D){}}else this.createEchoRequest(d,g,k,v,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,v,t,x){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,-d+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(v?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,k,v,t,x,A,J){x=null!=x?x:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var D=mxUtils.bind(this,function(R,V,Q,O){try{if("_blank"==V)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,v);else if(null!=k&&"text/html"==k.substring(0,9)){var q=new EmbedDialog(this,d);this.showDialog(q.container,-450,240,!0,!0);q.init()}else{var y=window.open("about:blank");null==y?mxUtils.popup(d,!0):(y.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),y.document.close())}else if(V==App.MODE_DEVICE||"download"==V)this.doSaveLocalFile(d,R,k,v,null,J);else if(null!=R&&0<R.length){var B=mxUtils.bind(this,function(C){try{this.exportFile(d,R,k,v,V,C)}catch(M){this.handleError(M)}});null!=O?B(O):this.pickFolder(V,B)}}catch(C){this.handleError(C)}});t=[];x||t.push(App.MODE_BROWSER);A||t.push("_blank");+d+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(v?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,k,v,t,x,A,J){x=null!=x?x:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var D=mxUtils.bind(this,function(R,V,Q,P){try{if("_blank"==V)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,v);else if(null!=k&&"text/html"==k.substring(0,9)){var q=new EmbedDialog(this,d);this.showDialog(q.container,+450,240,!0,!0);q.init()}else{var y=window.open("about:blank");null==y?mxUtils.popup(d,!0):(y.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),y.document.close())}else if(V==App.MODE_DEVICE||"download"==V)this.doSaveLocalFile(d,R,k,v,null,J);else if(null!=R&&0<R.length){var B=mxUtils.bind(this,function(C){try{this.exportFile(d,R,k,v,V,C)}catch(M){this.handleError(M)}});null!=P?B(P):this.pickFolder(V,B)}}catch(C){this.handleError(C)}});t=[];x||t.push(App.MODE_BROWSER);A||t.push("_blank");var G=new SaveDialog(this,g,mxUtils.bind(this,function(R,V,Q){D(R.value,V,R,Q);this.hideDialog(null,null,G.container)}),t,d,k,v);this.showDialog(G.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));G.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var v=window.open("about:blank");if(null==v||null==v.document)mxUtils.popup(d,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var x=mxUtils.parseXml(d).documentElement.style.backgroundColor;""!=x&&(t="background: "+x+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(x=k?d:btoa(unescape(encodeURIComponent(d))),v.document.write(t+'<img style="max-width:100%;" src="data:'+g+";base64,"+x+'"/></body></html>')):v.document.write(t+d+"</body></html>"):v.document.write(t+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");v.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(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(v){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),@@ -13162,66 +13162,67 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",t);this.editor.exportToCanvas(mxUtils.bind(this,function(J){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight="140px";J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){A.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(J)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(v)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,v,t){this.isLocalFileSave()?this.saveLocalFile(k,d,v,t,g):this.saveRequest(d,g,mxUtils.bind(this,function(x,A){return this.createEchoRequest(k,x,v,t,g,A)}),k,t,v)};EditorUi.prototype.saveRequest=function(d,g,k,v,t,x,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;var J=mxUtils.bind(this,-function(G,R,V,Q){if("_blank"==R||null!=G&&0<G.length){var O=k("_blank"==R?null:G,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=O&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?O.simulate(document,"_blank"):(V=mxUtils.bind(this,function(q){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=v)try{this.exportFile(v,G,x,!0,R,q)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),G,x,!0,R,q)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))}),null!=Q?V(Q):this.pickFolder(R,V)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,d,mxUtils.bind(this,function(G,R,V){J(G.value,R,G,V);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,+function(G,R,V,Q){if("_blank"==R||null!=G&&0<G.length){var P=k("_blank"==R?null:G,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=P&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?P.simulate(document,"_blank"):(V=mxUtils.bind(this,function(q){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=v)try{this.exportFile(v,G,x,!0,R,q)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),G,x,!0,R,q)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))}),null!=Q?V(Q):this.pickFolder(R,V)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,d,mxUtils.bind(this,function(G,R,V){J(G.value,R,G,V);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,v,t,x){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,v,t,x,-A,J,D,G,R,V,Q,O){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(L){Editor.addRetryToError(L,mxUtils.bind(this,function(){this.exportSvg(d,g,k,v,t,x,A,J,D,G,R,V,Q,O)}));this.handleError(L)})))try{var q=this.editor.graph.isSelectionEmpty();k=null!=k?k:q;var y=g?null:this.editor.graph.background;y==mxConstants.NONE&&(y=null);null==y&&0==g&&(y=this.editor.graph.shapeBackgroundColor);var B=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&-(this.editor.graph.addForeignObjectWarning=function(){});var C=this.editor.graph.createSvgImageExport(t),M=this.editor.graph.getSvg(y,d,A,J,null,k,null,C,"blank"==G?"_blank":"self"==G?"_top":null,null,!Q,R,V);this.editor.graph.addForeignObjectWarning=B;v&&this.editor.graph.addSvgShadow(M);var T=this.getBaseFilename()+(t?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(L){this.isLocalFileSave()||L.length<=MAX_REQUEST_SIZE?this.saveData(T,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(L)}))});var m=mxUtils.bind(this,function(L){this.spinner.stop();t&&L.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,d,A));O(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(L))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var z=mxUtils.bind(this,function(L){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(L);Editor.foreignObjectImages&&-Q?this.replaceAlternateContent(L,R,m):m(L)}),I=mxUtils.bind(this,function(L){x&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(L,z,this.thumbImageCache)):z(L)});Q?this.embedFonts(M,I):(this.editor.addFontCss(M),I(M))}catch(L){this.handleError(L)}};EditorUi.prototype.replaceAlternateContent=function(d,g,k){function v(V,Q,O,q,y){var B=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");B.setAttribute("x",Q);B.setAttribute("y",-O+.5);B.setAttribute("width",q.width);B.setAttribute("height",q.height);null==B.setAttributeNS?B.setAttribute("xlink:href",y):B.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",y);V.replaceChild(B,V.lastChild);J()}function t(){if(A<R.length)R[A++](t)}var x="";g=d.getElementsByTagName("style");for(var A=0;A<g.length;A++)x+=g[A].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var J=mxUtils.bind(this,function(){counter--;0==counter&&k(d)}),D={},G={},R=[];for(A=0;A<g.length;A++)mxUtils.bind(this,-function(V){var Q=V.getElementsByTagName("div");if(0<Q.length)try{var O=Q[0].cloneNode(!0),q=parseInt(O.style.marginLeft),y=parseInt(O.style.paddingTop),B=O.getElementsByTagName("div")[1],C=Q=!1,M=O.style.alignItems,T=O.style.justifyContent;if(null!=O.style.writingMode){var m=O.style.writingMode;C="vertical-"==m.substring(0,9);Q="-rl"==m.substring(m.length-3)}var z=!C&&"1px"==O.style.width||C&&"1px"==O.style.height;if(!C&&"1px"==O.style.height||C&&"1px"==O.style.width)O.style.alignItems=C&&Q?"unsafe flex-end":-"unsafe flex-start";z&&(O.style.justifyContent="unsafe flex-start");O.style.paddingTop="";O.style.marginLeft="";var I=O.outerHTML,L=D[I];null==L&&(O.style.position="absolute",O.style.visibility="hidden",document.body.appendChild(O),m=1,m="1px"==O.style.width?B.offsetWidth:parseInt(O.style.width),z=1,z="1px"==O.style.height?B.offsetHeight:parseInt(O.style.height),document.body.removeChild(O),L=new mxRectangle(q,y,m,z),D[I]=L);"1px"==O.style.height&&("unsafe center"==M?y-=L.height/2:"unsafe flex-end"==-M&&(y-=L.height));if("1px"==O.style.width)if(!C&&"unsafe center"==T||C&&"unsafe center"==M)q-=L.width/2;else if(!C&&"unsafe flex-end"==T||C&&(!Q&&"unsafe flex-end"==M||Q&&"unsafe flex-start"==M))q-=L.width;L=new mxRectangle(q,y,L.width,L.height+parseInt(B.style.fontSize)/4);R.push(mxUtils.bind(this,function(N){var P=G[I];null==P?Graph.htmlToPng(I,L.width,L.height,mxUtils.bind(this,function(S){v(V,q,y,L,S);G[I]=S;N()}),x):(v(V,q,y,L,P),N())}))}catch(N){J()}else J()})(g[A]);0==counter&&k(d);A=0;t()};-EditorUi.prototype.addRadiobox=function(d,g,k,v,t,x,A){return this.addCheckbox(d,k,v,t,x,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,v,t,x,A,J){x=null!=x?x:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();D.id=A;null!=J&&D.setAttribute("name",J);k&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);v&&D.setAttribute("disabled","disabled");x&&(d.appendChild(D),k=document.createElement("label"),-mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),t||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var v=this.getCurrentFile(),t="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className=-"geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));x.appendChild(v);var A=document.createElement("option");A.setAttribute("value","custom");mxUtils.write(A,mxResources.get("custom")+"...");x.appendChild(A);d.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var J=new FilenameDialog(this,t,mxResources.get("ok"),function(D){null!=D?(t=D,A.setAttribute("title",D)):(x.value="blank",A.removeAttribute("title"))},-mxResources.get("url"),null,null,null,null,function(){x.value="blank"});this.showDialog(J.container,300,80,!0,!1);J.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,function(){k.checked&&(null==g||g.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===x.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var J=-document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(J.style.border="1px solid black",J.style.backgroundColor=x):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(J)}mxUtils.write(d,mxResources.get("links")+":");var v=document.createElement("select");v.style.width="100px";v.style.padding="0px";-v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));v.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));v.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));v.appendChild(t);g&&(g=document.createElement("option"),-g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(g));d.appendChild(v);mxUtils.write(d,mxResources.get("borderColor")+":");var x="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(x||"none",function(D){x=D;k()});mxEvent.consume(J)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";-A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return x},getTarget:function(){return v.value},focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,v,t,x){x=null!=x?x:[];k&&(x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=v&&0<v.length&&x.push("edit="+encodeURIComponent(v)),-t&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));return x};EditorUi.prototype.createLink=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){var O=this.getCurrentFile();D=this.createUrlParameters(d,g,v,t,x,D);d=!0;null!=A?k="#U"+encodeURIComponent(A):J||null==O||""==O.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+O.getHash(),d=!1);d&&null!=O&&null!=O.getTitle()&&O.getTitle()!=-this.defaultFilename&&D.push("title="+encodeURIComponent(O.getTitle()));G&&1<k.length&&(D.push("open="+k.substring(1)),k="");R&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());V&&D.push("transparent=1");null!=Q&&D.push("dark="+Q);return(v&&(null!=A||null!=O&&O.getMode()!=App.MODE_GITHUB&&O.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+-"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){this.getBasenames();var O={};""!=t&&t!=mxConstants.NONE&&(O.highlight=t);"auto"!==v&&(O.target=v);G||(O.lightbox=!1);O.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(O.zoom=k/100);k=[];A&&(k.push("pages"),O.resize=!0,null!=this.pages&&null!=this.currentPage&&(O.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),O.resize=!0);J&&k.push("layers");D&&k.push("tags");-null!=Q&&(O["dark-mode"]=Q);0<k.length&&(G&&k.push("lightbox"),O.toolbar=k.join(" "));null!=R&&0<R.length&&(O.edit=R);null!=d?O.url=d:O.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(O))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";V(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":-EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,v){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(x);-var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");x=J.cloneNode(!0);x.setAttribute("value","copy");A.appendChild(x);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));-A.appendChild(D);mxUtils.br(A);A.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));A.appendChild(D);var G=this.getCurrentFile();null==k&&null!=G&&G.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),A.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId(),-G)})));x.setAttribute("checked","checked");null==k&&J.setAttribute("disabled","disabled");t.appendChild(A);A=380;var R=this.addLinkSection(t),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";V.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));V.appendChild(D);-D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");V.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+":");t.appendChild(V);mxUtils.br(t);A+=26;var Q=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft=-"4px";O.style.marginRight="12px";O.value="100%";t.appendChild(O);var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var y=y=this.addCheckbox(t,mxResources.get("allPages"),D,!D),B=this.addCheckbox(t,mxResources.get("layers"),!0),C=this.addCheckbox(t,mxResources.get("tags"),!0),M=this.addCheckbox(t,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(t,M);var m=T.getEditInput();m.style.marginBottom="16px";A+=50;mxEvent.addListener(M,-"change",function(){M.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");m.checked&&M.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,t,mxUtils.bind(this,function(){v(J.checked?k:null,Q.checked,O.value,R.getTarget(),R.getColor(),q.checked,y.checked,B.checked,C.checked,M.checked,null!=T?T.getLink():null,null!=V?V.value:null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);x.focus()};-EditorUi.prototype.showPublishLinkDialog=function(d,g,k,v,t,x,A,J,D,G,R){var V=document.createElement("div");V.style.whiteSpace="nowrap";var Q=document.createElement("h3");mxUtils.write(Q,d||mxResources.get("publish"));Q.style.width="100%";Q.style.textAlign="center";Q.style.marginTop="2px";Q.style.marginBottom="20px";V.appendChild(Q);var O=document.createElement("select");d=30;O.className="geBtn";O.style.marginBottom="8px";O.style.marginLeft="0px";O.style.width="100%";O.style.boxSizing="border-box";-if(null==J||""==J.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",Q=document.createElement("option"),mxUtils.write(Q,mxResources.get("makeCopy")),Q.setAttribute("value","copy"),O.appendChild(Q);Q=document.createElement("option");mxUtils.write(Q,mxResources.get("authorizationRequired"));Q.setAttribute("value","auth");O.appendChild(Q);null!=J&&""!=J.getHash()||Q.setAttribute("disabled","disabled");J=document.createElement("option");J.setAttribute("value","public");O.appendChild(J);-null!=A?(mxUtils.write(J,mxResources.get("publicDiagramUrl")),J.setAttribute("title",A),O.value="public"):(mxUtils.write(J,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),J.setAttribute("disabled","disabled"));V.appendChild(O);mxUtils.br(V);O.focus();var q=null,y=null;if(null!=g||null!=k)d+=30,mxUtils.write(V,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%",V.appendChild(q),mxUtils.write(V,mxResources.get("height")+":"),y=document.createElement("input"),y.setAttribute("type","text"),y.style.width="50px",y.style.marginLeft="6px",y.style.marginBottom="10px",y.value=k+"px",V.appendChild(y),mxUtils.br(V);var B=this.addLinkSection(V,v),C=G?this.addCheckbox(V,mxResources.get("transparentBackground"),!1):null;null!=C&&(d+=20);var M=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&-(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),M=this.addCheckbox(V,mxResources.get("selectedPage")+": "+g));var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));T.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));-T.appendChild(g);g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected","selected");T.appendChild(g);R&&(mxUtils.write(V,mxResources.get("appearance")+":"),V.appendChild(T),mxUtils.br(V),d+=30);var m=this.addCheckbox(V,mxResources.get("lightbox"),!0,null,null,!v),z=this.addEditButton(V,m),I=z.getEditInput();v&&(I.style.marginLeft=m.style.marginLeft,m.style.display="none",d-=20);var L=this.addCheckbox(V,mxResources.get("layers"),-!0);L.style.marginLeft=I.style.marginLeft;L.style.marginTop="8px";var N=this.addCheckbox(V,mxResources.get("tags"),!0);N.style.marginLeft=I.style.marginLeft;N.style.marginBottom="16px";N.style.marginTop="16px";mxEvent.addListener(m,"change",function(){m.checked?(L.removeAttribute("disabled"),I.removeAttribute("disabled"),N.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));I.checked&&m.checked?z.getEditSelect().removeAttribute("disabled"):-z.getEditSelect().setAttribute("disabled","disabled")});v=new CustomDialog(this,V,mxUtils.bind(this,function(){D(B.getTarget(),B.getColor(),null==M?!1:M.checked,m.checked,z.getLink(),L.checked,null!=q?q.value:null,null!=y?y.value:null,N.checked,O.value,null!=C?C.checked:!1,T.value)}),null,mxResources.get("create"),t,x);this.showDialog(v.container,340,296+d,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):null==-O.parentNode;B.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(t?"10":"4")+"px";x.appendChild(A);if(t){mxUtils.write(x,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";-J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";x.appendChild(J);mxUtils.write(x,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";x.appendChild(D);mxUtils.br(x)}var G=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=v?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),-Editor.defaultIncludeDiagram);A=this.editor.graph;var V=v?null:this.addCheckbox(x,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=V&&(V.style.marginBottom="16px");d=new CustomDialog(this,x,mxUtils.bind(this,function(){var Q=parseInt(J.value)/100||1,O=parseInt(D.value)||0;k(!G.checked,null!=R?R.checked:!1,null!=V?V.checked:!1,Q,O)}),null,d,g);this.showDialog(d.container,300,(t?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,-g,k,v,t,x,A,J,D){A=null!=A?A:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var R=this.editor.graph,V="jpeg"==J||"webp"==J?220:320,Q=document.createElement("h3");mxUtils.write(Q,d);Q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Q);mxUtils.write(G,mxResources.get("zoom")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft=-"4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";G.appendChild(O);mxUtils.write(G,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";G.appendChild(q);mxUtils.br(G);var y=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight=-"8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(Q=0;Q<d.length;Q++)if(!R.isSelectionEmpty()||"selectionOnly"!=d[Q]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[Q]));M.setAttribute("value",d[Q]);C.appendChild(M)}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(C),mxUtils.br(G),-V+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(y.checked=!0)})):x&&(G.appendChild(B),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),V+=30,mxEvent.addListener(y,"change",function(){y.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?D&&(y.style.display="none",y.nextSibling.style.display="none",y.nextSibling.nextSibling.style.display="none",V-=30):(C.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=-!0,mxEvent.addListener(y,"change",function(){C.value=y.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J&&"webp"!=J),m=document.createElement("select");m.style.maxWidth="260px";m.style.marginLeft="8px";m.style.marginTop="16px";x=document.createElement("option");x.setAttribute("value","light");mxUtils.write(x,mxResources.get("light"));m.appendChild(x);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,-mxResources.get("dark"));m.appendChild(D);"svg"==J?(x=document.createElement("option"),x.setAttribute("value","auto"),mxUtils.write(x,mxResources.get("automatic")),x.setAttribute("selected","selected"),m.appendChild(x)):Editor.isDarkMode()?D.setAttribute("selected","selected"):x.setAttribute("selected","selected");mxUtils.write(G,mxResources.get("appearance")+":");G.appendChild(m);mxUtils.br(G);V+=26;var z=this.addCheckbox(G,mxResources.get("shadow"),R.shadowVisible),I=null;if("png"==J||"jpeg"==J||-"webp"==J)I=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),V+=30;var L=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram")+":",A,null,null,"jpeg"!=J&&"webp"!=J),N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="28px";"png"==J||"svg"==J?(A=function(){L.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),-N.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),N.appendChild(R),L.style.marginBottom="12px",N.style.marginBottom="16px",G.appendChild(N),mxUtils.br(G),V+=20,null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(L,"change",A),A()):L.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");-var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");g&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,G.appendChild(P),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,G.appendChild(S),mxUtils.write(G,mxResources.get("embedFonts")),mxUtils.br(G),V+=50);var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";-x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));U.appendChild(x);A=document.createElement("option");A.setAttribute("value","blank");mxUtils.write(A,mxResources.get("openInNewWindow"));U.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");mxUtils.write(A,mxResources.get("openInThisWindow"));U.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display=-"none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(U),G.appendChild(A),mxUtils.br(G),mxUtils.br(G),V+=50);k=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=O.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=N.value;t(O.value,T.checked,!y.checked,z.checked,L.checked,P.checked&&g,q.value,B.checked,("png"==J||"svg"==J)&&"currentPage"==N.value,U.value,null!=I?I.checked:null,null!=-m?m.value:null,C.value,S.checked)}),null,k,v);this.showDialog(k.container,340,V,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var J=document.createElement("h3");mxUtils.write(J,g);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";-x.appendChild(J)}var D=this.addCheckbox(x,mxResources.get("fit"),!0),G=this.addCheckbox(x,mxResources.get("shadow"),A.shadowVisible&&v,!v),R=this.addCheckbox(x,k),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),Q=this.addEditButton(x,V),O=Q.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),y=this.addCheckbox(x,mxResources.get("layers"),q,!q);y.style.marginLeft=O.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(V,"change",function(){V.checked?-(q&&y.removeAttribute("disabled"),O.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&V.checked?Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){d(D.checked,G.checked,R.checked,V.checked,Q.getLink(),y.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=-function(d,g,k,v,t,x,A,J){function D(O){var q=" ",y="";v&&(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"+(null!=R?"&page="+R:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",y+=-"cursor:pointer;");d&&(y+="max-width:100%;");var B="";k&&(B=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');A('<img src="'+O+'"'+B+(""!=y?' style="'+y+'"':"")+q+"/>")}var G=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var q=v?this.getFileData(!0):null;O=this.createImageDataUri(O,q,"png");D(O)}),null,null,null,mxUtils.bind(this,function(O){J({message:mxResources.get("unknownError")})}),-null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),G.width*G.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var V="";k&&(V="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(v?"1":"0")+V+"&xml="+encodeURIComponent(g));Q.send(mxUtils.bind(this,function(){200<=Q.getStatus()&&299>=Q.getStatus()?D("data:image/png;base64,"+Q.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};-EditorUi.prototype.createEmbedSvg=function(d,g,k,v,t,x,A){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var R=D[G].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}v&&J.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(J);if(k){var V=" ",Q="";v&&(V="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"+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(O){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=Q?' style="'+Q+'"':"")+V+"/>")}))}else Q="",v&&(g=this.getSelectedPageIndex(),J.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('"++A,J,D,G,R,V,Q,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(O){Editor.addRetryToError(O,mxUtils.bind(this,function(){this.exportSvg(d,g,k,v,t,x,A,J,D,G,R,V,Q,P)}));this.handleError(O)})))try{var q=this.editor.graph.isSelectionEmpty();k=null!=k?k:q;var y=g?null:this.editor.graph.background;y==mxConstants.NONE&&(y=null);null==y&&0==g&&(y=this.editor.graph.shapeBackgroundColor);var B=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&+(this.editor.graph.addForeignObjectWarning=function(){});var C=mxUtils.lightDarkColorSupported,M=mxUtils.preferDarkColor;if("light"==R||"dark"==R)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==R;var T=this.editor.graph.createSvgImageExport(t),m=this.editor.graph.getSvg(y,d,A,J,null,k,null,T,"blank"==G?"_blank":"self"==G?"_top":null,null,!Q,R,V);mxUtils.lightDarkColorSupported=C;mxUtils.preferDarkColor=M;this.editor.graph.addForeignObjectWarning=B;v&&this.editor.graph.addSvgShadow(m);+var z=this.getBaseFilename()+(t?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,function(O){this.isLocalFileSave()||O.length<=MAX_REQUEST_SIZE?this.saveData(z,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(O)}))});var I=mxUtils.bind(this,function(O){this.spinner.stop();t&&O.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,d,A));P(Graph.xmlDeclaration++"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(O))});this.editor.graph.mathEnabled&&this.editor.addMathCss(m);var L=mxUtils.bind(this,function(O){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(O);Editor.foreignObjectImages&&Q?this.replaceAlternateContent(O,R,I):I(O)}),N=mxUtils.bind(this,function(O){x&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(O,L,this.thumbImageCache)):L(O)});Q?this.embedFonts(m,+N):(this.editor.addFontCss(m),N(m))}catch(O){this.handleError(O)}};EditorUi.prototype.replaceAlternateContent=function(d,g,k){function v(V,Q,P,q,y){var B=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");B.setAttribute("x",Q);B.setAttribute("y",P+.5);B.setAttribute("width",q.width);B.setAttribute("height",q.height);null==B.setAttributeNS?B.setAttribute("xlink:href",y):B.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",y);V.replaceChild(B,V.lastChild);J()}function t(){if(A<R.length)R[A++](t)}+var x="";g=d.getElementsByTagName("style");for(var A=0;A<g.length;A++)x+=g[A].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var J=mxUtils.bind(this,function(){counter--;0==counter&&k(d)}),D={},G={},R=[];for(A=0;A<g.length;A++)mxUtils.bind(this,function(V){var Q=V.getElementsByTagName("div");if(0<Q.length)try{var P=Q[0].cloneNode(!0),q=parseInt(P.style.marginLeft),y=parseInt(P.style.paddingTop),B=P.getElementsByTagName("div")[1],C=Q=!1,M=P.style.alignItems,T=P.style.justifyContent;+if(null!=P.style.writingMode){var m=P.style.writingMode;C="vertical-"==m.substring(0,9);Q="-rl"==m.substring(m.length-3)}var z=!C&&"1px"==P.style.width||C&&"1px"==P.style.height;if(!C&&"1px"==P.style.height||C&&"1px"==P.style.width)P.style.alignItems=C&&Q?"unsafe flex-end":"unsafe flex-start";z&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var I=P.outerHTML,L=D[I];null==L&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),+m=1,m="1px"==P.style.width?B.offsetWidth:parseInt(P.style.width),z=1,z="1px"==P.style.height?B.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),L=new mxRectangle(q,y,m,z),D[I]=L);"1px"==P.style.height&&("unsafe center"==M?y-=L.height/2:"unsafe flex-end"==M&&(y-=L.height));if("1px"==P.style.width)if(!C&&"unsafe center"==T||C&&"unsafe center"==M)q-=L.width/2;else if(!C&&"unsafe flex-end"==T||C&&(!Q&&"unsafe flex-end"==M||Q&&"unsafe flex-start"==M))q-=L.width;L=new mxRectangle(q,y,+L.width,L.height+parseInt(B.style.fontSize)/4);R.push(mxUtils.bind(this,function(N){var O=G[I];null==O?Graph.htmlToPng(I,L.width,L.height,mxUtils.bind(this,function(S){v(V,q,y,L,S);G[I]=S;N()}),x):(v(V,q,y,L,O),N())}))}catch(N){J()}else J()})(g[A]);0==counter&&k(d);A=0;t()};EditorUi.prototype.addRadiobox=function(d,g,k,v,t,x,A){return this.addCheckbox(d,k,v,t,x,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,v,t,x,A,J){x=null!=x?x:!0;var D=document.createElement("input");D.style.marginRight=+"8px";D.style.marginTop="16px";D.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();D.id=A;null!=J&&D.setAttribute("name",J);k&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);v&&D.setAttribute("disabled","disabled");x&&(d.appendChild(D),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),t||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);+k.style.marginLeft="24px";var v=this.getCurrentFile(),t="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className="geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));x.appendChild(v);var A=document.createElement("option");A.setAttribute("value",+"custom");mxUtils.write(A,mxResources.get("custom")+"...");x.appendChild(A);d.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var J=new FilenameDialog(this,t,mxResources.get("ok"),function(D){null!=D?(t=D,A.setAttribute("title",D)):(x.value="blank",A.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){x.value="blank"});this.showDialog(J.container,300,80,!0,!1);J.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,+function(){k.checked&&(null==g||g.checked)?x.removeAttribute("disabled"):x.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return k.checked?"blank"===x.value?"_blank":t:null},getEditInput:function(){return k},getEditSelect:function(){return x}}};EditorUi.prototype.addLinkSection=function(d,g){function k(){var J=document.createElement("div");J.style.width="100%";J.style.height="100%";J.style.boxSizing="border-box";null!=x&&x!=mxConstants.NONE?(J.style.border="1px solid black",+J.style.backgroundColor=x):(J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");A.innerText="";A.appendChild(J)}mxUtils.write(d,mxResources.get("links")+":");var v=document.createElement("select");v.style.width="100px";v.style.padding="0px";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));+v.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));v.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));v.appendChild(t);g&&(g=document.createElement("option"),g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(g));d.appendChild(v);mxUtils.write(d,mxResources.get("borderColor")++":");var x="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(x||"none",function(D){x=D;k()});mxEvent.consume(J)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return x},getTarget:function(){return v.value},+focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,v,t,x){x=null!=x?x:[];k&&(x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=v&&0<v.length&&x.push("edit="+encodeURIComponent(v)),t&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));return x};EditorUi.prototype.createLink=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){var P=this.getCurrentFile();D=this.createUrlParameters(d,+g,v,t,x,D);d=!0;null!=A?k="#U"+encodeURIComponent(A):J||null==P||""==P.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+P.getHash(),d=!1);d&&null!=P&&null!=P.getTitle()&&P.getTitle()!=this.defaultFilename&&D.push("title="+encodeURIComponent(P.getTitle()));G&&1<k.length&&(D.push("open="+k.substring(1)),k="");R&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());V&&D.push("transparent=1");+null!=Q&&D.push("dark="+Q);return(v&&(null!=A||null!=P&&P.getMode()!=App.MODE_GITHUB&&P.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){this.getBasenames();var P={};""!=t&&t!=mxConstants.NONE&&(P.highlight=t);"auto"!==v&&(P.target=v);G||(P.lightbox=+!1);P.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(P.zoom=k/100);k=[];A&&(k.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),P.resize=!0);J&&k.push("layers");D&&k.push("tags");null!=Q&&(P["dark-mode"]=Q);0<k.length&&(G&&k.push("lightbox"),P.toolbar=k.join(" "));null!=R&&0<R.length&&(P.edit=R);null!=d?P.url=d:P.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'++(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";V(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")++'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,v){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(x);var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";+J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");x=J.cloneNode(!0);x.setAttribute("value","copy");A.appendChild(x);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(D);mxUtils.br(A);A.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));A.appendChild(D);var G=this.getCurrentFile();null==k&&null!=G&&G.constructor==window.DriveFile&&(D=+document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),A.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId(),G)})));x.setAttribute("checked","checked");null==k&&J.setAttribute("disabled","disabled");t.appendChild(A);A=380;var R=this.addLinkSection(t),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";+V.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");V.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")++":");t.appendChild(V);mxUtils.br(t);A+=26;var Q=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");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="100%";t.appendChild(P);var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var y=y=this.addCheckbox(t,mxResources.get("allPages"),D,!D),B=this.addCheckbox(t,mxResources.get("layers"),+!0),C=this.addCheckbox(t,mxResources.get("tags"),!0),M=this.addCheckbox(t,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(t,M);var m=T.getEditInput();m.style.marginBottom="16px";A+=50;mxEvent.addListener(M,"change",function(){M.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");m.checked&&M.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,t,mxUtils.bind(this,+function(){v(J.checked?k:null,Q.checked,P.value,R.getTarget(),R.getColor(),q.checked,y.checked,B.checked,C.checked,M.checked,null!=T?T.getLink():null,null!=V?V.value:null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,v,t,x,A,J,D,G,R){var V=document.createElement("div");V.style.whiteSpace="nowrap";var Q=document.createElement("h3");mxUtils.write(Q,d||mxResources.get("publish"));Q.style.width="100%";Q.style.textAlign="center";+Q.style.marginTop="2px";Q.style.marginBottom="20px";V.appendChild(Q);var P=document.createElement("select");d=30;P.className="geBtn";P.style.marginBottom="8px";P.style.marginLeft="0px";P.style.width="100%";P.style.boxSizing="border-box";if(null==J||""==J.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",Q=document.createElement("option"),mxUtils.write(Q,mxResources.get("makeCopy")),Q.setAttribute("value","copy"),P.appendChild(Q);Q=document.createElement("option");mxUtils.write(Q,+mxResources.get("authorizationRequired"));Q.setAttribute("value","auth");P.appendChild(Q);null!=J&&""!=J.getHash()||Q.setAttribute("disabled","disabled");J=document.createElement("option");J.setAttribute("value","public");P.appendChild(J);null!=A?(mxUtils.write(J,mxResources.get("publicDiagramUrl")),J.setAttribute("title",A),P.value="public"):(mxUtils.write(J,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),J.setAttribute("disabled","disabled"));V.appendChild(P);+mxUtils.br(V);P.focus();var q=null,y=null;if(null!=g||null!=k)d+=30,mxUtils.write(V,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%",V.appendChild(q),mxUtils.write(V,mxResources.get("height")+":"),y=document.createElement("input"),y.setAttribute("type","text"),y.style.width="50px",y.style.marginLeft="6px",y.style.marginBottom=+"10px",y.value=k+"px",V.appendChild(y),mxUtils.br(V);var B=this.addLinkSection(V,v),C=G?this.addCheckbox(V,mxResources.get("transparentBackground"),!1):null;null!=C&&(d+=20);var M=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),M=this.addCheckbox(V,mxResources.get("selectedPage")+": "+g));var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft=+"8px";T.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));T.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));T.appendChild(g);g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected","selected");T.appendChild(g);R&&(mxUtils.write(V,mxResources.get("appearance")+":"),V.appendChild(T),+mxUtils.br(V),d+=30);var m=this.addCheckbox(V,mxResources.get("lightbox"),!0,null,null,!v),z=this.addEditButton(V,m),I=z.getEditInput();v&&(I.style.marginLeft=m.style.marginLeft,m.style.display="none",d-=20);var L=this.addCheckbox(V,mxResources.get("layers"),!0);L.style.marginLeft=I.style.marginLeft;L.style.marginTop="8px";var N=this.addCheckbox(V,mxResources.get("tags"),!0);N.style.marginLeft=I.style.marginLeft;N.style.marginBottom="16px";N.style.marginTop="16px";mxEvent.addListener(m,"change",function(){m.checked?+(L.removeAttribute("disabled"),I.removeAttribute("disabled"),N.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));I.checked&&m.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});v=new CustomDialog(this,V,mxUtils.bind(this,function(){D(B.getTarget(),B.getColor(),null==M?!1:M.checked,m.checked,z.getLink(),L.checked,null!=q?q.value:null,null!=y?y.value:+null,N.checked,P.value,null!=C?C.checked:!1,T.value)}),null,mxResources.get("create"),t,x);this.showDialog(v.container,340,296+d,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):null==P.parentNode;B.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText=+"width:100%;text-align:center;margin-top:0px;margin-bottom:"+(t?"10":"4")+"px";x.appendChild(A);if(t){mxUtils.write(x,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";x.appendChild(J);mxUtils.write(x,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight=+"16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";x.appendChild(D);mxUtils.br(x)}var G=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=v?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var V=v?null:this.addCheckbox(x,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=V&&(V.style.marginBottom="16px");+d=new CustomDialog(this,x,mxUtils.bind(this,function(){var Q=parseInt(J.value)/100||1,P=parseInt(D.value)||0;k(!G.checked,null!=R?R.checked:!1,null!=V?V.checked:!1,Q,P)}),null,d,g);this.showDialog(d.container,300,(t?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,v,t,x,A,J,D){A=null!=A?A:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var R=this.editor.graph,V="jpeg"==J||"webp"==J?220:320,Q=document.createElement("h3");mxUtils.write(Q,+d);Q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Q);mxUtils.write(G,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%";G.appendChild(P);mxUtils.write(G,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight=+"16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";G.appendChild(q);mxUtils.br(G);var y=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";d=["selectionOnly","diagram",+"page"];for(Q=0;Q<d.length;Q++)if(!R.isSelectionEmpty()||"selectionOnly"!=d[Q]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[Q]));M.setAttribute("value",d[Q]);C.appendChild(M)}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(C),mxUtils.br(G),V+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(y.checked=!0)})):x&&(G.appendChild(B),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),V+=30,mxEvent.addListener(y,"change",function(){y.checked?+B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?D&&(y.style.display="none",y.nextSibling.style.display="none",y.nextSibling.nextSibling.style.display="none",V-=30):(C.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=!0,mxEvent.addListener(y,"change",function(){C.value=y.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J&&"webp"!=J),m=document.createElement("select");+m.style.maxWidth="260px";m.style.marginLeft="8px";m.style.marginTop="16px";x=document.createElement("option");x.setAttribute("value","light");mxUtils.write(x,mxResources.get("light"));m.appendChild(x);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));m.appendChild(D);"svg"==J&&mxUtils.lightDarkColorSupported?(x=document.createElement("option"),x.setAttribute("value","auto"),mxUtils.write(x,mxResources.get("automatic")),x.setAttribute("selected",+"selected"),m.appendChild(x)):Editor.isDarkMode()?D.setAttribute("selected","selected"):x.setAttribute("selected","selected");mxUtils.write(G,mxResources.get("appearance")+":");G.appendChild(m);mxUtils.br(G);V+=26;var z=this.addCheckbox(G,mxResources.get("shadow"),R.shadowVisible),I=null;if("png"==J||"jpeg"==J||"webp"==J)I=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),V+=30;var L=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram")+":",A,null,+null,"jpeg"!=J&&"webp"!=J),N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="28px";"png"==J||"svg"==J?(A=function(){L.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),N.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),N.appendChild(R),L.style.marginBottom=+"12px",N.style.marginBottom="16px",G.appendChild(N),mxUtils.br(G),V+=20,null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(L,"change",A),A()):L.style.marginBottom="16px";var O=document.createElement("input");O.style.marginBottom="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");g&&(O.checked=null!=this.lastEmbedImages?this.lastEmbedImages:+!0,G.appendChild(O),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,G.appendChild(S),mxUtils.write(G,mxResources.get("embedFonts")),mxUtils.br(G),V+=50);var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));U.appendChild(x);A=document.createElement("option");A.setAttribute("value",+"blank");mxUtils.write(A,mxResources.get("openInNewWindow"));U.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");mxUtils.write(A,mxResources.get("openInThisWindow"));U.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display="none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(U),G.appendChild(A),mxUtils.br(G),mxUtils.br(G),V+=50);k=new CustomDialog(this,G,mxUtils.bind(this,+function(){this.lastExportBorder=q.value;this.lastExportZoom=P.value;this.lastEmbedImages=O.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=N.value;t(P.value,T.checked,!y.checked,z.checked,L.checked,O.checked&&g,q.value,B.checked,("png"==J||"svg"==J)&&"currentPage"==N.value,U.value,null!=I?I.checked:null,null!=m?m.value:null,C.value,S.checked)}),null,k,v);this.showDialog(k.container,340,V,!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(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var J=document.createElement("h3");mxUtils.write(J,g);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(J)}var D=this.addCheckbox(x,mxResources.get("fit"),!0),G=this.addCheckbox(x,mxResources.get("shadow"),A.shadowVisible&&v,!v),R=this.addCheckbox(x,+k),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),Q=this.addEditButton(x,V),P=Q.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),y=this.addCheckbox(x,mxResources.get("layers"),q,!q);y.style.marginLeft=P.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(V,"change",function(){V.checked?(q&&y.removeAttribute("disabled"),P.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&V.checked?+Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){d(D.checked,G.checked,R.checked,V.checked,Q.getLink(),y.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,v,t,x,A,J){function D(P){var q=" ",y="";v&&(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"+(null!=R?"&page="+R:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",y+="cursor:pointer;");d&&(y+="max-width:100%;");var B="";k&&(B=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');A('<img src="'+P+'"'+B+(""!=y?' style="'+y+'"':"")+q+"/>")}var G=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(P){var q=v?this.getFileData(!0):null;P=+this.createImageDataUri(P,q,"png");D(P)}),null,null,null,mxUtils.bind(this,function(P){J({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),G.width*G.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var V="";k&&(V="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(v?"1":"0")+V+"&xml="+encodeURIComponent(g));Q.send(mxUtils.bind(this,function(){200<=Q.getStatus()&&+299>=Q.getStatus()?D("data:image/png;base64,"+Q.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,v,t,x,A){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var R=D[G].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}v&&+J.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(J);if(k){var V=" ",Q="";v&&(V="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"+(t?"&edit=_blank":"")+(x?"&layers=1":+"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(P){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=Q?' style="'+Q+'"':"")+V+"/>")}))}else Q="",v&&(g=this.getSelectedPageIndex(),J.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!=g?"&page="+g:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),Q+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),t=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+t),Q+="max-width:100%;max-height:"+t+"px;",J.removeAttribute("height")),""!=Q&&J.setAttribute("style",Q),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),A(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d=Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=d;else if("mxfile"==d.nodeName){var v=d.getElementsByTagName("diagram");if(0<v.length){k=v[0];var t=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:t.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}v=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(x){}finally{this.editor.graph=v}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};@@ -13229,20 +13230,20 @@ EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=d){if(d!0),x),A=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(x.getStylesheet());var J=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&x.setBackgroundImage(D.viewState.backgroundImage);x.getGlobalVariable=function(G){return"page"==G?D.getName():"pagenumber"==G?1:J.apply(this,arguments)};document.body.appendChild(x.container);x.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=G.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(A));d(R.substring(R.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(V){null!=g&&g(V)}}),null,null,null,mxUtils.bind(this,function(G){null!=g&&g(G)}),null,null,v,null,x.shadowVisible,null,x,t,null,null,null,"diagram",null)}catch(G){null!=g&&g(G)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){J=null!=J?J:!0;R=null!=R?R:0;A=null!=D?D:g.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==g.getAdaptiveColors()&&(A="#ffffff");D=this.editor.graph.createSvgImageExport(null!=d);x=g.getSvg(A,G,R,null,null,x,null,D,null,g.shadowVisible||V,null,Q,"diagram");(g.shadowVisible||V)&&g.addSvgShadow(x,null,null,0==R);null!=d&&x.setAttribute("content",d);null!=k&&x.setAttribute("resource",-k);var O=mxUtils.bind(this,function(q){q=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});g.mathEnabled&&this.editor.addMathCss(x);if(null!=t)this.embedFonts(x,mxUtils.bind(this,function(q){J?this.editor.convertImages(q,mxUtils.bind(this,function(y){O(y)})):O(q)}));else return O(x)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(v){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(d,g,k,v,t,x,A,J,D,G,R,V,Q)}));this.handleError(q)}))){var O=this.editor.graph.isSelectionEmpty();-k=null!=k?k:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,J,null,null,null,null,null,d,x):null,D,null==this.pages||0==this.pages.length,R)}catch(y){this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,d||1,g,v,null,null,x,A,G,V,Q)}catch(q){this.spinner.stop(),this.handleError(q)}}};+k);var P=mxUtils.bind(this,function(q){q=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});g.mathEnabled&&this.editor.addMathCss(x);if(null!=t)this.embedFonts(x,mxUtils.bind(this,function(q){J?this.editor.convertImages(q,mxUtils.bind(this,function(y){P(y)})):P(q)}));else return P(x)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(v){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(d,g,k,v,t,x,A,J,D,G,R,V,Q)}));this.handleError(q)}))){var P=this.editor.graph.isSelectionEmpty();+k=null!=k?k:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,J,null,null,null,null,null,d,x):null,D,null==this.pages||0==this.pages.length,R)}catch(y){this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,d||1,g,v,null,null,x,A,G,V,Q)}catch(q){this.spinner.stop(),this.handleError(q)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,k,v,t,x,A){g=null!=g?g:0;k=null!=k?k:0;var J=[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var R=this.editor.extractGraphModel(G.documentElement,-null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var V=R.getElementsByTagName("diagram");if(1==V.length&&!x){if(R=Editor.parseDiagramNode(V[0]),null!=this.currentPage&&(d[V[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Q=V[0].getAttribute("name");null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,Q))}}else if(0<V.length){x=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[V[0].getAttribute("id")]=-this.pages[0].getId(),Q=V[0].getAttribute("name"),null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],Q)),R=Editor.parseDiagramNode(V[0]),v=!1,O=1);for(;O<V.length;O++){var q=V[O].getAttribute("id");V[O].removeAttribute("id");var y=this.updatePageRoot(new DiagramPage(V[O]));d[q]=V[O].getAttribute("id");var B=this.pages.length;null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[B+1]));D.model.execute(new ChangePage(this,y,y,B,!0));x.push(y)}this.updatePageLinks(d,-x)}}if(null!=R&&"mxGraphModel"===R.nodeName){J=D.importGraphModel(R,g,k,v);if(null!=J)for(this.addLocalPagesToMapping(d),O=0;O<J.length;O++)this.updatePageLinksForCell(d,J[O]);var C=D.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=C&&null!=C.originalSrc){this.updateBackgroundPageLink(d,C);var M=new ChangePageSetup(this,null,C);M.ignoreColor=!0;D.model.execute(M)}}A&&D.pasteCellStyles(D.includeDescendants(J),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(T){if(t)throw T;+null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var V=R.getElementsByTagName("diagram");if(1==V.length&&!x){if(R=Editor.parseDiagramNode(V[0]),null!=this.currentPage&&(d[V[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Q=V[0].getAttribute("name");null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,Q))}}else if(0<V.length){x=[];var P=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[V[0].getAttribute("id")]=+this.pages[0].getId(),Q=V[0].getAttribute("name"),null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],Q)),R=Editor.parseDiagramNode(V[0]),v=!1,P=1);for(;P<V.length;P++){var q=V[P].getAttribute("id");V[P].removeAttribute("id");var y=this.updatePageRoot(new DiagramPage(V[P]));d[q]=V[P].getAttribute("id");var B=this.pages.length;null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[B+1]));D.model.execute(new ChangePage(this,y,y,B,!0));x.push(y)}this.updatePageLinks(d,+x)}}if(null!=R&&"mxGraphModel"===R.nodeName){J=D.importGraphModel(R,g,k,v);if(null!=J)for(this.addLocalPagesToMapping(d),P=0;P<J.length;P++)this.updatePageLinksForCell(d,J[P]);var C=D.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=C&&null!=C.originalSrc){this.updateBackgroundPageLink(d,C);var M=new ChangePageSetup(this,null,C);M.ignoreColor=!0;D.model.execute(M)}}A&&D.pasteCellStyles(D.includeDescendants(J),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(T){if(t)throw T;this.handleError(T)}return J};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=function(d,g){var k=document.createElement("div"),v=this.editor.graph,t=v.getLinkForCell(g);null!=t&&v.setLinkForCell(g,this.updatePageLink(d,t));if(v.isHtmlLabel(g)){k.innerHTML=Graph.sanitizeHtml(v.getLabel(g));for(var x=k.getElementsByTagName("a"),A=!1,J=0;J<x.length;J++)t=x[J].getAttribute("href"),null!=t&&(x[J].setAttribute("href",this.updatePageLink(d,t)),A=!0);A&&v.labelChanged(g,k.innerHTML)}for(J=0;J<v.model.getChildCount(g);J++)this.updatePageLinksForCell(d,v.model.getChildAt(g,J))};EditorUi.prototype.updatePageLink=function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var v=JSON.parse(g.substring(17));if(null!=v.actions){for(var t=0;t<v.actions.length;t++){var x=v.actions[t];if(null!=x.open&&Graph.isPageLink(x.open)){var A=x.open.substring(x.open.indexOf(",")+1);k=d[A];null!=k?x.open="data:page/id,"+k:null==this.getPageById(A)&&delete x.open}}g="data:action/json,"+JSON.stringify(v)}}catch(J){}return g};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,v,t){var x=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){v=null!=v?v:d.name;var J=mxUtils.bind(this,function(G){A.clear()&&x(G)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(v);-try{var R=v.lastIndexOf(".");if(0<=R&&R<v.length)v.substring(R+1).toUpperCase();else{var V=v.lastIndexOf("/");0<=V&&V<v.length&&(v=v.substring(V+1))}}catch(O){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())J({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,v);var Q=new XMLHttpRequest;Q.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":""));Q.responseType="blob";this.addRemoteServiceSecurityCheck(Q);-null!=t&&Q.setRequestHeader("x-convert-custom",t);Q.onreadystatechange=mxUtils.bind(this,function(){if(4==Q.readyState&&A.clear())if(200<=Q.status&&299>=Q.status)try{var O=Q.response;if("text/xml"==O.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{g(y.target.result)}catch(B){J({message:mxResources.get("errorLoadingFile")})}});q.readAsText(O)}else this.doImportVisio(O,g,J,v)}catch(y){J(y)}else try{""==Q.responseType||"text"==Q.responseType?J({message:Q.responseText}):(q=new FileReader,-q.onload=function(){try{J({message:JSON.parse(q.result).Message})}catch(y){J(y)}},q.readAsText(Q.response))}catch(y){J({})}});Q.send(G)}else if(A.clear())try{this.doImportVisio(d,g,J,v)}catch(O){J(O)}}else J({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,J))}),x)};EditorUi.prototype.importGraphML=function(d,g,k){var v=+try{var R=v.lastIndexOf(".");if(0<=R&&R<v.length)v.substring(R+1).toUpperCase();else{var V=v.lastIndexOf("/");0<=V&&V<v.length&&(v=v.substring(V+1))}}catch(P){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())J({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,v);var Q=new XMLHttpRequest;Q.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":""));Q.responseType="blob";this.addRemoteServiceSecurityCheck(Q);+null!=t&&Q.setRequestHeader("x-convert-custom",t);Q.onreadystatechange=mxUtils.bind(this,function(){if(4==Q.readyState&&A.clear())if(200<=Q.status&&299>=Q.status)try{var P=Q.response;if("text/xml"==P.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{g(y.target.result)}catch(B){J({message:mxResources.get("errorLoadingFile")})}});q.readAsText(P)}else this.doImportVisio(P,g,J,v)}catch(y){J(y)}else try{""==Q.responseType||"text"==Q.responseType?J({message:Q.responseText}):(q=new FileReader,+q.onload=function(){try{J({message:JSON.parse(q.result).Message})}catch(y){J(y)}},q.readAsText(Q.response))}catch(y){J({})}});Q.send(G)}else if(A.clear())try{this.doImportVisio(d,g,J,v)}catch(P){J(P)}}else J({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,J))}),x)};EditorUi.prototype.importGraphML=function(d,g,k){var v=mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&v(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,g,v)}catch(J){x(J)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),v)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.createTimeout(null,mxUtils.bind(this,function(k){var v=mxUtils.bind(this,function(x){k.clear()&&g(x)}),t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(d)||v({message:mxResources.get("unknownError")})}catch(x){v(x)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,v))}),g)}};EditorUi.prototype.convertLucidChart=function(d,g,k){var v=mxUtils.bind(this,function(t){this.loadingExtensions=!1;@@ -13250,19 +13251,19 @@ null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,funnull!=J.thumb&&D.push(J.thumb);console.log.apply(console,D)}}catch(R){}}catch(R){null!=window.console&&console.error(R),x(R)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(A,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",A,null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),v)};EditorUi.prototype.createMermaidXml=function(d,g,k,v,t,x){var A=new Graph(document.createElement("div"));k=A.insertVertex(null,null,null,0,0,v,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");A.setAttributeForCell(k,"mermaidData",JSON.stringify({data:d,config:g},null,2));null!=x&&A.setAttributeForCell(k,"templatePrompt",x);d=(new mxCodec).encode(A.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,k){var v=0,t=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(x){var A=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),J=mxUtils.bind(this,function(D){x.clear()&&k(D)});A.send(mxUtils.bind(this,function(D){if(x.isAlive())if(200<=D.getStatus()&&299>=D.getStatus())this.tryAndHandle(mxUtils.bind(this,-function(){var R=mxUtils.trim(D.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(V,Q,O){this.tryAndHandle(mxUtils.bind(this,function(){x.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresult:",R),g(R,V,Q,O))}),J)}),J,mxUtils.bind(this,function(V){3>v++?x.clear()&&t():J(V)}))}),J);else{var G={message:mxResources.get("error")+" "+D.getStatus()};try{G=JSON.parse(D.getText()),G=G.error}catch(R){}J(G)}}),J)}),k)});t()};EditorUi.prototype.extractMermaidDeclaration=+function(){var R=mxUtils.trim(D.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(V,Q,P){this.tryAndHandle(mxUtils.bind(this,function(){x.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresult:",R),g(R,V,Q,P))}),J)}),J,mxUtils.bind(this,function(V){3>v++?x.clear()&&t():J(V)}))}),J);else{var G={message:mxResources.get("error")+" "+D.getStatus()};try{G=JSON.parse(D.getText()),G=G.error}catch(R){}J(G)}}),J)}),k)});t()};EditorUi.prototype.extractMermaidDeclaration=function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)");d=mxUtils.trim(1>=g.length?d:g[1]);g=d.split("\n");var k=1<g.length?g[1]:null;if(null!=k){var v=k.indexOf("-");0<v&&(k=k.substring(0,v))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))g.shift(),d=mxUtils.trim(g.join("\n")),g=d.split("\n");k=g[0].split(" ")[0].replace(/:$/,"");v=k.indexOf("-");0<v&&(k=k.substring(0,v));try{"mindmap"==k&&2<g.length&&(d=extractMermaidMindmap(g))}catch(t){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(d=null);return d};EditorUi.prototype.generateMermaidImage=function(d,g,k,v,t){var x=mxUtils.bind(this,function(J){this.loadingMermaid=!1;null!=v?v(J):this.handleError(J)}),A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);g.securityLevel="strict";g.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var J=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var G=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<G.length&&"error"!=-G[0].getAttribute("aria-roledescription")){var R=parseFloat(G[0].getAttribute("width")),V=parseFloat(G[0].getAttribute("height"));if(isNaN(R)||isNaN(V))try{var Q=G[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(Q[2]);V=parseFloat(Q[3])}catch(O){R=R||100,V=V||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),R,V)}else null!=t?t():v({message:mxResources.get("invalidInput")})}catch(O){v(O)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),+G[0].getAttribute("aria-roledescription")){var R=parseFloat(G[0].getAttribute("width")),V=parseFloat(G[0].getAttribute("height"));if(isNaN(R)||isNaN(V))try{var Q=G[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(Q[2]);V=parseFloat(Q[3])}catch(P){R=R||100,V=V||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),R,V)}else null!=t?t():v({message:mxResources.get("invalidInput")})}catch(P){v(P)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d).then(function(D){J(D.svg)}).catch(function(D){null!=t?t(D):v(D)})}catch(D){v(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(J){this.importXml(J,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",A,null,null,null,x)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,v){function t(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(J){r="";for(i=0;i<J.length;i+=3)r=i+2==J.length?r+t(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+t(J.charCodeAt(i),0,0):r+t(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var R=new Image;R.onload=function(){try{var V=R.width,Q=R.height;-if(0==V&&0==Q){var O=D.result,q=O.indexOf(","),y=decodeURIComponent(escape(atob(O.substring(q+1)))),B=mxUtils.parseXml(y).getElementsByTagName("svg");0<B.length&&(V=parseFloat(B[0].getAttribute("width")),Q=parseFloat(B[0].getAttribute("height")))}k(D.result,V,Q)}catch(C){v(C)}};R.src=D.result};D.onerror=function(G){v(G)}}else v(J)};A.onerror=function(J){v(J)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var v=this.editor.graph,t=null;v.getModel().beginUpdate();try{t=v.insertVertex(null,+if(0==V&&0==Q){var P=D.result,q=P.indexOf(","),y=decodeURIComponent(escape(atob(P.substring(q+1)))),B=mxUtils.parseXml(y).getElementsByTagName("svg");0<B.length&&(V=parseFloat(B[0].getAttribute("width")),Q=parseFloat(B[0].getAttribute("height")))}k(D.result,V,Q)}catch(C){v(C)}};R.src=D.result};D.onerror=function(G){v(G)}}else v(J)};A.onerror=function(J){v(J)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var v=this.editor.graph,t=null;v.getModel().beginUpdate();try{t=v.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(t,!0)}finally{v.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(d,g,k,v,t,x,A,J){x=null!=x?x:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Q.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,g,k,x,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,g,k,x,!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var R=this.importXml(G,g,k,x,!0,J);if(0<R.length)return R}catch(Q){}this.loadImage(d,mxUtils.bind(this,function(Q){if("data:"==d.substring(0,5))this.resizeImage(Q,d,mxUtils.bind(this,function(y,B,C){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),-D.snap(k),B,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(y)+";"))}),A,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/Q.width,this.maxImageSize/Q.height)),q=Math.round(Q.width*O);Q=Math.round(Q.height*O);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),D.snap(k),q,Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++D.snap(k),B,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(y)+";"))}),A,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/Q.width,this.maxImageSize/Q.height)),q=Math.round(Q.width*P);Q=Math.round(Q.height*P);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),D.snap(k),q,Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";"))}}),mxUtils.bind(this,function(){var Q=null;D.getModel().beginUpdate();try{Q=D.insertVertex(D.getDefaultParent(),null,d,D.snap(g),D.snap(k),1,1,"text;"+(v?"html=1;":"")),D.updateCellSize(Q),D.fireEvent(new mxEventObject("textInserted","cells",[Q]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Q)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,x,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(Q){this.editor.graph.setSelectionCells(this.importXml(Q,g,k,x,null,J))}),mxUtils.bind(this,function(Q){this.handleError(Q)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(g),D.snap(k),1,1,"text;whiteSpace=wrap;"+(v?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));v&&(d=D.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");t.value=d;D.updateCellSize(t);if(0<this.maxTextWidth&&t.geometry.width>this.maxTextWidth){var V=D.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=V.width;t.geometry.height=V.height}Graph.isLink(t.value)&&D.setLinkForCell(t,t.value);t.geometry.width+=D.gridSize;t.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=@@ -13272,58 +13273,58 @@ mxUtils.bind(this,function(A,J,D){StorageFile.getFileContent(this,A,J,D)});windomxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var t=this.dialog,x=t.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=v;x.apply(t,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,g,k){var v=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var A=0,J,D=!1;x.forEach(function(G,R){G=R.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,R.async("string").then(function(V){0==V.indexOf("<mxfile ")?g(V):k()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>A&&(A=G,J=R))});0<A?J.async("string").then(function(G){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(G,d.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):v.parseFileData(G,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?g(R.responseText):k())}),d.name):k()}):D||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,k))};EditorUi.prototype.importFile=function(d,g,k,v,t,x,A,-J,D,G,R,V){G=null!=G?G:!0;var Q=!1,O=null,q=mxUtils.bind(this,function(y){var B=null;null!=y&&"<mxlibrary"==y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,y,A)),this.showSidebar()):B=this.importXml(y,k,v,G,null,null!=V?mxEvent.isControlDown(V):null);null!=J&&J(B)});"image"==g.substring(0,5)?(D=!1,"image/png"==g.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(d),null!=R&&0<R.length&&(O=this.importXml(R,k,v,G,null,null!=V?mxEvent.isControlDown(V):null),D=!0)),D||(D=this.editor.graph,-R=d.indexOf(";"),0<R&&(d=d.substring(0,R)+d.substring(d.indexOf(",",R+1))),G&&D.isGridEnabled()&&(k=D.snap(k),v=D.snap(v)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(R+="editableCssRules=.*;"),O=[D.insertVertex(null,null,"",k,v,t,x,R+"image="+d+";")])):/(\.*<graphml )/.test(d)?(Q=!0,this.importGraphML(d,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(Q=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&-this.isRemoteFileFormat(d,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Q=!0,g=mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?q(y.responseText):null!=J&&(J(null),this.showError(mxResources.get("error"),413==y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,A):this.parseFile(D,g,A)):0==d.indexOf("PK")&&null!=D?(Q=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){O=-this.insertTextAt(this.validateFileData(d),k,v,!0,null,G);J(O)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(O=this.insertTextAt(this.validateFileData(d),k,v,!0,null,G,null,null!=V?mxEvent.isControlDown(V):null));Q||null==J||J(O);return O};EditorUi.prototype.importFiles=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){v=null!=v?v:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var O=null!=g&&null!=k,q=!0;g=null!=g?g:0;k=null!=k?k:0;var y=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var B=R||+J,D,G,R,V){G=null!=G?G:!0;var Q=!1,P=null,q=mxUtils.bind(this,function(y){var B=null;null!=y&&"<mxlibrary"==y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,y,A)),this.showSidebar()):B=this.importXml(y,k,v,G,null,null!=V?mxEvent.isControlDown(V):null);null!=J&&J(B)});"image"==g.substring(0,5)?(D=!1,"image/png"==g.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(d),null!=R&&0<R.length&&(P=this.importXml(R,k,v,G,null,null!=V?mxEvent.isControlDown(V):null),D=!0)),D||(D=this.editor.graph,+R=d.indexOf(";"),0<R&&(d=d.substring(0,R)+d.substring(d.indexOf(",",R+1))),G&&D.isGridEnabled()&&(k=D.snap(k),v=D.snap(v)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(R+="editableCssRules=.*;"),P=[D.insertVertex(null,null,"",k,v,t,x,R+"image="+d+";")])):/(\.*<graphml )/.test(d)?(Q=!0,this.importGraphML(d,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(Q=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&+this.isRemoteFileFormat(d,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Q=!0,g=mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?q(y.responseText):null!=J&&(J(null),this.showError(mxResources.get("error"),413==y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,A):this.parseFile(D,g,A)):0==d.indexOf("PK")&&null!=D?(Q=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){P=+this.insertTextAt(this.validateFileData(d),k,v,!0,null,G);J(P)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(P=this.insertTextAt(this.validateFileData(d),k,v,!0,null,G,null,null!=V?mxEvent.isControlDown(V):null));Q||null==J||J(P);return P};EditorUi.prototype.importFiles=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){v=null!=v?v:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var P=null!=g&&null!=k,q=!0;g=null!=g?g:0;k=null!=k?k:0;var y=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var B=R||this.resampleThreshold,C=0;C<d.length;C++)if("image/svg"!==d[C].type.substring(0,9)&&"image/"===d[C].type.substring(0,6)&&d[C].size>B){y=!0;break}var M=mxUtils.bind(this,function(){var T=this.editor.graph,m=T.gridSize;t=null!=t?t:mxUtils.bind(this,function(S,U,W,X,Z,Y,ba,ea,ca){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,ba)),this.showSidebar(),null;this.isCompatibleString(S)&&1==d.length&&null!=Q&&"drop"==Q.type&&this.isBlankFile()&&-!this.canUndo()&&(O=!1,X=W=0);return this.importFile(S,U,W,X,Z,Y,ba,ea,ca,O,V,Q)}catch(fa){return this.handleError(fa),null}});x=null!=x?x:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,I=z,L=[],N=mxUtils.bind(this,function(S,U){L[S]=U;if(0==--I){this.spinner.stop();if(null!=J)J(L);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<L.length;S++){var X=L[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}x(W)}}),-P=0;P<z;P++)mxUtils.bind(this,function(S){var U=d[S];if(null!=U){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==A||A(U))try{if("image/"==U.type.substring(0,6))if("image/svg"==U.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=V?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&+!this.canUndo()&&(P=!1,X=W=0);return this.importFile(S,U,W,X,Z,Y,ba,ea,ca,P,V,Q)}catch(fa){return this.handleError(fa),null}});x=null!=x?x:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,I=z,L=[],N=mxUtils.bind(this,function(S,U){L[S]=U;if(0==--I){this.spinner.stop();if(null!=J)J(L);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<L.length;S++){var X=L[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}x(W)}}),+O=0;O<z;O++)mxUtils.bind(this,function(S){var U=d[S];if(null!=U){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==A||A(U))try{if("image/"==U.type.substring(0,6))if("image/svg"==U.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=V?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?N(S,mxUtils.bind(this,function(){try{if(null!=ea){var pa=ea.getElementsByTagName("svg");if(0<pa.length){var oa=pa[0],ha=oa.getAttribute("width"),xa=oa.getAttribute("height");ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;xa=null!=xa&&"%"!=xa.charAt(xa.length-1)?parseFloat(xa):NaN;var qa=oa.getAttribute("viewBox");if(null==qa||0==qa.length)oa.setAttribute("viewBox","0 0 "+ha+" "+xa);else if(isNaN(ha)||isNaN(xa)){var ua=qa.split(" ");3<ua.length&&(ha=parseFloat(ua[2]),xa=parseFloat(ua[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var ya=Math.min(1,Math.min(v/Math.max(1,ha)),v/Math.max(1,xa)),ja=t(Z,U.type,g+S*m,k+S*m,Math.max(1,Math.round(ha*ya)),Math.max(1,Math.round(xa*ya)),U.name);if(null!=ja&&(isNaN(ha)||isNaN(xa))){var ma=new Image;ma.onload=mxUtils.bind(this,function(){ha=Math.max(1,ma.width);xa=Math.max(1,ma.height);ja[0].geometry.width=ha;ja[0].geometry.height=xa;oa.setAttribute("viewBox","0 0 "+ha+" "+xa);Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var ka=Z.indexOf(";");0<ka&&(Z=Z.substring(0,ka)+Z.substring(Z.indexOf(",",ka+1)));T.setCellStyles("image",Z,[ja[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(oa))}return ja}}}catch(ka){}return null})):N(S,mxUtils.bind(this,function(){return t(aa,"text/xml",g+S*m,k+S*m,0,0,U.name)}))}else N(S,mxUtils.bind(this,function(){return null}))}else{Y=!1;if("image/png"==U.type){var da=V?null:this.extractGraphModelFromPng(X.target.result);if(null!=da&&0<da.length){var ia=new Image;ia.src=X.target.result;N(S,mxUtils.bind(this,function(){return t(da,"text/xml",g+S*m,k+S*m,ia.width,ia.height,U.name)}));Y=!0}}Y||(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(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(oa,ha,xa){N(S,mxUtils.bind(this,function(){if(null!=oa&&oa.length<G){var qa=q&&this.isResampleImageSize(U.size,R)?Math.min(1,Math.min(v/ha,v/xa)):1;return t(oa,U.type,g+S*m,k+S*m,Math.round(ha*qa),Math.round(xa*qa),U.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,v,R,U.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=-X.target.result,t(Z,U.type,g+S*m,k+S*m,240,160,U.name,function(pa){N(S,function(){return pa})},U)}catch(pa){N(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,U)}else N(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(U.name)?t(null,U.type,g+S*m,k+S*m,240,160,U.name,function(X){N(S,function(){return X})},U):"image"==U.type.substring(0,5)||"application/pdf"==U.type?W.readAsDataURL(U):W.readAsText(U)}})(P)});if(y){y=[];for(C=0;C<d.length;C++)y.push(d[C]);+X.target.result,t(Z,U.type,g+S*m,k+S*m,240,160,U.name,function(pa){N(S,function(){return pa})},U)}catch(pa){N(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,U)}else N(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(U.name)?t(null,U.type,g+S*m,k+S*m,240,160,U.name,function(X){N(S,function(){return X})},U):"image"==U.type.substring(0,5)||"application/pdf"==U.type?W.readAsDataURL(U):W.readAsText(U)}})(O)});if(y){y=[];for(C=0;C<d.length;C++)y.push(d[C]);d=y;this.confirmImageResize(function(T){q=T;M()},D)}else M()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(x,A){if(x||g)mxSettings.setResizeImages(x?A:null),mxSettings.save();k();d(A)};null==v||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){t(x,!0)},function(x){t(x,!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?226:200,!0,!0):t(!1,v)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,g,k)});v.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var v=new XMLHttpRequest;v.open("POST",OPEN_URL);v.setRequestHeader("Content-Type","application/x-www-form-urlencoded");v.onreadystatechange=function(){g(v)};v.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};-EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,v,t,x,A){t=null!=t?t:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height),G=g;if(v&&this.isResampleImageSize(null!=A?A:g.length,x))try{var R=Math.max(J/t,D/t);if(1<R){var V=Math.round(J/R),Q=Math.round(D/R),O=document.createElement("canvas");O.width=V;O.height=Q;O.getContext("2d").drawImage(d,0,0,V,Q);var q=O.toDataURL();if(q.length<g.length){var y=+EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,v,t,x,A){t=null!=t?t:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height),G=g;if(v&&this.isResampleImageSize(null!=A?A:g.length,x))try{var R=Math.max(J/t,D/t);if(1<R){var V=Math.round(J/R),Q=Math.round(D/R),P=document.createElement("canvas");P.width=V;P.height=Q;P.getContext("2d").drawImage(d,0,0,V,Q);var q=P.toDataURL();if(q.length<g.length){var y=document.createElement("canvas");y.width=V;y.height=Q;var B=y.toDataURL();q!==B&&(g=q,J=V,D=Q)}}}catch(C){}v&&G!=g&&t>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(d,g,k,v,t/1.5,x,A):k(g,J,D)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var v=new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;g(v)};null!=k&&(v.onerror=k);v.src=d}catch(t){if(null!=k)k(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var l=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());l.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,k=g.isEnabled;g.isEnabled=function(){return k.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(m){var z=m.getEvent();return null==m.getState()&&!mxEvent.isMouseEvent(z)&&-!g.freehand.isDrawing()||mxEvent.isPopupTrigger(z)&&(null==m.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))});g.cellEditor.editPlantUmlData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(N,L.format,function(P,S,U){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==L.format)g.labelChanged(m,"<pre>"+P+"</pre>"),g.updateCellSize(m,-!0);else{g.setCellStyles("image",d.convertDataUri(P),[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=S,W.height=U,g.cellsResized([m],[W],!1))}g.setAttributeForCell(m,"plantUmlData",JSON.stringify({data:N,format:L.format}))}finally{g.getModel().endUpdate()}},function(P){d.handleError(P)})},null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};g.cellEditor.editMermaidData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,-function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(N,L.config,function(P,S,U){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",P,[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,U),g.cellsResized([m],[W],!1));g.setAttributeForCell(m,"mermaidData",JSON.stringify({data:N,config:L.config},null,2))}finally{g.getModel().endUpdate()}},function(P){d.handleError(P)})},+!g.freehand.isDrawing()||mxEvent.isPopupTrigger(z)&&(null==m.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))});g.cellEditor.editPlantUmlData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(N,L.format,function(O,S,U){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==L.format)g.labelChanged(m,"<pre>"+O+"</pre>"),g.updateCellSize(m,+!0);else{g.setCellStyles("image",d.convertDataUri(O),[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=S,W.height=U,g.cellsResized([m],[W],!1))}g.setAttributeForCell(m,"plantUmlData",JSON.stringify({data:N,format:L.format}))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};g.cellEditor.editMermaidData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,+function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(N,L.config,function(O,S,U){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",O,[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,U),g.cellsResized([m],[W],!1));g.setAttributeForCell(m,"mermaidData",JSON.stringify({data:N,config:L.config},null,2))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};var v=g.cellEditor.startEditing;g.cellEditor.startEditing=function(m,z){try{var I=this.graph.getAttributeForCell(m,"plantUmlData");if(null!=I)this.editPlantUmlData(m,z,I);else if(I=this.graph.getAttributeForCell(m,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(m,z,I);else{var L=g.getCellStyle(m);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(m):v.apply(this,arguments)}}catch(N){d.handleError(N)}};g.getLinkTitle=function(m){return d.getLinkTitle(m)};g.customLinkClicked=function(m,z){var I=!1;try{var L=this.getGraphBounds();d.handleCustomLink(m,z);I=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(z))}catch(N){d.handleError(N)}return I};var t=g.parseBackgroundImage;g.parseBackgroundImage=function(m){var z=t.apply(this,arguments);null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src});return z};var x=g.setBackgroundImage;g.setBackgroundImage=function(m){null!=m&&null!=m.originalSrc&&(m=d.createImageForPageLink(m.originalSrc,d.currentPage,this));x.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(m,z){m=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=m){var I=m.indexOf(",");if(0<I)for(m=m.substring(I+1),z=z.getProperty("patches"),I=0;I<z.length;I++)if(null!=z[I][EditorUi.DIFF_UPDATE]&&null!=z[I][EditorUi.DIFF_UPDATE][m]||null!=z[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(z[I][EditorUi.DIFF_REMOVE],m)){g.refreshBackgroundImage();break}}}));var A=g.getBackgroundImageObject;g.getBackgroundImageObject=function(m,z){var I=A.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=z?d.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(m){m=null!=m?m:"";"1"==urlParams.dev&&(m+=(0<m.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=g.addClickHandler;g.addClickHandler=function(m,z,I){var L=z;z=-function(N,P,S){if(null==P){var U=mxEvent.getSource(N);"a"==U.nodeName.toLowerCase()&&(P=U.getAttribute("href"))}null!=P&&g.isCustomLink(P)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&g.customLinkClicked(P,S)&&mxEvent.consume(N);null!=L&&L(N,P,S)};D.call(this,m,z,I)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(m,z,I){g.isSelectionEmpty()&&+function(N,O,S){if(null==O){var U=mxEvent.getSource(N);"a"==U.nodeName.toLowerCase()&&(O=U.getAttribute("href"))}null!=O&&g.isCustomLink(O)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&g.customLinkClicked(O,S)&&mxEvent.consume(N);null!=L&&L(N,O,S)};D.call(this,m,z,I)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(m,z,I){g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(m,["zoomIn","zoomOut","-"],null,I);G.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(m,["-","addToScratchpad"],null,I);g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(m,["-","exitGroup","home"],null,I)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(m,z,I){if(d.editor.graph.isSelectionEmpty())R.apply(this,arguments),d.menus.addMenuItems(m,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(m,z,I):this.addPopupMenuArrangeItems(m,z,I),this.addMenuItems(m,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(m,z,I),this.addMenuItems(m,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(z)&&g.isCellEditable(z)&&(this.addSubmenu("editCell",m,null,mxResources.get("edit")),m.addSeparator(),g.getModel().isEdge(z))){this.addSubmenu("line",m);var L=g.getModel().getGeometry(z);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(m,["clearWaypoints"],null,I)}1==g.getSelectionCount()&&this.addMenuItems(m,["enterGroup"],null,I);L=d.getSelectionState();null!=L.mergeCell?this.addMenuItem(m,"mergeCells"):(1<L.style.colspan||1<L.style.rowspan)&&this.addMenuItem(m,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var V=g.getExportVariables;g.getExportVariables=function(){var m=V.apply(this,arguments),z=d.getCurrentFile();null!=z&&(m.filename=z.getTitle());m.pagecount=null!=d.pages?d.pages.length:1;m.page=null!=d.currentPage?d.currentPage.getName():"";m.pagenumber=null!=d.pages&&null!=d.currentPage?-mxUtils.indexOf(d.pages,d.currentPage)+1:1;return m};var Q=g.getGlobalVariable;g.getGlobalVariable=function(m){var z=d.getCurrentFile();return"filename"==m&&null!=z?z.getTitle():"page"==m&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==m?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==m?null!=d.pages?d.pages.length:1:Q.apply(this,arguments)};var O=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var m=this.getCurrentFile(),-z=null!=m&&null!=m.getTitle()?m.getTitle():this.defaultFilename;O!=z&&m==q&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());O=z;q=m}));var y=g.labelLinkClicked;g.labelLinkClicked=function(m,z,I){var L=z.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))y.apply(this,arguments);else{if(!g.isEnabled()||null!=m&&g.isCellLocked(m.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=+mxUtils.indexOf(d.pages,d.currentPage)+1:1;return m};var Q=g.getGlobalVariable;g.getGlobalVariable=function(m){var z=d.getCurrentFile();return"filename"==m&&null!=z?z.getTitle():"page"==m&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==m?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==m?null!=d.pages?d.pages.length:1:Q.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var m=this.getCurrentFile(),+z=null!=m&&null!=m.getTitle()?m.getTitle():this.defaultFilename;P!=z&&m==q&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());P=z;q=m}));var y=g.labelLinkClicked;g.labelLinkClicked=function(m,z,I){var L=z.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))y.apply(this,arguments);else{if(!g.isEnabled()||null!=m&&g.isCellLocked(m.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var m=d.defaultFilename,z=d.getCurrentFile();null!=z&&(m=null!=z.getTitle()?z.getTitle():m);return m};var B=this.actions.get("print");B.setEnabled(!mxClient.IS_IOS||!navigator.standalone);B.visible=B.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&g.addListener(mxEvent.ESCAPE,function(m,z){null!=z&&g.isEnabled()&&!g.isEditing()&&null!=z.getProperty("event")&&d.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(m){var z=g.cellEditor.text2,I=null;null!=z&&(mxEvent.addListener(z,"dragleave",function(L){null!=I&&(I.parentNode.removeChild(I),I=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(L){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(z));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(z,"drop",mxUtils.bind(this,function(L){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,-0,0,this.maxImageSize,function(P,S,U,W,X,Z){g.insertImage(P,X,Z)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var S=0;S<P.length;S++)P[S]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var N=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(P){var S=Math.max(1,P.width);P=Math.max(1,P.height);var U=this.maxImageSize;U=Math.min(1,-Math.min(U/Math.max(1,S)),U/Math.max(1,P));g.insertImage(decodeURIComponent(N),S*U,P*U)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){B=+0,0,this.maxImageSize,function(O,S,U,W,X,Z){g.insertImage(O,X,Z)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var S=0;S<O.length;S++)O[S]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var N=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(O){var S=Math.max(1,O.width);O=Math.max(1,O.height);var U=this.maxImageSize;U=Math.min(1,+Math.min(U/Math.max(1,S)),U/Math.max(1,O));g.insertImage(decodeURIComponent(N),S*U,O*U)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){B=this.editor.graph.view;var C=mxSettings.getUnit();B.setUnit(C);Editor.pageSizeUnit=C==mxConstants.METERS?mxConstants.MILLIMETERS:C;B.addListener("unitChanged",function(m,z){m=z.getProperty("unit");mxSettings.setUnit(m);mxSettings.save();Editor.pageSizeUnit=m==mxConstants.METERS?mxConstants.MILLIMETERS:m});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,B.unit);this.refresh()}if("1"==urlParams.styledev){B=document.getElementById("geFooter");null!=B&&(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)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(m,z){0<this.editor.graph.getSelectionCount()?(m=this.editor.graph.getSelectionCell(),m=this.editor.graph.getModel().getStyle(m),this.styleInput.value=m||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var M=this.isSelectionAllowed;this.isSelectionAllowed=function(m){return mxEvent.getSource(m)==this.styleInput?!0:M.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var T=null;mxEvent.addListener(g.container,"dragleave",function(m){g.isEnabled()&&(null!=T&&(T.parentNode.removeChild(T),T=null),m.stopPropagation(),m.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(m){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(g.container));-null!=this.sidebar&&this.sidebar.hideTooltip();m.stopPropagation();m.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(m){null!=T&&(T.parentNode.removeChild(T),T=null);if(g.isEnabled()){var z=mxUtils.convertPoint(g.container,mxEvent.getClientX(m),mxEvent.getClientY(m)),I=m.dataTransfer.files,L=g.view.translate,N=g.view.scale,P=z.x/N-L.x,S=z.y/N-L.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(m)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&-this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(m)&&(S=P=null),this.importFiles(I,P,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(m),null,null,mxEvent.isShiftDown(m),m));else{mxEvent.isAltDown(m)&&(S=P=0);var U=0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):null;z=this.extractGraphModelFromEvent(m,null!=this.pages);if(null!=z)g.setSelectionCells(this.importXml(z,P,S,!0));else if(0<=mxUtils.indexOf(m.dataTransfer.types,+null!=this.sidebar&&this.sidebar.hideTooltip();m.stopPropagation();m.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(m){null!=T&&(T.parentNode.removeChild(T),T=null);if(g.isEnabled()){var z=mxUtils.convertPoint(g.container,mxEvent.getClientX(m),mxEvent.getClientY(m)),I=m.dataTransfer.files,L=g.view.translate,N=g.view.scale,O=z.x/N-L.x,S=z.y/N-L.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(m)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&+this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(m)&&(S=O=null),this.importFiles(I,O,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(m),null,null,mxEvent.isShiftDown(m),m));else{mxEvent.isAltDown(m)&&(S=O=0);var U=0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):null;z=this.extractGraphModelFromEvent(m,null!=this.pages);if(null!=z)g.setSelectionCells(this.importXml(z,O,S,!0));else if(0<=mxUtils.indexOf(m.dataTransfer.types,"text/html")){var W=m.dataTransfer.getData("text/html");z=document.createElement("div");z.innerHTML=Graph.sanitizeHtml(W);var X=null;I=z.getElementsByTagName("img");null!=I&&1==I.length?(W=I[0].getAttribute("src"),null==W&&(W=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(X=!0)):(I=z.getElementsByTagName("a"),null!=I&&1==I.length?W=I[0].getAttribute("href"):(z=z.getElementsByTagName("pre"),null!=z&&1==z.length&&(W=mxUtils.getTextContent(z[0]))));var Z=!0,Y=mxUtils.bind(this,-function(){g.setSelectionCells(this.insertTextAt(W,P,S,!0,X,null,Z,mxEvent.isControlDown(m)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(m)):Y()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));g.setSelectionCell(g.insertVertex(null,-null,"",P,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(ba){g.setSelectionCells(this.insertTextAt(U,P,S,!0))})):0<=mxUtils.indexOf(m.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(m.dataTransfer.getData("text/plain"),P,S,!0))}}m.stopPropagation();m.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",+function(){g.setSelectionCells(this.insertTextAt(W,O,S,!0,X,null,Z,mxEvent.isControlDown(m)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(m)):Y()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));g.setSelectionCell(g.insertVertex(null,+null,"",O,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(ba){g.setSelectionCells(this.insertTextAt(U,O,S,!0))})):0<=mxUtils.indexOf(m.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(m.dataTransfer.getData("text/plain"),O,S,!0))}}m.stopPropagation();m.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var m=parseInt(this.div.offsetLeft),z=-parseInt(this.div.offsetWidth),I=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),N=parseInt(this.div.offsetHeight),P=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(m,I-z))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,P-N))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};+parseInt(this.div.offsetWidth),I=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),N=parseInt(this.div.offsetHeight),O=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(m,I-z))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,O-N))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(B=Editor.currentTheme,"simple"==B||"sketch"==B)Editor.currentTheme="",this.doSetCurrentTheme(B,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);B=!1;null!=urlParams.dark?B=urlParams.dark:(B="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||B&&"auto"!=mxSettings.settings.darkMode||(B=mxSettings.settings.darkMode));"auto"==B&&this.isAutoDarkModeSupported()&&(B=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof B?"1"==B:B);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(m){this.isAutoDarkMode()&&this.setDarkMode(m.matches)}))}catch(m){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(m,z){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&@@ -13334,7 +13335,7 @@ t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.aMath.max(20,D+mxEvent.getClientY(G)-A)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(G){null==x&&null==A||mxEvent.consume(G);A=x=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(G){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(G){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,v=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,5)){v=!0;break}if(!v){var x=-k.items;for(index in x){var A=x[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(D,G,R,V,Q,O){d.insertImage(D,Q,O)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML=+k.items;for(index in x){var A=x[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(D,G,R,V,Q,P){d.insertImage(D,Q,P)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML=" ";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML=" ";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var A=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||v||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",x=g.container.scrollLeft,A=g.container.scrollTop,g.container.appendChild(k),v=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=A)}));mxEvent.addListener(document,@@ -13408,17 +13409,17 @@ A.y+J,t),x.setSelectionCells(A);x.isSelectionEmpty()||(x.scrollCellToVisible(x.g(J=!0,A=D)}catch(q){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(t=this.parseHtmlData(J),x="text/plain"!=t.getAttribute("data-type")):null!=A&&0<A.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,J))}A=t.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(q){var y=this.editor.graph;y.lastPasteXml==q?y.pasteCounter++:(y.lastPasteXml=q,y.pasteCounter=0);var B=y.pasteCounter*y.gridSize;y.setSelectionCells(this.importXml(q,B,B));y.scrollCellToVisible(y.getSelectionCell())}),mxUtils.bind(this,function(q){this.handleError(q)})),mxEvent.consume(d));else{var G=!1,R="";R=x?null!=t.textContent&&"<mxfile"==t.textContent.substring(0,7)&&"</mxfile>"==t.textContent.substring(t.textContent.length-9)||"<mxGraphModel"==t.textContent.substring(0,13)&&"</mxGraphModel>"==t.textContent.substring(t.textContent.length-15)?t.textContent.replace(/\u00a0/g," "):t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var V=R.lastIndexOf("%3E");0<=V&&V<R.length-3&&(R=R.substring(0,V+3))}catch(q){}try{A=t.getElementsByTagName("span"),(D=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(G=!0,R=D)}catch(q){}try{if(null!=R&&0<R.length){if(0==R.substring(0,-20).replace(/\s/g,"").indexOf('{"isProtected":')){var Q=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,v,G,d)}catch(q){console.log("Miro import error:",q)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Q):Q()}else this.pasteXml(R,v,G,d,x);try{mxEvent.consume(d)}catch(q){}}else if(!k){var O=this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(q){this.handleError(q)}}}g.innerHTML=" "};EditorUi.prototype.showPrintDialog=+20).replace(/\s/g,"").indexOf('{"isProtected":')){var Q=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,v,G,d)}catch(q){console.log("Miro import error:",q)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Q):Q()}else this.pasteXml(R,v,G,d,x);try{mxEvent.consume(d)}catch(q){}}else if(!k){var P=this.editor.graph;P.lastPasteXml=null;P.pasteCounter=0}}catch(q){this.handleError(q)}}}g.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(d,g){var k=320;this.editor.graph.isEnabled()&&(k+=40);null!=this.pages&&1<this.pages.length&&(k+=40,this.editor.graph.isEnabled()||(k+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(k+=20);this.showDialog((new PrintDialog(this,d,g)).container,320,k,!0,!0)};EditorUi.prototype.print=function(d,g){var k=this.editor,v=k.graph,t=this.getPageIndex(this.currentPage),x=null!=t?t+1:1,A=mxUtils.bind(this,function(B,C,M,T){var m=B.useCssTransforms,z=B.currentTranslate,I=B.currentScale,-L=B.view.translate,N=B.view.scale;B.useCssTransforms&&(B.useCssTransforms=!1,B.currentTranslate=new mxPoint(0,0),B.currentScale=1,B.view.translate=new mxPoint(0,0),B.view.scale=1);var P=B.getGraphBounds(),S=0,U=0,W=mxRectangle.fromRectangle(B.pageFormat),X=g.fit||g.crop||!B.pageVisible,Z=g.scale;W.width=Math.ceil(W.width*B.pageScale);W.height=Math.ceil(W.height*B.pageScale);var Y=1;if(g.fit){Y=g.sheetsAcross;var ba=g.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));-Y=Math.min(W.height*ba/(P.height/B.view.scale),W.width*Y/(P.width/B.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&B.pageVisible?(Z=B.getPageLayout(),S-=Z.x*W.width,U-=Z.y*W.height):X=!0;g.crop&&(g.selection&&(P=v.getBoundingBox(v.getSelectionCells())),W.width=(P.width+1)*Y/B.view.scale,W.height=(P.height+1)*Y/B.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==C){C=PrintDialog.createPrintPreview(B,Y,null,0,S,U,X);C.title=this.getBaseFilename(!0);+L=B.view.translate,N=B.view.scale;B.useCssTransforms&&(B.useCssTransforms=!1,B.currentTranslate=new mxPoint(0,0),B.currentScale=1,B.view.translate=new mxPoint(0,0),B.view.scale=1);var O=B.getGraphBounds(),S=0,U=0,W=mxRectangle.fromRectangle(B.pageFormat),X=g.fit||g.crop||!B.pageVisible,Z=g.scale;W.width=Math.ceil(W.width*B.pageScale);W.height=Math.ceil(W.height*B.pageScale);var Y=1;if(g.fit){Y=g.sheetsAcross;var ba=g.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));+Y=Math.min(W.height*ba/(O.height/B.view.scale),W.width*Y/(O.width/B.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&B.pageVisible?(Z=B.getPageLayout(),S-=Z.x*W.width,U-=Z.y*W.height):X=!0;g.crop&&(g.selection&&(O=v.getBoundingBox(v.getSelectionCells())),W.width=(O.width+1)*Y/B.view.scale,W.height=(O.height+1)*Y/B.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==C){C=PrintDialog.createPrintPreview(B,Y,null,0,S,U,X);C.title=this.getBaseFilename(!0);C.pageSelector=!1;C.mathEnabled=!1;S=g.border;isNaN(S)||(C.pageMargin=S);g.selection&&(C.isCellVisible=function(aa){return B.isCellSelected(aa)});var ea=C.writeHead;C.writeHead=function(aa){ea.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=k.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(k.fontCss,!1,!1,!1)),aa.writeln("</style>"));for(var da=B.getCustomFonts(),ia=0;ia<da.length;ia++){var pa=da[ia].name,oa=da[ia].url;Graph.isCssFontUrl(oa)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(oa))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pa)+'";\nsrc: url("'+mxUtils.htmlEntities(oa)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=C.drawBackgroundImage;C.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),v.disableSvgLinks(aa.node,function(da){da.setAttribute("href","javascript:void(0)")}))}}var fa=C.addGraphFragment;C.addGraphFragment=function(aa,da,ia,pa,oa,ha){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:oa.classList.add("geDisableMathJax")};g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:-B.view.gridColor);C.open(null,null,M,!0,T,W,g.selection?B.getSelectionCells():null)}else{P=B.background;if(null==P||""==P||P==mxConstants.NONE)P="#ffffff";C.backgroundColor=P;C.autoOrigin=X;g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:B.view.gridColor);C.appendGraph(B,Y,S,U,M,!0,T,W,g.selection?B.getSelectionCells():null);M=B.getCustomFonts();if(null!=C.wnd)for(W=0;W<M.length;W++)S=M[W].name,U=M[W].url,Graph.isCssFontUrl(U)?+B.view.gridColor);C.open(null,null,M,!0,T,W,g.selection?B.getSelectionCells():null)}else{O=B.background;if(null==O||""==O||O==mxConstants.NONE)O="#ffffff";C.backgroundColor=O;C.autoOrigin=X;g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:B.view.gridColor);C.appendGraph(B,Y,S,U,M,!0,T,W,g.selection?B.getSelectionCells():null);M=B.getCustomFonts();if(null!=C.wnd)for(W=0;W<M.length;W++)S=M[W].name,U=M[W].url,Graph.isCssFontUrl(U)?C.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(U)+'" charset="UTF-8" type="text/css">'):(C.wnd.document.writeln('<style type="text/css">'),C.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(U)+'");\n}'),C.wnd.document.writeln("</style>"))}m&&(B.useCssTransforms=m,B.currentTranslate=z,B.currentScale=I,B.view.translate=L,B.view.scale=N);return C}),J=g.pagesFrom,D=g.pagesTo,G=!g.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,-g);else{G&&(G=g.selection||J==x&&D==x);if(!G&&null!=this.pages&&this.pages.length){G=0;x=this.pages.length-1;g.allPages||(G=parseInt(J)-1,x=parseInt(D)-1);for(var R=G;R<=x;R++){var V=this.pages[R];J=V==this.currentPage?v:null;if(null==J){J=this.createTemporaryGraph(v.stylesheet);J.shapeForegroundColor=v.shapeForegroundColor;J.shapeBackgroundColor=v.shapeBackgroundColor;D=!0;G=!1;var Q=null,O=null;null==V.viewState&&null==V.root&&this.updatePageRoot(V);null!=V.viewState&&(D=V.viewState.pageVisible,-G=V.viewState.mathEnabled,Q=V.viewState.background,O=V.viewState.backgroundImage,J.pageFormat=V.viewState.pageFormat,J.gridSize=V.viewState.gridSize);null!=O&&null!=O.originalSrc&&(O=this.createImageForPageLink(O.originalSrc,V));J.background=Q;J.backgroundImage=null!=O?new mxImage(O.src,O.width,O.height,O.x,O.y):null;J.pageVisible=D;J.mathEnabled=G;var q=J.getGraphBounds;J.getGraphBounds=function(){var B=q.apply(this,arguments),C=this.backgroundImage;if(null!=C&&null!=C.width&&null!=C.height){var M=+g);else{G&&(G=g.selection||J==x&&D==x);if(!G&&null!=this.pages&&this.pages.length){G=0;x=this.pages.length-1;g.allPages||(G=parseInt(J)-1,x=parseInt(D)-1);for(var R=G;R<=x;R++){var V=this.pages[R];J=V==this.currentPage?v:null;if(null==J){J=this.createTemporaryGraph(v.stylesheet);J.shapeForegroundColor=v.shapeForegroundColor;J.shapeBackgroundColor=v.shapeBackgroundColor;D=!0;G=!1;var Q=null,P=null;null==V.viewState&&null==V.root&&this.updatePageRoot(V);null!=V.viewState&&(D=V.viewState.pageVisible,+G=V.viewState.mathEnabled,Q=V.viewState.background,P=V.viewState.backgroundImage,J.pageFormat=V.viewState.pageFormat,J.gridSize=V.viewState.gridSize);null!=P&&null!=P.originalSrc&&(P=this.createImageForPageLink(P.originalSrc,V));J.background=Q;J.backgroundImage=null!=P?new mxImage(P.src,P.width,P.height,P.x,P.y):null;J.pageVisible=D;J.mathEnabled=G;var q=J.getGraphBounds;J.getGraphBounds=function(){var B=q.apply(this,arguments),C=this.backgroundImage;if(null!=C&&null!=C.width&&null!=C.height){var M=this.view.translate,T=this.view.scale;B=mxRectangle.fromRectangle(B);B.add(new mxRectangle((M.x+C.x)*T,(M.y+C.y)*T,C.width*T,C.height*T))}return B};var y=J.getGlobalVariable;J.getGlobalVariable=function(B){return"page"==B?V.getName():"pagenumber"==B?R+1:"pagecount"==B?null!=this.pages?this.pages.length:1:y.apply(this,arguments)};document.body.appendChild(J.container);this.updatePageRoot(V);J.model.setRoot(V.root)}t=A(J,t,R!=x,V.getId());J!=v&&J.container.parentNode.removeChild(J.container)}}else t=A(v);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(A=t.wnd.document,d||(t.wnd.IMMEDIATE_PRINT=!0),A.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||d||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(v){null!=g&&(g.parentNode.removeChild(g),g=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(v){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());v.stopPropagation();v.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(v){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<@@ -13446,18 +13447,18 @@ null,null,!1),g,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringi!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){d||this.handleError(t)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,v=!1,t=null,x=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,x);mxEvent.addListener(window,"message",mxUtils.bind(this,function(D){if(D.source==(window.opener||window.parent)){var G=D.data,R=null,V=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});if("json"==urlParams.proto){var Q=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(aa){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):mxUtils.htmlEntities(G.message),null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));-return}if("prompt"==G.action){this.spinner.stop();var O=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",value:aa,message:G}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")});this.showDialog(O.container,300,80,!0,!1);-O.init();return}if("draft"==G.action){var q=V(G.xml);this.spinner.stop();O=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?-mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(O.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{O.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var y=1==G.enableRecent,B=1==G.enableSearch,C=1==G.enableCustomTemp;O=new NewDialog(this,!1,G.templatesOnly?+return}if("prompt"==G.action){this.spinner.stop();var P=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",value:aa,message:G}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")});this.showDialog(P.container,300,80,!0,!1);+P.init();return}if("draft"==G.action){var q=V(G.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?+mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(P.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{P.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var y=1==G.enableRecent,B=1==G.enableSearch,C=1==G.enableCustomTemp;P=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(aa,da,ia,pa){aa=aa||this.emptyDiagramXml;null!=G.callback?A.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ia,libs:pa,builtIn:!0,message:G}),"*"):(d(aa,D,aa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,y?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):-null,B?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ia){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ia}),"*")}),null,null,C?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==G.withoutType);this.showDialog(O.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();-aa&&this.actions.get("exit").funct()}));O.init();return}if("textContent"==G.action){var M=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:M,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var T=null!=G.messageKey?mxResources.get(G.messageKey):-G.message;null==G.show||G.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==G.action){O=null;try{var m=this.diagramContainer.getAttribute("data-scrollState");null!=m&&(this.diagramContainer.removeAttribute("data-scrollState"),O=JSON.parse(m))}catch(aa){}Editor.inlineFullscreen=-G.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=O&&this.restoreScrollState(O);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var z=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,L=mxUtils.bind(this,function(aa,da){if(G.withSvg)G.withSvg=+null,B?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ia){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ia}),"*")}),null,null,C?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==G.withoutType);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();+aa&&this.actions.get("exit").funct()}));P.init();return}if("textContent"==G.action){var M=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:M,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var T=null!=G.messageKey?mxResources.get(G.messageKey):+G.message;null==G.show||G.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==G.action){P=null;try{var m=this.diagramContainer.getAttribute("data-scrollState");null!=m&&(this.diagramContainer.removeAttribute("data-scrollState"),P=JSON.parse(m))}catch(aa){}Editor.inlineFullscreen=+G.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var z=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,L=mxUtils.bind(this,function(aa,da){if(G.withSvg)G.withSvg=!1,this.getEmbeddedSvg(z,this.editor.graph,null,!0,function(pa){L(aa,pa)},null,null,G.embedImages,this.editor.graph.background,G.scale,G.border,G.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=G.format;ia.message=G;ia.data=aa;ia.svg=da;ia.xml=z;A.postMessage(JSON.stringify(ia),"*")}}),N=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==G.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(z)));-I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);L(aa)}),P=G.pageId||(null!=this.pages?G.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()!=P){var aa=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var da,ia=0;ia<this.pages.length;ia++)if(this.pages[ia].getId()==P){da=this.updatePageRoot(this.pages[ia]);break}null==da&&(da=this.currentPage);+I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);L(aa)}),O=G.pageId||(null!=this.pages?G.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()!=O){var aa=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var da,ia=0;ia<this.pages.length;ia++)if(this.pages[ia].getId()==O){da=this.updatePageRoot(this.pages[ia]);break}null==da&&(da=this.currentPage);I.getGlobalVariable=function(xa){return"page"==xa?da.getName():"pagenumber"==xa?1:aa.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(da.root)}if(null!=G.layerIds){var pa=I.model,oa=pa.getChildCells(pa.getRoot()),ha={};for(ia=0;ia<G.layerIds.length;ia++)ha[G.layerIds[ia]]=!0;for(ia=0;ia<oa.length;ia++)pa.setVisible(oa[ia],ha[oa[ia].id]||!1)}ia=null;G.keepTheme&&(ia=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(xa){N(xa.toDataURL("image/png"))}),-G.width,null,G.background,mxUtils.bind(this,function(){N(null)}),null,null,G.scale,G.transparent,G.shadow,null,I,G.border,null,G.grid,ia)});null!=G.xml&&0<G.xml.length&&(k=!0,this.setFileData(z),k=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=P?"&pageId="+P:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,+G.width,null,G.background,mxUtils.bind(this,function(){N(null)}),null,null,G.scale,G.transparent,G.shadow,null,I,G.border,null,G.grid,ia)});null!=G.xml&&0<G.xml.length&&(k=!0,this.setFileData(z),k=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=O?"&pageId="+O:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?L("data:image/png;base64,"+aa.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=G.format}else if("html"==G.format)da=this.editor.getGraphXml(),aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=G.background?G.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ia=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(oa);A.postMessage(JSON.stringify(aa),"*")}),pa="auto";G.keepTheme&&(pa=Editor.isDarkMode()?"dark":"light");null!=G.theme&&(pa=G.theme);if("xmlsvg"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=G.theme&&(pa=G.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ia,null,null,G.embedImages,da,G.scale,G.border,G.shadow,pa)}}else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?@@ -13484,22 +13485,22 @@ function(d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new Textv.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));v.value=x}catch(A){this.handleError(A)}}));t.setAttribute("title","copy");t.className="geBtn";k.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),v=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;g.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,v))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),v=[],t=[],x=[],A={};if(0<k.length){var J=-{},D=this.editor.graph,G=null,R=null,V=null,Q=null,O=null,q=null,y=null,B="whiteSpace=wrap;html=1;",C=null,M=null,T="",m="auto",z="auto",I=!1,L=null,N=null,P=40,S=40,U=100,W=0,X=mxUtils.bind(this,function(){null!=g?g(Aa):(D.setSelectionCells(Aa),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=D.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";M=null;for(var fa=[],aa=null,da=null,-ia=0;ia<k.length&&"#"==k[ia].charAt(0);){d=k[ia].replace(/\r$/,"");for(ia++;ia<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ia].substring(1)),ia++;if("#"!=d.charAt(1)){var pa=d.indexOf(":");if(0<pa){var oa=mxUtils.trim(d.substring(1,pa)),ha=mxUtils.trim(d.substring(pa+1));"label"==oa?ea=Graph.sanitizeHtml(ha):"labelname"==oa&&0<ha.length&&"-"!=ha?O=ha:"labels"==oa&&0<ha.length&&"-"!=ha?y=JSON.parse(ha):"style"==oa?R=ha:"parentstyle"==oa?B=+{},D=this.editor.graph,G=null,R=null,V=null,Q=null,P=null,q=null,y=null,B="whiteSpace=wrap;html=1;",C=null,M=null,T="",m="auto",z="auto",I=!1,L=null,N=null,O=40,S=40,U=100,W=0,X=mxUtils.bind(this,function(){null!=g?g(Aa):(D.setSelectionCells(Aa),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=D.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";M=null;for(var fa=[],aa=null,da=null,+ia=0;ia<k.length&&"#"==k[ia].charAt(0);){d=k[ia].replace(/\r$/,"");for(ia++;ia<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ia].substring(1)),ia++;if("#"!=d.charAt(1)){var pa=d.indexOf(":");if(0<pa){var oa=mxUtils.trim(d.substring(1,pa)),ha=mxUtils.trim(d.substring(pa+1));"label"==oa?ea=Graph.sanitizeHtml(ha):"labelname"==oa&&0<ha.length&&"-"!=ha?P=ha:"labels"==oa&&0<ha.length&&"-"!=ha?y=JSON.parse(ha):"style"==oa?R=ha:"parentstyle"==oa?B=ha:"unknownStyle"==oa&&"-"!=ha?q=ha:"stylename"==oa&&0<ha.length&&"-"!=ha?Q=ha:"styles"==oa&&0<ha.length&&"-"!=ha?V=JSON.parse(ha):"vars"==oa&&0<ha.length&&"-"!=ha?G=JSON.parse(ha):"identity"==oa&&0<ha.length&&"-"!=ha?C=ha:"parent"==oa&&0<ha.length&&"-"!=ha?M=ha:"namespace"==oa&&0<ha.length&&"-"!=ha?T=ha:"width"==oa?m=ha:"height"==oa?z=ha:"collapsed"==oa&&"-"!=ha?I="true"==ha:"left"==oa&&0<ha.length?L=ha:"top"==oa&&0<ha.length?N=ha:"ignore"==oa?da=ha.split(","):"connect"==oa?fa.push(JSON.parse(ha)):-"link"==oa?aa=ha:"padding"==oa?W=parseFloat(ha):"edgespacing"==oa?P=parseFloat(ha):"nodespacing"==oa?S=parseFloat(ha):"levelspacing"==oa?U=parseFloat(ha):"layout"==oa&&(ca=ha)}}}if(null==k[ia])throw Error(mxResources.get("invalidOrMissingFile"));var xa=this.editor.csvToArray(k[ia].replace(/\r$/,""));pa=d=null;oa=[];for(ha=0;ha<xa.length;ha++)C==xa[ha]&&(d=ha),M==xa[ha]&&(pa=ha),oa.push(mxUtils.trim(xa[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+oa[0]+"%");+"link"==oa?aa=ha:"padding"==oa?W=parseFloat(ha):"edgespacing"==oa?O=parseFloat(ha):"nodespacing"==oa?S=parseFloat(ha):"levelspacing"==oa?U=parseFloat(ha):"layout"==oa&&(ca=ha)}}}if(null==k[ia])throw Error(mxResources.get("invalidOrMissingFile"));var xa=this.editor.csvToArray(k[ia].replace(/\r$/,""));pa=d=null;oa=[];for(ha=0;ha<xa.length;ha++)C==xa[ha]&&(d=ha),M==xa[ha]&&(pa=ha),oa.push(mxUtils.trim(xa[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+oa[0]+"%");if(null!=fa)for(var qa=0;qa<fa.length;qa++)null==J[fa[qa].to]&&(J[fa[qa].to]={});C=[];for(ha=ia+1;ha<k.length;ha++){var ua=this.editor.csvToArray(k[ha].replace(/\r$/,""));if(null==ua){var ya=40<k[ha].length?k[ha].substring(0,40)+"...":k[ha];throw Error(ya+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<ua.length&&C.push(ua)}D.model.beginUpdate();try{for(ha=0;ha<C.length;ha++){ua=C[ha];var ja=null,ma=null!=d?T+ua[d]:null;k=!1;null!=ma&&(ja=D.model.getCell(ma),k=null==ja||0<=mxUtils.indexOf(v,-ja));var ka=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||"whiteSpace=wrap;html=1;");ka.collapsed=I;ka.vertex=!0;ka.id=ma;null==ja||k||D.model.setCollapsed(ja,I);for(var Ba=0;Ba<ua.length;Ba++)D.setAttributeForCell(ka,oa[Ba],ua[Ba]),null==ja||k||D.setAttributeForCell(ja,oa[Ba],ua[Ba]);if(null!=O&&null!=y){var sa=y[ka.getAttribute(O)];null!=sa&&(D.labelChanged(ka,sa),null==ja||k||D.cellLabelChanged(ja,sa))}if(null!=Q&&null!=V){var Ea=V[ka.getAttribute(Q)];null!=Ea&&(ka.style=Ea)}D.setAttributeForCell(ka,+ja));var ka=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||"whiteSpace=wrap;html=1;");ka.collapsed=I;ka.vertex=!0;ka.id=ma;null==ja||k||D.model.setCollapsed(ja,I);for(var Ba=0;Ba<ua.length;Ba++)D.setAttributeForCell(ka,oa[Ba],ua[Ba]),null==ja||k||D.setAttributeForCell(ja,oa[Ba],ua[Ba]);if(null!=P&&null!=y){var sa=y[ka.getAttribute(P)];null!=sa&&(D.labelChanged(ka,sa),null==ja||k||D.cellLabelChanged(ja,sa))}if(null!=Q&&null!=V){var Ea=V[ka.getAttribute(Q)];null!=Ea&&(ka.style=Ea)}D.setAttributeForCell(ka,"placeholders","1");ka.style=D.replacePlaceholders(ka,ka.style,G);null==ja||k?D.fireEvent(new mxEventObject("cellsInserted","cells",[ka])):(D.model.setStyle(ja,ka.style),0>mxUtils.indexOf(x,ja)&&x.push(ja),D.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));k=null!=ja;ja=ka;if(!k)for(qa=0;qa<fa.length;qa++)J[fa[qa].to][ja.getAttribute(fa[qa].to)]=ja;null!=aa&&"link"!=aa&&(D.setLinkForCell(ja,ja.getAttribute(aa)),D.setAttributeForCell(ja,aa,null));var wa=this.editor.graph.getPreferredSizeForCell(ja);M=null!=pa?D.model.getCell(T+ua[pa]):null;if(ja.vertex){ya=null!=M?0:Y;ia=null!=M?0:ba;null!=L&&null!=ja.getAttribute(L)&&(ja.geometry.x=ya+parseFloat(ja.getAttribute(L)));null!=N&&null!=ja.getAttribute(N)&&(ja.geometry.y=ia+parseFloat(ja.getAttribute(N)));var Ca="@"==m.charAt(0)?ja.getAttribute(m.substring(1)):null;ja.geometry.width=null!=Ca&&"auto"!=Ca?parseFloat(ja.getAttribute(m.substring(1))):"auto"==m||"auto"==Ca?wa.width+W:parseFloat(m);var Da="@"==z.charAt(0)?ja.getAttribute(z.substring(1)):null;ja.geometry.height=null!=Da&&"auto"!=Da&&"width"!=z?parseFloat(Da):"auto"==z||"auto"==Da?wa.height+W:"width"==z?ja.geometry.width:parseFloat(z);Z+=ja.geometry.height+S}k?(null==A[ma]&&(A[ma]=[]),A[ma].push(ja)):(v.push(ja),null!=M?(M.style=D.replacePlaceholders(M,B,G),D.addCell(ja,M),t.push(M)):x.push(D.addCell(ja)))}for(ha=0;ha<t.length;ha++)Ca="@"==m.charAt(0)?t[ha].getAttribute(m.substring(1)):null,Da="@"==z.charAt(0)?t[ha].getAttribute(z.substring(1)):null,"auto"!=m&&"auto"!=Ca||"auto"!=z&&"auto"!=Da||D.updateGroupBounds([t[ha]],W,!0);var Ka=x.slice(),Aa=x.slice();for(qa=0;qa<fa.length;qa++){var Fa=fa[qa];for(ha=0;ha<v.length;ha++){ja=v[ha];var Ja=mxUtils.bind(this,function(va,ta,na){var ra=ta.getAttribute(na.from);if(null!=ra&&""!=ra){ra=ra.split(",");for(var za=0;za<ra.length;za++){var Ga=J[na.to][ra[za]];if(null==Ga&&null!=q){Ga=new mxCell(ra[za],new mxGeometry(Y,ba,0,0),q);Ga.style=D.replacePlaceholders(ta,Ga.style,G);var Ia=this.editor.graph.getPreferredSizeForCell(Ga);Ga.geometry.width=Ia.width+W;Ga.geometry.height=Ia.height+W;J[na.to][ra[za]]=Ga;Ga.vertex=!0;Ga.id=ra[za];x.push(D.addCell(Ga))}if(null!=Ga){Ia=na.label;null!=na.fromlabel&&(Ia=(ta.getAttribute(na.fromlabel)||"")+(Ia||""));null!=na.sourcelabel&&(Ia=D.replacePlaceholders(ta,na.sourcelabel,G)+(Ia||""));null!=na.tolabel&&(Ia=(Ia||"")+(Ga.getAttribute(na.tolabel)||""));null!=na.targetlabel&&(Ia=(Ia||"")+D.replacePlaceholders(Ga,na.targetlabel,G));var Pa="target"==na.placeholders==!na.invert?Ga:va;Pa=null!=na.style?D.replacePlaceholders(Pa,na.style,G):D.createCurrentEdgeStyle();Ia=D.insertEdge(null,null,Ia||"",na.invert?Ga:va,na.invert?va:Ga,Pa);if(null!=na.labels)for(Pa=0;Pa<na.labels.length;Pa++){var La=na.labels[Pa],Na=new mxCell(La.label||Pa,new mxGeometry(null!=La.x?La.x:0,null!=La.y?La.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=La.placeholders&&(Na.value=D.replacePlaceholders("target"==La.placeholders==!na.invert?Ga:va,Na.value,G));if(null!=La.dx||null!=La.dy)Na.geometry.offset=-new mxPoint(null!=La.dx?La.dx:0,null!=La.dy?La.dy:0);Ia.insert(Na)}if(null!=na.data)for(var Va in na.data)D.setAttributeForCell(Ia,Va,na.data[Va]);Aa.push(Ia);mxUtils.remove(na.invert?va:Ga,Ka)}}}});Ja(ja,ja,Fa);if(null!=A[ja.id])for(Ba=0;Ba<A[ja.id].length;Ba++)Ja(ja,A[ja.id][Ba],Fa)}}if(null!=da)for(ha=0;ha<v.length;ha++)for(ja=v[ha],Ba=0;Ba<da.length;Ba++)D.setAttributeForCell(ja,mxUtils.trim(da[Ba]),null);if(0<x.length){var Ra=new mxParallelEdgeLayout(D);Ra.spacing=P;Ra.checkOverlap=!0;var Sa=+new mxPoint(null!=La.dx?La.dx:0,null!=La.dy?La.dy:0);Ia.insert(Na)}if(null!=na.data)for(var Va in na.data)D.setAttributeForCell(Ia,Va,na.data[Va]);Aa.push(Ia);mxUtils.remove(na.invert?va:Ga,Ka)}}}});Ja(ja,ja,Fa);if(null!=A[ja.id])for(Ba=0;Ba<A[ja.id].length;Ba++)Ja(ja,A[ja.id][Ba],Fa)}}if(null!=da)for(ha=0;ha<v.length;ha++)for(ja=v[ha],Ba=0;Ba<da.length;Ba++)D.setAttributeForCell(ja,mxUtils.trim(da[Ba]),null);if(0<x.length){var Ra=new mxParallelEdgeLayout(D);Ra.spacing=O;Ra.checkOverlap=!0;var Sa=function(){0<Ra.spacing&&Ra.execute(D.getDefaultParent());for(var va=0;va<x.length;va++){var ta=D.getCellGeometry(x[va]);ta.x=Math.round(D.snap(ta.x));ta.y=Math.round(D.snap(ta.y));"auto"==m&&(ta.width=Math.round(D.snap(ta.width)));"auto"==z&&(ta.height=Math.round(D.snap(ta.height)))}};if("["==ca.charAt(0)){var ab=X;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(D);db.disableEdgeStyle=!1;db.resetEdges=!1;var Wa=db.isVertexIgnored;db.isVertexIgnored=function(va){return Wa.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){db.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&Aa.length==2*x.length-1&&1==Ka.length){D.view.validate();var Xa=new mxCompactTreeLayout(D,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(D.getDefaultParent(),-0<Ka.length?Ka[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Ka.length){D.view.validate();var Ua=new mxHierarchicalLayout(D,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=P;Ua.interRankCellSpacing=U;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(D.getDefaultParent(),Aa);D.moveCells(Aa,Y,ba)},!0,X);X=null}else if("orgchart"==ca){D.view.validate();var eb=new mxOrgChartLayout(D,+0<Ka.length?Ka[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Ka.length){D.view.validate();var Ua=new mxHierarchicalLayout(D,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=O;Ua.interRankCellSpacing=U;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(D.getDefaultParent(),Aa);D.moveCells(Aa,Y,ba)},!0,X);X=null}else if("orgchart"==ca){D.view.validate();var eb=new mxOrgChartLayout(D,2,U,S),jb=eb.isVertexIgnored;eb.isVertexIgnored=function(va){return jb.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){eb.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&Aa.length>x.length){D.view.validate();var $a=new mxFastOrganicLayout(D);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var la=$a.isVertexIgnored;$a.isVertexIgnored=function(va){return la.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){$a.execute(D.getDefaultParent());Sa()},!0,X);X=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=X&&X()}}catch(va){this.handleError(va)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",v;for(v in urlParams)0>mxUtils.indexOf(d,v)&&null!=urlParams[v]&&(g+=k+v+"="+urlParams[v],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),v;for(v in urlParams)0>mxUtils.indexOf(k,v)&&(d=0==g?d+"?":d+"&",null!=urlParams[v]&&(d+=v+"="+urlParams[v],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,v,t){d=new LinkDialog(this,d,g,k,!0,v,t);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&@@ -13514,12 +13515,12 @@ this.copiedStyle&&v&&0<k.cells.length);this.actions.get("editGeometry").setEnabl!d.isSelectionEmpty()&&!d.isEditing());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!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var K=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,v,t,x,A,J){var D=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(D.getSvg(v,t,x)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),R=D.getGraphBounds(),V=Math.floor(R.width*t/D.view.scale),Q=Math.floor(R.height*-t/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&V*Q<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var O={globalVars:D.getExportVariables()};J&&(O.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(g,k,function(q,y){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(y||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<A?"&dpi="+A:"")+"&bg="+(null!=v?v:"none")+"&w="+V+"&h="++t/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&V*Q<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var P={globalVars:D.getExportVariables()};J&&(P.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(g,k,function(q,y){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(y||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<A?"&dpi="+A:"")+"&bg="+(null!=v?v:"none")+"&w="+V+"&h="+Q+"&border="+x+"&xml="+encodeURIComponent(G))})}else"png"==k?d.exportImage(t,null==v||"none"==v,!0,!1,!1,x,!0,!1,null,J,A):d.exportImage(t,!1,!0,!1,!1,x,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var v=d;this.currentPage!=this.pages[k]&&(v=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),v.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+v.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(d));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(v);var t=document.createElement("div");t.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var J=A[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));x[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){t.innerText="";if(0==G.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+-mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<G.length;R++){var V=G[R];x[V.id]&&(g[V.id]=V);var Q=this.addCheckbox(t,V.title,x[V.id]);(function(O,q){mxEvent.addListener(q,"change",function(){this.checked?g[O.id]=O:delete g[O.id]})})(V,Q)}},mxUtils.bind(this,function(G){t.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=G&&null!=G.message?G.message:-mxResources.get("unknownError"));t.appendChild(R)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,R;for(R in g)null==x[R]&&(G++,mxUtils.bind(this,function(V){this.remoteInvoke("getFileContent",[V.downloadUrl],null,mxUtils.bind(this,function(Q){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Q,V)),this.showSidebar()}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}),+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<G.length;R++){var V=G[R];x[V.id]&&(g[V.id]=V);var Q=this.addCheckbox(t,V.title,x[V.id]);(function(P,q){mxEvent.addListener(q,"change",function(){this.checked?g[P.id]=P:delete g[P.id]})})(V,Q)}},mxUtils.bind(this,function(G){t.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=G&&null!=G.message?G.message:+mxResources.get("unknownError"));t.appendChild(R)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,R;for(R in g)null==x[R]&&(G++,mxUtils.bind(this,function(V){this.remoteInvoke("getFileContent",[V.downloadUrl],null,mxUtils.bind(this,function(Q){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Q,V)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[R]));for(R in x)g[R]||this.closeLibrary(new RemoteLibrary(this,null,x[R]));0==G&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,v,t){var x=!0,A=window.setTimeout(mxUtils.bind(this,function(){x=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(A);x&&v.apply(this,arguments)}),D=mxUtils.bind(this,@@ -13527,9 +13528,9 @@ function(){window.clearTimeout(A);x&&t.apply(this,arguments)});k=k||{};k.callbacV.error={errResp:R}:null!=G&&(V.resp=G);this.remoteWin.postMessage(JSON.stringify(V),"*")});try{var v=d.funtionName,t=this.remoteInvokableFns[v];if(null!=t&&"function"===typeof this[v]){if(t.allowedDomains){for(var x=!1,A=0;A<t.allowedDomains.length;A++)if(g=="https://"+t.allowedDomains[A]){x=!0;break}if(!x){k(null,"Invalid Call: "+v+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(t.isAsync)J.push(function(){k(Array.prototype.slice.apply(arguments))}),J.push(function(G){k(null,G||"Unkown Error")}),this[v].apply(this,J);else{var D=this[v].apply(this,J);k([D])}}else k(null,"Invalid Call: "+v+" is not found.")}catch(G){k(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var v=k.open("database",2);v.onupgradeneeded=function(t){try{var x=v.result;1>t.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};v.onsuccess=mxUtils.bind(this,function(t){try{var x=v.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A||-"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,R,V=0,Q=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){V++;q()}),q=mxUtils.bind(this,function(){try{if(V>=-R.length)Q();else{var B=R[V];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(C){null==C||".scratchpad"==B&&C==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):O()}),O)}}catch(C){console.log(C)}}),y=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}],O,O,["filesInfo","files"])}catch(C){console.log(C)}});-A=mxUtils.bind(this,function(B){try{if(B.source==J.contentWindow){var C={};try{C=JSON.parse(B.data)}catch(M){}"init"==C.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=C.event||G||(D?null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?(R=C.resp[0],D=!1,q()):Q():null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?y(C.resp[0]):O())}}catch(M){console.log(M)}});+"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,R,V=0,Q=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){V++;q()}),q=mxUtils.bind(this,function(){try{if(V>=+R.length)Q();else{var B=R[V];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(C){null==C||".scratchpad"==B&&C==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):P()}),P)}}catch(C){console.log(C)}}),y=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}],P,P,["filesInfo","files"])}catch(C){console.log(C)}});+A=mxUtils.bind(this,function(B){try{if(B.source==J.contentWindow){var C={};try{C=JSON.parse(B.data)}catch(M){}"init"==C.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=C.event||G||(D?null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?(R=C.resp[0],D=!1,q()):Q():null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?y(C.resp[0]):P())}}catch(M){console.log(M)}});window.addEventListener("message",A)}})));d(x);x.onversionchange=function(){x.close()}}catch(A){null!=g?g(A):null!=window.console&&console.warn(A)}});v.onerror=g;v.onblocked=function(){}}catch(t){null!=g?g(t):null!=window.console&&console.error(t)}else null!=g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,v,t){this.openDatabase(mxUtils.bind(this,function(x){try{t=t||"objects";Array.isArray(t)||(t=[t],d=[d],g=[g]);var A=x.transaction(t,"readwrite");A.oncomplete=k;A.onerror=v;for(x=0;x<t.length;x++)A.objectStore(t[x]).put(null!=d&&null!=d[x]?{key:d[x],data:g[x]}:g[x])}catch(J){null!=v&&v(J)}}),v)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,v){this.openDatabase(mxUtils.bind(this,function(t){try{v=v||"objects";Array.isArray(v)||(v=[v],d=[d]);var x=t.transaction(v,"readwrite");x.oncomplete=g;x.onerror=k;for(t=0;t<v.length;t++)x.objectStore(v[t]).delete(d[t])}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItem=function(d,g,k,v){this.openDatabase(mxUtils.bind(this,function(t){try{v=v||"objects";var x=t.transaction([v],"readonly").objectStore(v).get(d);x.onsuccess=function(){g(x.result)};x.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(v){try{k=k||"objects";var t=v.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];t.onsuccess=function(A){null==A.target.result?d(x):(x.push(A.target.result.value),@@ -13538,18 +13539,18 @@ this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.protd.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,v,t,x,A,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,k,v,t,x,A,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");-return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");+return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,v,t,x,A,J,D,G,R,V,Q,P,q,y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,v)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,v)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,v,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,k,v,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),v=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<v.length){var t="<mxfile "===v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(t||v)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();var CommentsWindow=function(b,e,f,c,l,n){function p(){for(var q=A.getElementsByTagName("div"),y=0,B=0;B<q.length;B++)"none"!=q[B].style.display&&q[B].parentNode==A&&y++;J.style.display=0==y?"block":"none"}function u(q,y,B,C){function M(){y.removeChild(z);y.removeChild(I);m.style.display="block";T.style.display="block"}v={div:y,comment:q,saveCallback:B,deleteOnCancel:C};var T=y.querySelector(".geCommentTxt"),m=y.querySelector(".geCommentActionsList"),z=document.createElement("textarea");z.className="geCommentEditTxtArea";z.style.minHeight=T.offsetHeight+"px";z.value=q.content;y.insertBefore(z,T);var I=document.createElement("div");I.className="geCommentEditBtns";var L=mxUtils.button(mxResources.get("cancel"),function(){C?(y.parentNode.removeChild(y),p()):M();v=null});L.className="geCommentEditBtn";I.appendChild(L);var N=mxUtils.button(mxResources.get("save"),function(){T.innerText="";q.content=z.value;mxUtils.write(T,q.content);M();B(q);v=null});mxEvent.addListener(z,"keydown",mxUtils.bind(this,-function(P){mxEvent.isConsumed(P)||((mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P))&&13==P.keyCode?(N.click(),mxEvent.consume(P)):27==P.keyCode&&(L.click(),mxEvent.consume(P)))}));N.focus();N.className="geCommentEditBtn gePrimaryBtn";I.appendChild(N);y.insertBefore(I,T);m.style.display="none";T.style.display="none";z.focus()}function F(q,y){y.innerText="";q=new Date(q.modifiedDate);var B=b.timeSince(q);null==B&&(B=mxResources.get("lessThanAMinute"));mxUtils.write(y,mxResources.get("timeAgo",+function(O){mxEvent.isConsumed(O)||((mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O))&&13==O.keyCode?(N.click(),mxEvent.consume(O)):27==O.keyCode&&(L.click(),mxEvent.consume(O)))}));N.focus();N.className="geCommentEditBtn gePrimaryBtn";I.appendChild(N);y.insertBefore(I,T);m.style.display="none";T.style.display="none";z.focus()}function F(q,y){y.innerText="";q=new Date(q.modifiedDate);var B=b.timeSince(q);null==B&&(B=mxResources.get("lessThanAMinute"));mxUtils.write(y,mxResources.get("timeAgo",[B],"{1} ago"));y.setAttribute("title",q.toLocaleDateString()+" "+q.toLocaleTimeString())}function H(q){var y=document.createElement("img");y.className="geCommentBusyImg";y.src=IMAGE_PATH+"/spin.gif";q.appendChild(y);q.busyImg=y}function E(q){q.style.border="1px solid red";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function K(q){q.style.border="";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function d(q,y,B,C,M){function T(U,W,X){var Z=document.createElement("li");Z.className="geCommentAction";var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,U);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,q);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function m(){function U(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,U(Z.replies[Y])}var W=[],X=I;U(q);return{pdiv:X,replies:W}}function z(U,W,X,Z,Y){function ba(){H(aa);q.addReply(fa,function(da){fa.id=da;q.replies.push(fa);K(aa);X&&X()},function(da){ea();E(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){u(fa,aa,function(da){ba()},!0)}var ca=m().pdiv,fa=b.newComment(U,b.getCurrentUser());fa.pCommentId=q.id;null==q.replies&&(q.replies=[]);var aa=d(fa,q.replies,ca,C+1);W?ea():ba()}if(M||!q.isResolved){J.style.display="none";var I=document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",q.id);I.style.marginLeft=20*C+5+-"px";q.isResolved&&(t.style.opacity="0.7");var L=document.createElement("div");L.className="geCommentHeader";var N=document.createElement("img");N.className="geCommentUserImg";N.src=null!=q.user&&null!=q.user.pictureUrl?q.user.pictureUrl:Editor.userImage;L.appendChild(N);N=document.createElement("div");N.className="geCommentHeaderTxt";L.appendChild(N);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,null!=q.user?q.user.displayName:mxResources.get("unknownUser"));-N.appendChild(P);P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",q.id);F(q,P);N.appendChild(P);I.appendChild(L);L=document.createElement("div");L.className="geCommentTxt";mxUtils.write(L,q.content||"");I.appendChild(L);q.isLocked&&(I.style.opacity="0.5");L=document.createElement("div");L.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";L.appendChild(S);g||q.isLocked||0!=C&&!k||T(mxResources.get("reply"),+"px";q.isResolved&&(t.style.opacity="0.7");var L=document.createElement("div");L.className="geCommentHeader";var N=document.createElement("img");N.className="geCommentUserImg";N.src=null!=q.user&&null!=q.user.pictureUrl?q.user.pictureUrl:Editor.userImage;L.appendChild(N);N=document.createElement("div");N.className="geCommentHeaderTxt";L.appendChild(N);var O=document.createElement("div");O.className="geCommentUsername";mxUtils.write(O,null!=q.user?q.user.displayName:mxResources.get("unknownUser"));+N.appendChild(O);O=document.createElement("div");O.className="geCommentDate";O.setAttribute("data-commentId",q.id);F(q,O);N.appendChild(O);I.appendChild(L);L=document.createElement("div");L.className="geCommentTxt";mxUtils.write(L,q.content||"");I.appendChild(L);q.isLocked&&(I.style.opacity="0.5");L=document.createElement("div");L.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";L.appendChild(S);g||q.isLocked||0!=C&&!k||T(mxResources.get("reply"),function(){z("",!0)},q.isResolved);N=b.getCurrentUser();null==N||null==q.user||N.id!=q.user.id||g||q.isLocked||(T(mxResources.get("edit"),function(){function U(){u(q,I,function(){H(I);q.editComment(q.content,function(){K(I)},function(W){E(I);U();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},q.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(I);q.deleteComment(function(U){if(!0===U){U=I.querySelector(".geCommentTxt");U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var W=I.querySelectorAll(".geCommentAction");for(U=0;U<W.length;U++)W[U].parentNode.removeChild(W[U]);K(I);I.style.opacity="0.5"}else{W=m(q).replies;for(U=0;U<W.length;U++)A.removeChild(W[U]);for(U=0;U<y.length;U++)if(y[U]==q){y.splice(U,1);break}J.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(U){E(I);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},q.isResolved));g||q.isLocked||0!=C||T(q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function W(){var X=U.target;X.innerText="";q.isResolved=!q.isResolved;mxUtils.write(X,q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=q.isResolved?"none":"",Y=m(q).replies,ba="light-dark("+(q.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=@@ -13557,11 +13558,11 @@ X.parentNode&&(ca[fa].style.display=Z);V||(Y[ea].style.display="none")}p()}q.isRv.comment.id&&v.comment.pCommentId==q.id&&(A.appendChild(v.div),u(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return I}}var g=!b.canComment(),k=b.canReplyToReplies(),v=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var x=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";A.style.bottom=parseInt(x)+7+"px";t.appendChild(A);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(J,mxResources.get("noCommentsFound"));var D=document.createElement("div");D.className="geToolbarContainer geCommentsToolbar";D.style.height=x;D.style.padding="3px 4px 4px 4px";x=document.createElement("a");x.className="geToolbarButton geAdaptiveAsset geToggleItem";x.style.width="16px";x.style.height="18px";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="20px";x.style.margin="0 2px";x.style.display="inline-block";x.style.cursor="pointer";if(!g){var G=x.cloneNode();G.style.backgroundImage="url("+Editor.plusImage+")";G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(q){function y(){u(B,C,function(M){H(C);b.addComment(M,function(T){M.id=T;Q.push(M);K(C)},function(T){E(C);y();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var B=-b.newComment("",b.getCurrentUser()),C=d(B,Q,null,0);y();q.preventDefault();mxEvent.consume(q)});D.appendChild(G)}var R=x.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var V=!1;mxEvent.addListener(R,"click",function(q){(V=!V)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");O();q.preventDefault();mxEvent.consume(q)});D.appendChild(R);b.commentsRefreshNeeded()&&(G=x.cloneNode(),-G.style.backgroundImage="url("+Editor.refreshImage+")",G.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(G,"click",function(q){O();q.preventDefault();mxEvent.consume(q)}),D.appendChild(G));b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geButton geAdaptiveAsset",mxEvent.addListener(x,"click",function(q){n();q.preventDefault();mxEvent.consume(q)}),-D.appendChild(x));t.appendChild(D);var Q=[],O=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var q=v.div.querySelector(".geCommentEditTxtArea"),y=v.div.querySelector(".geCommentEditBtns");v.comment.content=q.value;q.parentNode.removeChild(q);y.parentNode.removeChild(y)}catch(B){b.handleError(B)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))++b.newComment("",b.getCurrentUser()),C=d(B,Q,null,0);y();q.preventDefault();mxEvent.consume(q)});D.appendChild(G)}var R=x.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var V=!1;mxEvent.addListener(R,"click",function(q){(V=!V)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");P();q.preventDefault();mxEvent.consume(q)});D.appendChild(R);b.commentsRefreshNeeded()&&(G=x.cloneNode(),+G.style.backgroundImage="url("+Editor.refreshImage+")",G.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(G,"click",function(q){P();q.preventDefault();mxEvent.consume(q)}),D.appendChild(G));b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geButton geAdaptiveAsset",mxEvent.addListener(x,"click",function(q){n();q.preventDefault();mxEvent.consume(q)}),+D.appendChild(x));t.appendChild(D);var Q=[],P=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var q=v.div.querySelector(".geCommentEditTxtArea"),y=v.div.querySelector(".geCommentEditBtns");v.comment.content=q.value;q.parentNode.removeChild(q);y.parentNode.removeChild(y)}catch(B){b.handleError(B)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";k=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(B){function C(M){if(null!=M){M.sort(function(m,z){return new Date(m.modifiedDate)-new Date(z.modifiedDate)});for(var T=0;T<M.length;T++)C(M[T].replies)}}B.sort(function(M,T){return new Date(M.modifiedDate)-new Date(T.modifiedDate)});A.innerText="";A.appendChild(J);J.style.display="block";Q=B;for(B=0;B<Q.length;B++)C(Q[B].replies),d(Q[B],Q,null,0,V);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),-u(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(B){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(B&&B.message?": "+B.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});O();this.refreshComments=O;D=mxUtils.bind(this,function(){function q(T){var m=B[T.id];if(null!=m)for(F(T,m),m=0;null!=T.replies&&m<T.replies.length;m++)q(T.replies[m])}if(this.window.isVisible()){for(var y=A.querySelectorAll(".geCommentDate"),B=+u(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(B){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(B&&B.message?": "+B.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});P();this.refreshComments=P;D=mxUtils.bind(this,function(){function q(T){var m=B[T.id];if(null!=m)for(F(T,m),m=0;null!=T.replies&&m<T.replies.length;m++)q(T.replies[m])}if(this.window.isVisible()){for(var y=A.querySelectorAll(".geCommentDate"),B={},C=0;C<y.length;C++){var M=y[C];B[M.getAttribute("data-commentId")]=M}for(C=0;C<Q.length;C++)q(Q[C])}});setInterval(D,6E4);this.refreshCommentsTime=D;this.window=new mxWindow(mxResources.get("comments"),t,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,n,p,u,F,H,E){var K=document.createElement("div");K.style.textAlign="center";E=null!=E?E:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=E+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);K.appendChild(d);null!=H&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),d.appendChild(e),K.appendChild(d));H=document.createElement("div");H.style.textAlign="center";H.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(g.checked)});n.className="geBtn";null!=u&&(n.innerHTML=u+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&H.appendChild(n);var k=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&@@ -13783,7 +13784,7 @@ atob(k),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?c(new LocalFile(this.ui,x.responseText,f.title+this.extension,!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=l)l(A);else throw A;}}),f.title):c(d?new LocalFile(this.ui,K,f.title,!0):new DriveFile(this.ui,K,f))}}catch(x){if(null!=l)l(x);else throw x;}}),mxUtils.bind(this,function(K,d){if(H<this.maxRetries&&null!=d&&403==d.getStatus())H++,window.setTimeout(E,2*H*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=l)l(K);else throw K;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,u)});E()}}catch(K){if(null!=l)l(K);else throw K;}};DriveClient.prototype.saveFile=function(f,c,l,n,p,u,F,H,E){try{var K=0;f.saveLevel=1;var d=mxUtils.bind(this,function(V){if(null!=n)n(V);else throw V;}),g=mxUtils.bind(this,function(V){d(V);try{EditorUi.logError(V.message,null,null,null,V)}catch(Q){}});if(f.isEditable()&&null!=f.desc){var k=Date.now(),v=f.desc.etag,t=f.desc.modifiedDate,x=f.desc.headRevisionId,A=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());u=null!=u?u:!1;var J=null,D=!1,G={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(G.mimeType))G.mimeType=this.xmlMimeType,J=f.desc,D=c=!0;else if("application/octet-stream"==G.mimeType||"1"==urlParams["override-mime"]&&G.mimeType!=this.xmlMimeType)G.mimeType=this.xmlMimeType;-var R=mxUtils.bind(this,function(V,Q,O){try{f.saveLevel=3;var q=f.getData(),y=null,B=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),E=null!=E?E:Editor.guid(32),H.push({key:"secret",value:E}),B=this.ui.getPagesForXml(q),y=this.ui.getHashValueForPages(B),H.push({key:"checksum",value:E+":"+y}));O||(null!=V||u||(V=this.placeholderThumbnail,Q=this.placeholderMimeType),+var R=mxUtils.bind(this,function(V,Q,P){try{f.saveLevel=3;var q=f.getData(),y=null,B=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),E=null!=E?E:Editor.guid(32),H.push({key:"secret",value:E}),B=this.ui.getPagesForXml(q),y=this.ui.getHashValueForPages(B),H.push({key:"checksum",value:E+":"+y}));P||(null!=V||u||(V=this.placeholderThumbnail,Q=this.placeholderMimeType),null!=V&&null!=Q&&(G.thumbnail={image:V,mimeType:Q}));var C=mxUtils.bind(this,function(m){try{if(f.saveDelay=Date.now()-k,f.saveLevel=null,l(m,q,B,y),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(z){z.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId,method:"PUT",params:z})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(z){}}}catch(z){g(z)}}),M=mxUtils.bind(this,function(m,z){f.saveLevel=4;try{null!=H&&(G.properties=H);var I=F||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:f.getCurrentEtag(),L=mxUtils.bind(this,function(S){f.saveLevel=5;try{var U=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,W=!0,X=null;try{X=window.setTimeout(mxUtils.bind(this,function(){W=!1;d({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(f.getId(),G,m,c||S||U,z,S?null:I,D),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){var Y=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(t)).getTime():0;if(0>=Y||v==Z.etag||c&&x==Z.headRevisionId){var ba=[];null==Z?ba.push("Empty response"):(0>=Y&&ba.push("Invalid modified time"),@@ -13792,9 +13793,9 @@ null,"id-"+f.desc.id+"-from-"+x+"."+t+"-"+this.ui.hashValue(v)+"-to-"+Z.headRevithis.catchupFields},mxUtils.bind(this,function(Y){f.saveLevel=7;try{if(null!=Y&&Y.etag==I)if(K<this.staleEtagMaxRetries){K++;var ba=Math.round(2*K*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(N,ba);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",K,"delay",ba)}else{N(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&Y.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",I,"remote",Y.etag,"rev",f.desc.headRevisionId,"response",[Y],"file",[f]),d(Z,Y)}catch(ea){g(ea)}}),mxUtils.bind(this,function(){d(Z)})):d(Z)}catch(Y){g(Y)}}}))}catch(Z){g(Z)}}),N=mxUtils.bind(this,function(S){f.saveLevel=9;if(S||null==I)L(S);else{var U=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){U=!1;d({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){window.clearTimeout(W);if(U){f.saveLevel=10;try{null!=X&&X.headRevisionId==x?("1"==urlParams.test&&I!=X.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",-"from",I,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),I=X.etag,L(S)):d({error:{code:412}},X)}catch(Z){g(Z)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);U&&(f.saveLevel=11,d(X))}))}});if(A&&null==V){f.saveLevel=8;var P=new Image;P.onload=mxUtils.bind(this,function(){try{var S=this.thumbnailWidth/P.width,U=document.createElement("canvas");U.width=this.thumbnailWidth;U.height=Math.floor(P.height*S);U.getContext("2d").drawImage(P,0,0,U.width,U.height);var W=U.toDataURL();-W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");G.thumbnail={image:W,mimeType:"image/png"};N(!1)}catch(X){try{N(!1)}catch(Z){g(Z)}}});P.src="data:image/png;base64,"+m}else N(!1)}catch(S){g(S)}});if(A){var T=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(m){M(m,!0)}),d,this.ui.getCurrentFile()!=f?q:null,T.scale,T.border)}else M(q,!1)}catch(m){g(m)}});try{f.saveLevel=2,(u||A||f.constructor==DriveLibrary||!this.enableThumbnails||-"0"==urlParams.thumb||null!=G.mimeType&&"application/vnd.jgraph.mxfile"!=G.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(V){try{var Q=null;try{null!=V&&(Q=V.toDataURL("image/png")),null!=Q&&(Q=Q.length>this.maxThumbnailSize?null:Q.substring(Q.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(O){Q=null}R(Q,"image/png")}catch(O){g(O)}}),20))&&R(null,null,f.constructor!=DriveLibrary)}catch(V){g(V)}}else this.ui.editor.graph.reset(),d({message:mxResources.get("readOnly")})}catch(V){g(V)}};+"from",I,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),I=X.etag,L(S)):d({error:{code:412}},X)}catch(Z){g(Z)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);U&&(f.saveLevel=11,d(X))}))}});if(A&&null==V){f.saveLevel=8;var O=new Image;O.onload=mxUtils.bind(this,function(){try{var S=this.thumbnailWidth/O.width,U=document.createElement("canvas");U.width=this.thumbnailWidth;U.height=Math.floor(O.height*S);U.getContext("2d").drawImage(O,0,0,U.width,U.height);var W=U.toDataURL();+W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");G.thumbnail={image:W,mimeType:"image/png"};N(!1)}catch(X){try{N(!1)}catch(Z){g(Z)}}});O.src="data:image/png;base64,"+m}else N(!1)}catch(S){g(S)}});if(A){var T=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(m){M(m,!0)}),d,this.ui.getCurrentFile()!=f?q:null,T.scale,T.border)}else M(q,!1)}catch(m){g(m)}});try{f.saveLevel=2,(u||A||f.constructor==DriveLibrary||!this.enableThumbnails||+"0"==urlParams.thumb||null!=G.mimeType&&"application/vnd.jgraph.mxfile"!=G.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(V){try{var Q=null;try{null!=V&&(Q=V.toDataURL("image/png")),null!=Q&&(Q=Q.length>this.maxThumbnailSize?null:Q.substring(Q.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(P){Q=null}R(Q,"image/png")}catch(P){g(P)}}),20))&&R(null,null,f.constructor!=DriveLibrary)}catch(V){g(V)}}else this.ui.editor.graph.reset(),d({message:mxResources.get("readOnly")})}catch(V){g(V)}};DriveClient.prototype.insertFile=function(f,c,l,n,p,u,F){u=null!=u?u:this.xmlMimeType;f={mimeType:u,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,F),mxUtils.bind(this,function(H){u==this.libraryMimeType?n(new DriveLibrary(this.ui,c,H)):0==H?null!=p&&p({message:mxResources.get("errorSavingFile")}):n(new DriveFile(this.ui,c,H))}),p)};DriveClient.prototype.createUploadRequest=function(f,c,l,n,p,u,F){p=null!=p?p:!1;var H={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=u&&(H["If-Match"]=u);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:H,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!=l?p?l:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};n||(f.fullUrl+="&newRevision=false");F&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),@@ -13926,19 +13927,19 @@ g){this.writeFile(p,u,F,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNeH,F,mxUtils.bind(this,function(d){e.meta.sha=d;K()}),c):K()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e,!0)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=function(e,f,c){var l=null,n=null,p=null,u=null,F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.height="320px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";F.appendChild(H);H=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){D()}));H.style.position="absolute";H.style.right="40px";H.style.top="26px";F.appendChild(H);var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.border="1px solid lightgray";E.style.boxSizing="border-box";E.style.padding="4px";E.style.overflow="auto";E.style.lineHeight="1.2em";E.style.height="290px";F.appendChild(E);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width="100%";var d=new CustomDialog(this.ui,F,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",-null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,R,V,Q){var O=document.createElement("a");O.setAttribute("title",G);O.style.cursor="pointer";mxUtils.write(O,G);mxEvent.addListener(O,"click",-R);Q&&(O.style.textDecoration="underline");null!=V&&(G=K.cloneNode(),G.style.padding=V,G.appendChild(O),O=G);return O}),k=mxUtils.bind(this,function(G){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));G||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(G=0;G<V.length;G++)(function(Q){mxUtils.write(R,+null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,R,V,Q){var P=document.createElement("a");P.setAttribute("title",G);P.style.cursor="pointer";mxUtils.write(P,G);mxEvent.addListener(P,"click",+R);Q&&(P.style.textDecoration="underline");null!=V&&(G=K.cloneNode(),G.style.padding=V,G.appendChild(P),P=G);return P}),k=mxUtils.bind(this,function(G){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));G||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(G=0;G<V.length;G++)(function(Q){mxUtils.write(R," / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(G)}E.appendChild(R)}),v=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}),null,{})}),t=null,x=null,A=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var R=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/contents/"+u+"?ref="+encodeURIComponent(p)+"&per_page=100&page="+G,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,-function(){this.ui.spinner.stop();1==G&&(k(),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var O=JSON.parse(Q.getText());if(null==O||0==O.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<O.length;M++)mxUtils.bind(this,function(T,m){if(C==("dir"==T.type)){m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?-"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("dir"==T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("dir"==T.type?"/":""),mxUtils.bind(this,function(){"dir"==T.type?(u=T.path,A()):e&&"file"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+T.path))})));E.appendChild(m);y++}})(O[M],M)});B(!0);e&&B(!1)}}))}),v,!0)}),+function(){this.ui.spinner.stop();1==G&&(k(),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var P=JSON.parse(Q.getText());if(null==P||0==P.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<P.length;M++)mxUtils.bind(this,function(T,m){if(C==("dir"==T.type)){m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?+"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("dir"==T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("dir"==T.type?"/":""),mxUtils.bind(this,function(){"dir"==T.type?(u=T.path,A()):e&&"file"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+T.path))})));E.appendChild(m);y++}})(P[M],M)});B(!0);e&&B(!1)}}))}),v,!0)}),J=mxUtils.bind(this,function(G,R){null==G&&(E.innerText="",G=1);var V=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/branches?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var Q=-mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(O){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(O.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,+mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(P.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=B.name;u="";A()})));E.appendChild(M)})(q[y],y);100==q.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&Q()},mxEvent.addListener(E,"scroll",x))}}))}),v)}),D=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var R=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled",-"disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&mxEvent.removeListener(E,"scroll",x);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){D(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var O=JSON.parse(Q.getText());-if(null==O||0==O.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else{1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var y=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(B){if(null!=B){var C=B.split("/");if(1<C.length){B=C[0];var M=C[1];3>C.length?(l=B,n=M,u=p=null,J()):this.ui.spinner.spin(E,mxResources.get("loading"))&&(C=encodeURIComponent(C.slice(2,C.length).join("/")),this.getFile(B+-"/"+M+"/"+C,mxUtils.bind(this,function(T){this.ui.spinner.stop();l=T.meta.org;n=T.meta.repo;p=decodeURIComponent(T.meta.ref);u="";A()}),mxUtils.bind(this,function(T){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(y.container,300,80,!0,!1);y.init()}))),mxUtils.br(E),mxUtils.br(E));for(var q=0;q<O.length;q++)mxUtils.bind(this,-function(y,B){var C=K.cloneNode();C.style.backgroundColor=0==B%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";C.appendChild(g(y.full_name,mxUtils.bind(this,function(){l=y.owner.login;n=y.name;u="";J(null,!0)})));E.appendChild(C)})(O[q],q)}100==O.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&V()},mxEvent.addListener(E,"scroll",x))}))}),v)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};+"disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&mxEvent.removeListener(E,"scroll",x);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){D(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var P=JSON.parse(Q.getText());+if(null==P||0==P.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else{1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var y=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(B){if(null!=B){var C=B.split("/");if(1<C.length){B=C[0];var M=C[1];3>C.length?(l=B,n=M,u=p=null,J()):this.ui.spinner.spin(E,mxResources.get("loading"))&&(C=encodeURIComponent(C.slice(2,C.length).join("/")),this.getFile(B++"/"+M+"/"+C,mxUtils.bind(this,function(T){this.ui.spinner.stop();l=T.meta.org;n=T.meta.repo;p=decodeURIComponent(T.meta.ref);u="";A()}),mxUtils.bind(this,function(T){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(y.container,300,80,!0,!1);y.init()}))),mxUtils.br(E),mxUtils.br(E));for(var q=0;q<P.length;q++)mxUtils.bind(this,+function(y,B){var C=K.cloneNode();C.style.backgroundColor=0==B%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";C.appendChild(g(y.full_name,mxUtils.bind(this,function(){l=y.owner.login;n=y.name;u="";J(null,!0)})));E.appendChild(C)})(P[q],q)}100==P.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&V()},mxEvent.addListener(E,"scroll",x))}))}),v)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(n);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";@@ -13982,43 +13983,43 @@ encodeURIComponent(l);E=new mxXmlRequest(e,JSON.stringify(c),E);this.executeRequnull,e.meta.refPos)}),c)}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){E(e.meta.last_commit_id,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else E(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(p+"/"+u+"/"+F+"/"+H,mxUtils.bind(this,function(d){e.meta.last_commit_id=d.meta.last_commit_id;K()}),c):K()};GitLabClient.prototype.pickFolder=function(e){this.showGitLabDialog(!1,e,!0)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f,c){var l=null,n=null,p=null,u=null,F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.height="304px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";F.appendChild(H);var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.border="1px solid lightgray";E.style.boxSizing="border-box";E.style.padding="4px";E.style.overflow="auto";E.style.lineHeight="1.2em";E.style.height="274px";F.appendChild(E);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width=-"100%";var d=new CustomDialog(this.ui,F,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}));this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,R,V,Q){var O=document.createElement("a");O.setAttribute("title",G);O.style.cursor="pointer";mxUtils.write(O,G);mxEvent.addListener(O,"click",R);Q&&(O.style.textDecoration="underline");null!=V&&(G=K.cloneNode(),G.style.padding=V,G.appendChild(O),O=G);return O}),+"100%";var d=new CustomDialog(this.ui,F,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}));this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,R,V,Q){var P=document.createElement("a");P.setAttribute("title",G);P.style.cursor="pointer";mxUtils.write(P,G);mxEvent.addListener(P,"click",R);Q&&(P.style.textDecoration="underline");null!=V&&(G=K.cloneNode(),G.style.padding=V,G.appendChild(P),P=G);return P}),k=mxUtils.bind(this,function(G){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));G||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(G=0;G<V.length;G++)(function(Q){mxUtils.write(R," / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(G)}E.appendChild(R)}),v=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}))}),t=null,x=null,A=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var R=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/tree?path="+u+"&ref="+p+"&per_page=100&page="+G,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!p),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==-u||null==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var O=JSON.parse(Q.getText());if(null==O||0==O.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<O.length;M++)mxUtils.bind(this,function(T){if(C==("tree"==T.type)){var m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==-T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("tree"==T.type?"/":""),mxUtils.bind(this,function(){"tree"==T.type?(u=T.path,A()):e&&"blob"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+p+"/"+T.path))})));E.appendChild(m);y++}})(O[M])});B(!0);e&&B(!1);100==y&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&V()},mxEvent.addListener(E,"scroll",x))}}))}),+u||null==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var P=JSON.parse(Q.getText());if(null==P||0==P.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<P.length;M++)mxUtils.bind(this,function(T){if(C==("tree"==T.type)){var m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==+T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("tree"==T.type?"/":""),mxUtils.bind(this,function(){"tree"==T.type?(u=T.path,A()):e&&"blob"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+p+"/"+T.path))})));E.appendChild(m);y++}})(P[M])});B(!0);e&&B(!1);100==y&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&V()},mxEvent.addListener(E,"scroll",x))}}))}),v,!0)}),J=mxUtils.bind(this,function(G,R){null==G&&(E.innerText="",G=1);var V=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/branches?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,-mxResources.get("more")+"...");var Q=mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(O){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(O.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=+mxResources.get("more")+"...");var Q=mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(P.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=encodeURIComponent(B.name);u="";A()})));E.appendChild(M)})(q[y],y);100==q.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&Q()},mxEvent.addListener(E,"scroll",x))}}))}),v)});d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));-var D=mxUtils.bind(this,function(G){var R=this.ui.spinner,V=0;this.ui.spinner.stop();var Q=function(){R.spin(E,mxResources.get("loading"));V+=1},O=function(){--V;0===V&&R.stop()};null==G&&(E.innerText="",G=1);null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===V&&D(G+1)});mxEvent.addListener(t,-"click",q);var y=mxUtils.bind(this,function(C){Q();var M=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){this.ui.tryAndHandle(mxUtils.bind(this,function(){C(JSON.parse(T.getText()));O()}))}),v)}),B=mxUtils.bind(this,function(C,M){Q();var T=new mxXmlRequest(this.baseUrl+"/groups/"+C.id+"/projects?per_page=100",null,"GET");this.executeRequest(T,mxUtils.bind(this,function(m){this.ui.tryAndHandle(mxUtils.bind(this,function(){M(C,JSON.parse(m.getText()));-O()}))}),v)});y(mxUtils.bind(this,function(C){if(null==this.user)mxUtils.write(E,mxResources.get("loggedOut"));else{Q();var M=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+G,null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){T=JSON.parse(T.getText());if(null!=T&&0!=T.length||null!=C&&0!=C.length){1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===V){var I=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),+var D=mxUtils.bind(this,function(G){var R=this.ui.spinner,V=0;this.ui.spinner.stop();var Q=function(){R.spin(E,mxResources.get("loading"));V+=1},P=function(){--V;0===V&&R.stop()};null==G&&(E.innerText="",G=1);null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===V&&D(G+1)});mxEvent.addListener(t,+"click",q);var y=mxUtils.bind(this,function(C){Q();var M=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){this.ui.tryAndHandle(mxUtils.bind(this,function(){C(JSON.parse(T.getText()));P()}))}),v)}),B=mxUtils.bind(this,function(C,M){Q();var T=new mxXmlRequest(this.baseUrl+"/groups/"+C.id+"/projects?per_page=100",null,"GET");this.executeRequest(T,mxUtils.bind(this,function(m){this.ui.tryAndHandle(mxUtils.bind(this,function(){M(C,JSON.parse(m.getText()));+P()}))}),v)});y(mxUtils.bind(this,function(C){if(null==this.user)mxUtils.write(E,mxResources.get("loggedOut"));else{Q();var M=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+G,null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){T=JSON.parse(T.getText());if(null!=T&&0!=T.length||null!=C&&0!=C.length){1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===V){var I=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),mxUtils.bind(this,function(L){null!=L&&(L=L.split("/"),1<L.length?(l=L.slice(0,L.length-1).join("/"),n=L[L.length-1],u="",J(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(I.container,300,80,!0,!1);I.init()}}))),mxUtils.br(E),mxUtils.br(E));for(var m=!0,z=0;z<T.length;z++)mxUtils.bind(this,function(I){var L=K.cloneNode();L.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;L.appendChild(g(I.name_with_namespace,-mxUtils.bind(this,function(){0===V&&(l=I.owner.username,n=I.path,u="",J(null,!0))})));E.appendChild(L)})(T[z]);for(z=0;z<C.length;z++)Q(),B(C[z],mxUtils.bind(this,function(I,L){O();for(var N=0;N<L.length;N++){var P=K.cloneNode();P.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;mxUtils.bind(this,function(S){P.appendChild(g(S.name_with_namespace,mxUtils.bind(this,function(){0===V&&(l=I.full_path,n=S.path,u="",J(null,!0))})));E.appendChild(P)})(L[N])}}));O()}else O(),mxUtils.br(E),+mxUtils.bind(this,function(){0===V&&(l=I.owner.username,n=I.path,u="",J(null,!0))})));E.appendChild(L)})(T[z]);for(z=0;z<C.length;z++)Q(),B(C[z],mxUtils.bind(this,function(I,L){P();for(var N=0;N<L.length;N++){var O=K.cloneNode();O.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;mxUtils.bind(this,function(S){O.appendChild(g(S.name_with_namespace,mxUtils.bind(this,function(){0===V&&(l=I.full_path,n=S.path,u="",J(null,!0))})));E.appendChild(O)})(L[N])}}));P()}else P(),mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));100==T.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&q()},mxEvent.addListener(E,"scroll",x))}),v)}}))});b?this.user?D():this.updateUser(function(){D()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,n,p){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=n;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,n,p,u){DrawioComment.call(this,b,e,f,c,l,n,p);this.pCommentId=u};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(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(n){e(n.replyId)}),f)};DriveComment.prototype.editComment=function(b,e,f){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,f)};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,f,c,l,n,p,u,F,H,E,K,d,g){function k(U,W){W=W||document;return W.querySelector(U)}function v(U,W,X){if(null==U["@microsoft.graph.downloadUrl"])if(null==U.parentReference)X();else{c(U.id,U.parentReference.driveId,function(ba){v(ba,W,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",U["@microsoft.graph.downloadUrl"]);var Y=U.file?"image/png"==U.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Z.responseText;Y?(ba="data:image/png;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPng(ba)):/\.pdf$/.test(U.name)&&(ba="data:application/pdf;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPdf(ba));var ea=mxUtils.parseXml(ba),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(fa){}X()}};(Y||/\.pdf$/.test(U.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");-Z.send()}function t(){K&&null!=y?q.exportToCanvas(function(U){U=EditorUi.prototype.createImageDataUri(U,null,"png");p(B,U);n(B)},400,null,null,function(U){console.log(U)},600,null,null,null,null,null,y):(p(B,void 0),n(B))}function x(U){function W(X){N.style.background="transparent";N.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);N.appendChild(Z);O.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==U||U.folder||/\.drawiolib$/.test(U.name))W(mxResources.get("noPreview"));-else try{null!=U.remoteItem&&(U=U.remoteItem),z=U,O.spin(N),v(U,function(X){O.stop();if(z==U)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");y=AspectDialog.prototype.createViewer(N,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){B=null;W(mxResources.get("notADiagramFile"))})}catch(X){B=null,W(mxResources.get("notADiagramFile"))}}function A(){var U=k(".odFilesBreadcrumb");if(null!=U){U.innerText="";for(var W=+Z.send()}function t(){K&&null!=y?q.exportToCanvas(function(U){U=EditorUi.prototype.createImageDataUri(U,null,"png");p(B,U);n(B)},400,null,null,function(U){console.log(U)},600,null,null,null,null,null,y):(p(B,void 0),n(B))}function x(U){function W(X){N.style.background="transparent";N.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);N.appendChild(Z);P.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==U||U.folder||/\.drawiolib$/.test(U.name))W(mxResources.get("noPreview"));+else try{null!=U.remoteItem&&(U=U.remoteItem),z=U,P.spin(N),v(U,function(X){P.stop();if(z==U)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");y=AspectDialog.prototype.createViewer(N,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){B=null;W(mxResources.get("notADiagramFile"))})}catch(X){B=null,W(mxResources.get("notADiagramFile"))}}function A(){var U=k(".odFilesBreadcrumb");if(null!=U){U.innerText="";for(var W=0;W<T.length-1;W++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=mxUtils.htmlEntities(T[W].name||mxResources.get("home"));U.appendChild(X);(function(Y,ba){X.addEventListener("click",function(){e(null);T=T.slice(0,ba);D(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[W],W);var Z=document.createElement("span");Z.innerHTML=" > ";U.appendChild(Z)}null!=T[T.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get(F?"selectFolder":-"officeSelDiag"):T[T.length-1].name||mxResources.get("home")),U.appendChild(W))}}function J(){if(null!=B&&!M)if("sharepoint"==C)D("site",null,B.id,B.displayName);else if("site"==C)D("subsite",null,B.id,B.name);else{var U=B.folder;B=B.remoteItem?B.remoteItem:B;var W=(B.parentReference?B.parentReference.driveId:null)||C,X=B.id;U?D(W,X,null,B.name):t()}}function D(U,W,X,Z,Y){function ba(qa){O.stop();var ua=document.createElement("table");ua.className="odFileListGrid";for(var ya=null,ja=0,ma=0;null!=+"officeSelDiag"):T[T.length-1].name||mxResources.get("home")),U.appendChild(W))}}function J(){if(null!=B&&!M)if("sharepoint"==C)D("site",null,B.id,B.displayName);else if("site"==C)D("subsite",null,B.id,B.name);else{var U=B.folder;B=B.remoteItem?B.remoteItem:B;var W=(B.parentReference?B.parentReference.driveId:null)||C,X=B.id;U?D(W,X,null,B.name):t()}}function D(U,W,X,Z,Y){function ba(qa){P.stop();var ua=document.createElement("table");ua.className="odFileListGrid";for(var ya=null,ja=0,ma=0;null!=qa&&ma<qa.length;ma++){var ka=qa[ma];if(1!=fa||!ka.webUrl||0<ka.webUrl.indexOf("sharepoint.com/sites/")||0>ka.webUrl.indexOf("sharepoint.com/")){var Ba=ka.displayName||ka.name,sa=mxUtils.htmlEntities(ka.description||Ba);fa&&(ka.folder=2==fa?{isRoot:!0}:!0);var Ea=null!=ka.folder;if(!F||Ea){var wa=document.createElement("tr");wa.className=ja++%2?"odOddRow":"odEvenRow";var Ca=document.createElement("td");Ca.style.width="36px";var Da=document.createElement("img");Da.src="/images/"+(Ea?"folder.png":"file.png");Da.className="odFileImg";Ca.appendChild(Da);wa.appendChild(Ca);Ca=document.createElement("td");Ea=document.createElement("div");Ea.className="odFileTitle";Ea.innerHTML=mxUtils.htmlEntities(Ba);Ea.setAttribute("title",sa);Ca.appendChild(Ea);wa.appendChild(Ca);ua.appendChild(wa);null==ya&&(ya=wa,ya.className+=" odRowSelected",B=ka,C=U,g||e(B));(function(Ka,Aa){wa.addEventListener("dblclick",J);wa.addEventListener("click",function(){ya!=Aa&&(ya.className=ya.className.replace("odRowSelected",""),ya=Aa,ya.className+=" odRowSelected",B=Ka,C=U,g||e(B))})})(ka,wa)}}}0==ja?(qa=document.createElement("div"),qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),da.appendChild(qa)):da.appendChild(ua);A();M=!1}function ea(qa){f(qa?qa:ha,function(ua){if(ca){var ya=ua.value||[];if(g||fa)Array.prototype.push.apply(xa,ya);else{for(var ja=0;ja<ya.length;ja++){var ma=ya[ja],ka=ma.file?ma.file.mimeType:null;(ma.folder||"text/html"==ka||"text/xml"==ka||"application/xml"==ka||"image/png"==ka||/\.svg$/.test(ma.name)||/\.html$/.test(ma.name)||/\.xml$/.test(ma.name)||/\.png$/.test(ma.name)||/\.drawio$/.test(ma.name)||/\.drawiolib$/.test(ma.name)||/\.pdf$/.test(ma.name))&&xa.push(ma)}xa.sort(function(Ba,sa){var Ea=Ba.name.toLowerCase(),wa=sa.name.toLowerCase();return Ba.folder&&!sa.folder?-1:!Ba.folder&&sa.folder?1:Ea<wa?-1:Ea>wa?1:0})}ua["@odata.nextLink"]&&1E3>xa.length?ea(ua["@odata.nextLink"]):(clearTimeout(aa),ba(xa))}},function(ua){if(ca){clearTimeout(aa);-var ya=null;try{ya=JSON.parse(ua.responseText).error.message}catch(ja){}u(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ya?" ("+ya+")":""));M=!1;O.stop()}},null!=qa)}if(!M){k(".odCatsList").style.display="block";k(".odFilesSec").style.display="block";null!=N&&(N.innerText="",N.style.top="50%");var ca=M=!0,fa=0;m=arguments;var aa=setTimeout(function(){M=ca=!1;O.stop();u(mxResources.get("timeout"))},2E4),da=k(".odFilesList");da.innerText="";O.spin(da);switch(U){case "recent":T=+var ya=null;try{ya=JSON.parse(ua.responseText).error.message}catch(ja){}u(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ya?" ("+ya+")":""));M=!1;P.stop()}},null!=qa)}if(!M){k(".odCatsList").style.display="block";k(".odFilesSec").style.display="block";null!=N&&(N.innerText="",N.style.top="50%");var ca=M=!0,fa=0;m=arguments;var aa=setTimeout(function(){M=ca=!1;P.stop();u(mxResources.get("timeout"))},2E4),da=k(".odFilesList");da.innerText="";P.spin(da);switch(U){case "recent":T=[{name:mxResources.get("recent",null,"Recent"),driveId:U}];var ia=l()||{},pa=[],oa;for(oa in ia)pa.push(ia[oa]);clearTimeout(aa);ba(pa);return;case "shared":var ha="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:U}];break;case "sharepoint":ha="/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:U}];fa=1;break;case "site":T.push({name:Z,driveId:U,folderId:W,siteId:X});ha="/sites/"+X+"/drives";fa=2;break;case "subsite":T.push({name:Z,driveId:U,folderId:W,siteId:X});ha="/drives/"+X+(W?"/items/"+W:"/root")+"/children";break;case "search":U=C;T=[{driveId:U,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));ha=U?"/drives/"+U+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+Y+"')";break;default:null==W?T=[{driveId:U}]:T.push({name:Z,driveId:U,folderId:W}),ha=(U?"/drives/"+U:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}fa||(ha+=(0<ha.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");-var xa=[];ea()}}function G(U){P.className=P.className.replace("odCatSelected","");P=U;P.className+=" odCatSelected"}function R(U){M||(S=null,D("search",null,null,null,U))}var V="";null==e&&(e=x,V='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var U=null;try{U=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return U});null==n&&(n=function(U){if(null!=U){var W=l()||{};delete U["@microsoft.graph.downloadUrl"];W[U.id]=U;localStorage.setItem("mxODPickerRecentList",+var xa=[];ea()}}function G(U){O.className=O.className.replace("odCatSelected","");O=U;O.className+=" odCatSelected"}function R(U){M||(S=null,D("search",null,null,null,U))}var V="";null==e&&(e=x,V='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var U=null;try{U=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return U});null==n&&(n=function(U){if(null!=U){var W=l()||{};delete U["@microsoft.graph.downloadUrl"];W[U.id]=U;localStorage.setItem("mxODPickerRecentList",JSON.stringify(W))}});V='<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 class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+V+(H?'<div id="odBackBtn" class="odLinkBtn">< '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(E?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(F?"select":"open"))+"</button>":"");var Q=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();Q=".odCatsList *, .odFilesSec * { user-select: none; }.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 {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+(Q?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(Q?"":"\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;}";-var O=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),q=new Editor,y=null,B=null,C=null,M=!1,T=[],m=null,z=null;this.getSelectedItem=function(){null!=B&&n(B);return B};if(null==k("#mxODPickerCss")){var I=document.head||document.getElementsByTagName("head")[0],L=document.createElement("style");I.appendChild(L);L.type="text/css";L.id="mxODPickerCss";L.appendChild(document.createTextNode(Q))}b.innerHTML=-V;var N=k(".odPreview"),P=k("#odFiles");b=function(U,W){W=W||document;return W.querySelectorAll(U)}(".odCatListTitle");for(V=0;V<b.length;V++)b[V].addEventListener("click",function(){B=z=null;if(!M)switch(G(this),this.id){case "odFiles":D();break;case "odRecent":D("recent");break;case "odShared":D("shared");break;case "odSharepoint":D("sharepoint")}});var S=null;k("#odSearchBox").addEventListener("keyup",function(U){var W=this;null!=S&&clearTimeout(S);13==U.keyCode?R(W.value):S=setTimeout(function(){R(W.value)},+var P=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),q=new Editor,y=null,B=null,C=null,M=!1,T=[],m=null,z=null;this.getSelectedItem=function(){null!=B&&n(B);return B};if(null==k("#mxODPickerCss")){var I=document.head||document.getElementsByTagName("head")[0],L=document.createElement("style");I.appendChild(L);L.type="text/css";L.id="mxODPickerCss";L.appendChild(document.createTextNode(Q))}b.innerHTML=+V;var N=k(".odPreview"),O=k("#odFiles");b=function(U,W){W=W||document;return W.querySelectorAll(U)}(".odCatListTitle");for(V=0;V<b.length;V++)b[V].addEventListener("click",function(){B=z=null;if(!M)switch(G(this),this.id){case "odFiles":D();break;case "odRecent":D("recent");break;case "odShared":D("shared");break;case "odSharepoint":D("sharepoint")}});var S=null;k("#odSearchBox").addEventListener("keyup",function(U){var W=this;null!=S&&clearTimeout(S);13==U.keyCode?R(W.value):S=setTimeout(function(){R(W.value)},500)});k("#refreshOD").addEventListener("click",function(){if(null!=m){e(null);var U=T.slice();D.apply(this,m);T=U}});H&&k("#odBackBtn").addEventListener("click",H);E&&k("#odSubmitBtn").addEventListener("click",t);null!=d?(H=d.pop(),"sharepoint"==d[0].driveId&&G(k("#odSharepoint")),T=d,D(H.driveId,H.folderId,H.siteId,H.name)):D()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),null!=c.lastChanged&&(Date.now(),c.lastChanged.getTime()),Date.now(),App.startTime.getTime(),c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&c.getSize())}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.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=":(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,l,n){if("1"==urlParams.openInSameWin||navigator.standalone)null!=n&&n();else{var p=null;try{p=window.open(c)}catch(u){}null==p||void 0===p?this.showDialog((new PopupDialog(this,c,l,n)).container,320,160,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&@@ -14044,17 +14045,18 @@ null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===if(null!=t){EditorUi.debug("Setting configuration",JSON.stringify(t));if(null!=t.merge){var x=localStorage.getItem(Editor.configurationKey);if(null!=x)try{var A=JSON.parse(x),J;for(J in t.merge)A[J]=t.merge[J];t=A}catch(D){window.location.hash="",alert(D)}else t=t.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(t)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(D){window.location.hash="",alert(D)}1<k.length&&(Graph.prototype.defaultThemes["default-style2"]=k[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=k[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?v():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],v,function(D){document.body.innerHTML="";var G=document.createElement("pre");mxUtils.write(G,D.stack);document.body.appendChild(G)}))},function(k){k=document.getElementById("geStatus");null!=k&&(k.innerHTML="Error loading page. <a>Please try refreshing.</a>",k.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';-else if(App.isMainCalled=!0,window.onerror=function(g,k,v,t,x){EditorUi.logError("Global: "+(null!=g?g:""),k,v,t,x,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x)):console.error("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x);window.setTimeout(function(){alert("Error: "+(null!=g?g:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&-"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}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&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var n=document.getElementById("geBootstrap");-if(null!=n){var p=mxUtils.getTextContent(n);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(p).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var u=document.getElementById("geMain");null!=u&&(p=mxUtils.getTextContent(u),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(p).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&-("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(g){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||-"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var F=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var H=JSON.parse(localStorage.getItem(mxSettings.key));null!=H&&(F=H.plugins)}catch(g){}H=urlParams.p;App.initPluginCallback();null!=H&&App.loadPlugins(H.split(";"));if(null!=F&&0<-F.length&&"0"!=urlParams.plugins)for(l=0;l<F.length;l++)try{("/"==F[l].charAt(0)&&(F[l]=PLUGINS_BASE_PATH+F[l]),App.isSameDomain(F[l]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(F[l])?null==App.pluginsLoaded[F[l]]&&(App.pluginsLoaded[F[l]]=!0,App.embedModePluginsCount++,mxscript(F[l])):null!=window.console&&console.log("Unknown plugin:",F[l]):null!=window.console&&console.log("Blocked plugin:",F[l])}catch(g){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&-"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var E=window.opener||window.parent,K=function(g){if(g.source==E)try{var k=JSON.parse(g.data);null!=k&&"configure"==-k.action&&(mxEvent.removeListener(window,"message",K),Editor.configure(k.config),mxSettings.load(),null!=k.config.darkColor&&document.body.style.setProperty("--dark-color",k.config.darkColor),k.colorSchemeMeta&&mxmeta("color-scheme","dark light"),f())}catch(v){null!=window.console&&console.log("Error in configure message: "+v,g.data)}};mxEvent.addListener(window,"message",K);E.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",-window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var d=localStorage.getItem(Editor.configurationKey);if(null!=d)try{d=JSON.parse(d),null!=d&&(EditorUi.debug("Using local configuration",d),Editor.configure(d),mxSettings.load())}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):-console.error(g)}}}f()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(g){document.body.innerHTML="",F=document.createElement("pre"),mxUtils.write(F,g.stack),document.body.appendChild(F)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;-"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;+else if(mxUtils.lightDarkColorSupported||mxUtils.get("styles/grapheditor.css",mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){var k=document.createElement("style");k.type="text/css";k.appendChild(document.createTextNode(g.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1")));document.head.appendChild(k)}})),App.isMainCalled=!0,window.onerror=function(g,k,v,t,x){EditorUi.logError("Global: "+(null!=g?g:""),k,v,t,x,null,!0);null==+window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x)):console.error("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x);window.setTimeout(function(){alert("Error: "+(null!=g?g:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");+null!=l&&l.parentNode.removeChild(l)}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&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var n=document.getElementById("geBootstrap");if(null!=n){var p=mxUtils.getTextContent(n);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(p).toString()&&+(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var u=document.getElementById("geMain");null!=u&&(p=mxUtils.getTextContent(u),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(p).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||+/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(g){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||+"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var F=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var H=JSON.parse(localStorage.getItem(mxSettings.key));null!=H&&(F=H.plugins)}catch(g){}H=urlParams.p;App.initPluginCallback();null!=H&&App.loadPlugins(H.split(";"));if(null!=F&&0<F.length&&"0"!=urlParams.plugins)for(l=+0;l<F.length;l++)try{("/"==F[l].charAt(0)&&(F[l]=PLUGINS_BASE_PATH+F[l]),App.isSameDomain(F[l]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(F[l])?null==App.pluginsLoaded[F[l]]&&(App.pluginsLoaded[F[l]]=!0,App.embedModePluginsCount++,mxscript(F[l])):null!=window.console&&console.log("Unknown plugin:",F[l]):null!=window.console&&console.log("Blocked plugin:",F[l])}catch(g){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&+"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var E=window.opener||window.parent,K=function(g){if(g.source==E)try{var k=JSON.parse(g.data);null!=k&&"configure"==k.action&&(mxEvent.removeListener(window,"message",+K),Editor.configure(k.config),mxSettings.load(),null!=k.config.darkColor&&document.body.style.setProperty("--dark-color",k.config.darkColor),k.colorSchemeMeta&&mxmeta("color-scheme","dark light"),f())}catch(v){null!=window.console&&console.log("Error in configure message: "+v,g.data)}};mxEvent.addListener(window,"message",K);E.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),+Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var d=localStorage.getItem(Editor.configurationKey);if(null!=d)try{d=JSON.parse(d),null!=d&&(EditorUi.debug("Using local configuration",d),Editor.configure(d),mxSettings.load())}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}}}f()}}else document.body.innerHTML=+'<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(g){document.body.innerHTML="",F=document.createElement("pre"),mxUtils.write(F,g.stack),document.body.appendChild(F)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;+App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var f=0;f<b.length;f++)if(null!=b[f]&&0<b[f].length)try{if(null!=App.pluginRegistry[b[f]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[f]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[f])}catch(l){null!=window.console&&console.log("Error loading plugin:",b[f],l)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};@@ -14095,9 +14097,9 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modApp.prototype.updateDocumentTitle=function(){var b=this.editor.appName,e=this.getCurrentFile();null==e||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};App.prototype.getThumbnail=function(b,e,f){f=null!=f?f:0;var c=!1;try{var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;e(null)}),this.timeout),p=mxUtils.bind(this,function(Q){window.clearTimeout(n);l&&e(Q)});null==this.thumbImageCache&&(this.thumbImageCache={});var u=this.editor.graph,F=u.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var H=u.getGlobalVariable;u=this.createTemporaryGraph(u.getStylesheet());u.setBackgroundImage=this.editor.graph.setBackgroundImage;var E=this.pages[0];this.currentPage==E?u.setBackgroundImage(F):null!=E.viewState&&null!=E.viewState&&(F=E.viewState.backgroundImage,u.setBackgroundImage(F));u.getGlobalVariable=function(Q){return"page"==Q?E.getName():"pagenumber"==Q?1:H.apply(this,arguments)};u.getGlobalVariable=H;document.body.appendChild(u.container);u.model.setRoot(E.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(Q){try{u!=this.editor.graph&&null!=u.container.parentNode&&-u.container.parentNode.removeChild(u.container)}catch(O){Q=null}p(Q)}),b,this.thumbImageCache,"#ffffff",function(){p()},null,null,null,null,null,null,u,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var K=document.createElement("canvas"),d=u.getGraphBounds(),g=u.view.translate,k=u.view.scale;null!=F&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle((g.x+F.x)*k,(g.y+F.y)*k,F.width*k,F.height*k)));var v=b/d.width;v=Math.min(1,Math.min(3*b/(4*d.height),+u.container.parentNode.removeChild(u.container)}catch(P){Q=null}p(Q)}),b,this.thumbImageCache,"#ffffff",function(){p()},null,null,null,null,null,null,u,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var K=document.createElement("canvas"),d=u.getGraphBounds(),g=u.view.translate,k=u.view.scale;null!=F&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle((g.x+F.x)*k,(g.y+F.y)*k,F.width*k,F.height*k)));var v=b/d.width;v=Math.min(1,Math.min(3*b/(4*d.height),v));var t=Math.floor(d.x),x=Math.floor(d.y);K.setAttribute("width",Math.ceil(v*(d.width+4)));K.setAttribute("height",Math.ceil(v*(d.height+4)));var A=K.getContext("2d");A.scale(v,v);A.translate(-t,-x);var J=u.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";A.save();A.fillStyle=J;A.fillRect(t,x,Math.ceil(d.width+4),Math.ceil(d.height+4));A.restore();if(null!=F){var D=new Image;D.src=F.src;A.drawImage(D,F.x*v,F.y*v,F.width*v,F.height*v)}var G=new mxJsCanvas(K),R=new mxAsyncCanvas(this.thumbImageCache);-G.images=this.thumbImageCache.images;var V=new mxImageExport;V.drawShape=function(Q,O){Q.shape instanceof mxShape&&Q.shape.checkBounds()&&(O.save(),O.translate(.5,.5),Q.shape.paint(O),O.translate(-.5,-.5),O.restore())};V.drawText=function(Q,O){};V.drawState(u.getView().getState(u.model.root),R);R.finish(mxUtils.bind(this,function(){try{V.drawState(u.getView().getState(u.model.root),G),u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}catch(Q){K=null}p(K)}));+G.images=this.thumbImageCache.images;var V=new mxImageExport;V.drawShape=function(Q,P){Q.shape instanceof mxShape&&Q.shape.checkBounds()&&(P.save(),P.translate(.5,.5),Q.shape.paint(P),P.translate(-.5,-.5),P.restore())};V.drawText=function(Q,P){};V.drawState(u.getView().getState(u.model.root),R);R.finish(mxUtils.bind(this,function(){try{V.drawState(u.getView().getState(u.model.root),G),u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}catch(Q){K=null}p(K)}));c=!0}}catch(Q){c=!1,null!=u&&u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}c||window.clearTimeout(n);return c};(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){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(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+e+"; expires="+l.toUTCString()}}catch(n){}}})();@@ -14277,7 +14279,7 @@ Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);nuc.style.marginLeft="4px";c.style.cursor="help";c.style.color="blue";var l=document.createElement("img");l.setAttribute("src",Editor.helpImage);l.setAttribute("valign","bottom");l.setAttribute("border","0");l.className="geAdaptiveAsset";mxUtils.setOpacity(l,60);l.style.height="16px";l.style.width="16px";c.appendChild(l);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(n){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(n)}));return c};Menus.prototype.addLinkToItem=function(f,c){null!=f&&(c=this.createHelpLink(c),c.style.display="inline",c.style.marginLeft="8px",f.firstChild.nextSibling.appendChild(c))};Menus.prototype.removeCustomFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==f&&this.customFonts[l].url==c){this.customFonts.splice(l,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==f&&this.customFonts[l].url==c)return!0;for(l=0;l<this.defaultFonts.length;l++){var n=this.defaultFonts[l];if("string"!==typeof n&&n.fontFamily==f&&n.fontUrl==c||"string"===typeof n&&n==f&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(f,c){null==f||this.containsFont(f,c)||(this.customFonts.push({name:f,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var e=Menus.prototype.init;Menus.prototype.init=function(){function f(q,-y,B){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(C,M,T,m,z,I,L,N,P,S,U,W,X){var Z=parseInt(C);!isNaN(Z)&&0<Z&&(c.exportImage(Z/100,M&&"png"==q,T,m,z&&"png"==q,L,!N,P,q,U,null,W,X),null!=B&&B(C,M,T,m,z,I,L,N,P,S,U,W,X))}),!0,y,q,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(C,M,T,m,+y,B){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(C,M,T,m,z,I,L,N,O,S,U,W,X){var Z=parseInt(C);!isNaN(Z)&&0<Z&&(c.exportImage(Z/100,M&&"png"==q,T,m,z&&"png"==q,L,!N,O,q,U,null,W,X),null!=B&&B(C,M,T,m,z,I,L,N,O,S,U,W,X))}),!0,y,q,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(C,M,T,m,z){c.downloadFile(M&&"png"==q?"xmlpng":q,null,null,C,null,null,T,m,z)}),!1,!0)}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,n=mxUtils.bind(l,l.isEnabled);mxClient.IS_SVG||c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));c.actions.addAction("new...",function(){var q=c.isOffline(),y=new NewDialog(c,q,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(y.container,q?350:620,q?70:460,!0,!0,function(B){c.sidebar.hideTooltip();B&&null==c.getCurrentFile()&&c.showSplash()});y.init()});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var q=new NewDialog(c,null,!1,function(y){c.hideDialog();if(null!=y){var B=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(y,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(q.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});q.init()}})).isEnabled=n;var p=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isShareCursorPosition()});p=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});p.setToggleAction(!0);@@ -14290,8 +14292,8 @@ p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isAutoDarkMode(!p=c.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(q){c.setSketchMode(!Editor.sketchMode)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return Editor.sketchMode});c.actions.addAction("properties...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new FilePropertiesDialog(c,q);c.showDialog(q.container,340,200,!0,!0);q.init()})}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==c.freehandWindow){var q=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,q?126:90,q)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();c.freehandWindow.window.setVisible(l.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var y=null==c.pages||1>=c.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(B);var C=c.addCheckbox(q,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(q,mxResources.get("compressed"),Editor.defaultCompressed),T=c.addCheckbox(q,mxResources.get("allPages"),!y,y);T.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?T.setAttribute("disabled",-"disabled"):T.removeAttribute("disabled")});q=new CustomDialog(c,q,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!C.checked,y||!T.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,y,B,C,M,T,m,z,I,L,N,P){m=[];C&&I&&m.push("tags=%7B%7D");q=new EmbedDialog(c,-c.createLink(q,y,!0,C,M,T,null,!0,m,null,B,null,P));c.showDialog(q.container,450,240,!0,!0);q.init()},null,!0)}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("export"),null,q,function(y,B,C,M,T,m,z,I,L,N,P,S){c.createHtml(y,B,C,M,T,m,z,I,L,N,P,mxUtils.bind(this,function(U,W){var X=c.getBaseFilename(z);U='\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>'++"disabled"):T.removeAttribute("disabled")});q=new CustomDialog(c,q,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!C.checked,y||!T.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,y,B,C,M,T,m,z,I,L,N,O){m=[];C&&I&&m.push("tags=%7B%7D");q=new EmbedDialog(c,+c.createLink(q,y,!0,C,M,T,null,!0,m,null,B,null,O));c.showDialog(q.container,450,240,!0,!0);q.init()},null,!0)}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("export"),null,q,function(y,B,C,M,T,m,z,I,L,N,O,S){c.createHtml(y,B,C,M,T,m,z,I,L,N,O,mxUtils.bind(this,function(U,W){var X=c.getBaseFilename(z);U='\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(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+U+"\n"+W+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",U,"text/html")}),S)})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport?c.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(q,y){q=null!=c.pages?c.pages.length:1;var B=null==c.pages||1>=c.pages.length,C=c.getPageIndex(c.currentPage);C=null!=C?C+1:1;c.downloadFile("pdf",null,null,!y.selection,B||!y.allPages&&y.pagesFrom==C&&y.pagesTo==C,!y.crop,y.transparent,y.scale,null,y.grid,y.includeCopy,y.allPages||y.pagesFrom==C&&y.pagesTo==C?null:{from:Math.max(0,Math.min(q-1,y.pagesFrom-1)),to:Math.max(0,Math.min(q-1,y.pagesTo-1))},y.border,y.fit,y.sheetsAcross,y.sheetsDown)})):c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,320,null!=c.pages&&1<c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function q(){null!=y&&y.removeDraft();c.fileLoaded(null)}var y=c.getCurrentFile();null!=y&&y.isModified()?c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var q=l.getSelectionCell(),@@ -14303,7 +14305,7 @@ p.isEnabled=n);p=c.actions.put("defaultAdaptiveColors",new Action(mxResources.gefunction(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="none";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"none"==l.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],y)})));isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var u=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});u.setToggleAction(!0);u.setSelectedCallback(function(){return u.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var q=l.getSelectionCells(),y=[],B=0;B<q.length;B++)l.getModel().isVertex(q[B])&&y.push(q[B]);0<y.length&&(q=new EditGeometryDialog(c,y),c.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");c.actions.addAction("copyStyle",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.getCellStyle(q,!1);c.copiedStyle={};var B=[],C=[],M;for(M in y)B.push(y[M]),C.push(M);l.copyCellStyles([q],C,B,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=c.copiedStyle&&l.pasteCellStyles(l.includeDescendants(l.getSelectionCells()),-c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(q,y,B,C,M,T,m,z,I,L,N,P,S,U){q=parseInt(q);c.lastExportSvgEditable=M;!isNaN(q)&&0<q&&c.exportSvg(q/100,y,B,C,M,T,m,!z,I,L,P,S,U)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")++c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(q,y,B,C,M,T,m,z,I,L,N,O,S,U){q=parseInt(q);c.lastExportSvgEditable=M;!isNaN(q)&&0<q&&c.exportSvg(q/100,y,B,C,M,T,m,!z,I,L,O,S,U)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){f("png",c.lastExportPngEditable,function(q,y,B,C,M){c.lastExportPngEditable=M})}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){f("jpeg")}));c.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){f("webp")}));p=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),y=mxUtils.getXml(0==q.length?c.editor.getGraphXml():l.encodeCells(q));c.copyImage(q,y)}),null,null,"Ctrl+Alt+X");p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(q,y){}));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...",@@ -14326,8 +14328,8 @@ B);B()}}return y}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{oc.adaptiveColorsWindow.window.setVisible(!0)}));p=this.get("viewZoom");var H=p.funct;p.funct=mxUtils.bind(this,function(q,y){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],y)});p=this.get("layout");var E=p.funct;p.funct=function(q,y){E.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var B=null,C=20,M=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=B&&c.tryAndHandle(mxUtils.bind(this,function(){var U=c.editor.graph,W=new mxOrgChartLayout(U,B,C,M),X=U.getDefaultParent();1<U.model.getChildCount(U.getSelectionCell())&&(X=U.getSelectionCell());W.execute(X)}))},m=document.createElement("div"),z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("orgChartType")+": ");m.appendChild(z);var I=document.createElement("select");I.style.width="160px";I.style.boxSizing="border-box";z=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var L=0;L<z.length;L++){var N=document.createElement("option");mxUtils.write(N,z[L]);N.value=L;2==L&&N.setAttribute("selected","selected");I.appendChild(N)}mxEvent.addListener(I,"change",function(){B=I.value});m.appendChild(I);z=document.createElement("div");z.style.marginTop="6px";z.style.display=-"inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("parentChildSpacing")+": ");m.appendChild(z);var P=document.createElement("input");P.type="number";P.value=C;P.style.width="160px";P.style.boxSizing="border-box";m.appendChild(P);mxEvent.addListener(P,"change",function(){C=P.value});z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("siblingSpacing")+": ");m.appendChild(z);var S=document.createElement("input");-S.type="number";S.value=M;S.style.width="160px";S.style.boxSizing="border-box";m.appendChild(S);mxEvent.addListener(S,"change",function(){M=S.value});z=mxUtils.button(mxResources.get("custom")+"...",function(){var U=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),parentChildSpacing:parseInt(P.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(U,null,2))});z.className="geBtn";m=new CustomDialog(c,m,function(){null==B&&(B=2);c.loadOrgChartLayouts(T)},+"inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("parentChildSpacing")+": ");m.appendChild(z);var O=document.createElement("input");O.type="number";O.value=C;O.style.width="160px";O.style.boxSizing="border-box";m.appendChild(O);mxEvent.addListener(O,"change",function(){C=O.value});z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("siblingSpacing")+": ");m.appendChild(z);var S=document.createElement("input");+S.type="number";S.value=M;S.style.width="160px";S.style.boxSizing="border-box";m.appendChild(S);mxEvent.addListener(S,"change",function(){M=S.value});z=mxUtils.button(mxResources.get("custom")+"...",function(){var U=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),parentChildSpacing:parseInt(O.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(U,null,2))});z.className="geBtn";m=new CustomDialog(c,m,function(){null==B&&(B=2);c.loadOrgChartLayouts(T)},null,null,null,z);c.showDialog(m.container,355,140,!0,!0)},y,null,n());q.addSeparator(y);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(l);B.checkOverlap=!0;c.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(C){c.tryAndHandle(mxUtils.bind(this,function(){B.spacing=C;c.executeLayout(function(){B.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}))}))}),y);q.addSeparator(y);c.menus.addMenuItem(q,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,y){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(q,["keyboardShortcuts","-","about"],y);else{var B=q.addItem("Search:",null,null,y,null,null,!1);B.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.borderWidth="1px";C.style.marginLeft="8px";mxEvent.addListener(C,"keydown",mxUtils.bind(this,function(M){var T=mxUtils.trim(C.value);13==M.keyCode&&0<T.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(T)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:T}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(C.value="")}));B.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,@@ -14338,8 +14340,8 @@ y){this.addMenuItems(q,["languageCode","-"],y);y=q.addItem(mxResources.get("disamxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var q=l.cloneCells(l.getSelectionCells()),y=l.getBoundingBoxFromGeometry(q,!0);q=l.moveCells(q,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(q)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(m){return null==m||null==m.boundingBox||!isNaN(m.boundingBox.x)&&!isNaN(m.boundingBox.y)&&!isNaN(m.boundingBox.width)&&!isNaN(m.boundingBox.height)}var y=l.getGraphBounds(),B=l.view.translate,C=l.view.scale;l.insertVertex(l.getDefaultParent(),null,"",y.x/C-B.x,y.y/C-B.y,y.width/C,y.height/C,"fillColor=none;strokeColor=red;");var M=0,T=0;l.view.states.visit(function(m,z){m=!0;q(z.shape)||(console.log("invalid shape",z.cell.id,z.shape),m=!1);q(z.text)||(console.log("invalid text",z.cell.id,z.text),m=!1);m||M++;T++});console.log("states checked",T,"invalid",M)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";q=new TextareaDialog(c,-"Paste Data:",q,function(y){if(0<y.length)try{var B=function(z){function I(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=P[ba]){for(;0<P[ba].length;){var ea=P[ba].pop();I(ea)}delete P[ba]}}else mxLog.debug(L+": Visited: "+ba)}var L=z.parentNode.id,N=z.childNodes;z={};for(var P={},S=null,U={},W=0;W<N.length;W++){var X=N[W];if(null!=X.id&&0<X.id.length)if(null==z[X.id]){z[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(L+": Multiple roots: "+X.id):S=X.id:(null==P[Z]&&(P[Z]=[]),P[Z].push(X.id))}else U[X.id]=-X.id}N=Object.keys(U);0<N.length?(N=L+": "+N.length+" Duplicates: "+N.join(", "),mxLog.debug(N+" (see console)")):mxLog.debug(L+": Checked");var Y={};null==S?mxLog.debug(L+": No root"):(I(S),Object.keys(Y).length!=Object.keys(z).length&&(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",P)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var C=mxUtils.parseXml(y),M=c.getPagesForNode(C.documentElement,"mxGraphModel");+"Paste Data:",q,function(y){if(0<y.length)try{var B=function(z){function I(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=O[ba]){for(;0<O[ba].length;){var ea=O[ba].pop();I(ea)}delete O[ba]}}else mxLog.debug(L+": Visited: "+ba)}var L=z.parentNode.id,N=z.childNodes;z={};for(var O={},S=null,U={},W=0;W<N.length;W++){var X=N[W];if(null!=X.id&&0<X.id.length)if(null==z[X.id]){z[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(L+": Multiple roots: "+X.id):S=X.id:(null==O[Z]&&(O[Z]=[]),O[Z].push(X.id))}else U[X.id]=+X.id}N=Object.keys(U);0<N.length?(N=L+": "+N.length+" Duplicates: "+N.join(", "),mxLog.debug(N+" (see console)")):mxLog.debug(L+": Checked");var Y={};null==S?mxLog.debug(L+": No root"):(I(S),Object.keys(Y).length!=Object.keys(z).length&&(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",O)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var C=mxUtils.parseXml(y),M=c.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=M&&0<M.length)try{var T=c.getHashValueForPages(M);mxLog.debug("Checksum: ",T)}catch(z){mxLog.debug("Error: ",z.message)}else mxLog.debug("No pages found for checksum");var m=C.getElementsByTagName("root");for(y=0;y<m.length;y++)B(m[y]);mxLog.show()}catch(z){c.handleError(z),null!=window.console&&console.error(z)}});c.showDialog(q.container,620,460,!0,!0);q.init()}));var K=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var q=new TextareaDialog(c,"Diff/Sync:","",function(y){var B=c.getCurrentFile();if(0<y.length&&null!=B)try{var C=JSON.parse(y);B.patch([C],null,!0,!0);c.hideDialog()}catch(M){c.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(y,B){K=c.getPagesForXml(c.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)}],["Diff",function(y,B){try{q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==K?(K=c.getPagesForXml(c.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)):q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2);c.showDialog(q.container,620,460,!0,!0);q.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=c.pages&&null!=q?c.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(y){c.spinner.stop();@@ -14356,16 +14358,16 @@ arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date"time",Date.now()-q+" ms","args",arguments);return y});null!=J?(c.resolveCrossReferences=J,J=null):(J=c.resolveCrossReferences,c.resolveCrossReferences=function(){var q=Date.now(),y=J.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=x?(c.getFileData=x,x=null):(x=c.getFileData,c.getFileData=function(){var q=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-q+" ms","args",arguments);return y});EditorUi.debug("[Performance]",null!=d?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),y);var B=q.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},y);null!=d&&q.addCheckmark(B,Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],y)})))}c.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(q){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(q){l.isEnabled()&&-(q=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(y,B,C,M,T,m,z,I,L,N,P,S){c.createHtml(y,B,C,M,T,m,z,I,-L,N,P,mxUtils.bind(this,function(U,W){var X=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+U+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(U);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);+(q=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(y,B,C,M,T,m,z,I,L,N,O,S){c.createHtml(y,B,C,M,T,m,z,I,+L,N,O,mxUtils.bind(this,function(U,W){var X=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+U+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(U);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var ea=Z.document.createElement("div");ea.marginLeft="26px";ea.marginTop="26px";mxUtils.write(ea,mxResources.get("updatingDocument"));ba=Z.document.createElement("img");ba.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ba.style.marginLeft="6px";ea.appendChild(ba);Z.document.body.insertBefore(ea,Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));c.actions.put("liveImage",new Action("Live image...",function(){var q=c.getCurrentFile();null!=q&&c.getPublicUrl(q,function(y){null!=y?(y=new EmbedDialog(c,'<img src="'+(q.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+q.getId())+'"/>'),c.showDialog(y.container,450,240,!0,!0),y.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("image"),mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));-c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){var y=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/l.view.scale))+2,null,null,null,q,c.getCurrentFile(),function(B,C,M,T,m,z,I,L,N,P,S,U){var W=[];N&&W.push("tags=%7B%7D");B=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+I+";height:"+L+';" src="'+c.createLink(B,C,!0,T,m,z,"public"==P?q:null,null,W,+c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){var y=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/l.view.scale))+2,null,null,null,q,c.getCurrentFile(),function(B,C,M,T,m,z,I,L,N,O,S,U){var W=[];N&&W.push("tags=%7B%7D");B=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+I+";height:"+L+';" src="'+c.createLink(B,C,!0,T,m,z,"public"==O?q:null,null,W,null,M,S,U)+'"'+(S?' allowtransparency="true"':"")+"></iframe>");c.showDialog(B.container,450,240,!0,!0);B.init()},!0,!0)})}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var y=document.createElement("a");y.setAttribute("href","javascript:void(0);");y.setAttribute("target","_blank");y.style.cursor="pointer";mxUtils.write(y,mxResources.get("getNotionChromeExtension"));q.appendChild(y);mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");mxUtils.setOpacity(y,0);window.setTimeout(function(){mxUtils.setOpacity(y,100)},300);mxEvent.addListener(y,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.getPublicUrl(c.getCurrentFile(),function(B){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",-q,B,c.getCurrentFile(),function(C,M,T,m,z,I,L,N,P,S,U,W){L=["border=0"];P&&L.push("tags=%7B%7D");C=new EmbedDialog(c,c.createLink(C,M,!0,m,z,I,"public"==S?B:null,null,L,null,T,null,W));c.showDialog(C.container,450,240,!0,!0);C.init()},null,!0)})}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showPublishLinkDialog(null,null,null,null,null,null,q,c.getCurrentFile(),function(y,B,C,M,T,m,z,I,L,N,P,S){z=[];M&&L&&z.push("tags=%7B%7D");+q,B,c.getCurrentFile(),function(C,M,T,m,z,I,L,N,O,S,U,W){L=["border=0"];O&&L.push("tags=%7B%7D");C=new EmbedDialog(c,c.createLink(C,M,!0,m,z,I,"public"==S?B:null,null,L,null,T,null,W));c.showDialog(C.container,450,240,!0,!0);C.init()},null,!0)})}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showPublishLinkDialog(null,null,null,null,null,null,q,c.getCurrentFile(),function(y,B,C,M,T,m,z,I,L,N,O,S){z=[];M&&L&&z.push("tags=%7B%7D");y=new EmbedDialog(c,c.createLink(y,B,!0,M,T,m,"public"==N?q:null,null,z,null,C,null,S));c.showDialog(y.container,450,240,!0,!0);y.init()},null,!0)})}));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.getPublicUrl(c.getCurrentFile(),function(q){q=new GoogleSitesDialog(c,q);c.showDialog(q.container,420,256,!0,!0);q.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,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(p=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isHighContrast()}));p=c.actions.addAction("search",function(){if(null!=c.sidebar){var q=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});p.label=mxResources.get("searchShapes");@@ -14375,9 +14377,9 @@ c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlPaq,mxResources.get("cancel"),mxResources.get("discardChanges")):q()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,y){c.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],y),c.jpgSupported&&this.addMenuItems(q,["exportJpg"],y),c.webpSupported&&this.addMenuItems(q,["exportWebp"],y)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],y);this.addMenuItems(q,["exportSvg","-"],y);c.isOffline()||c.printPdfExport?this.addMenuItems(q,["exportPdf"],y):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],y);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(q,["exportVsdx"],y);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(q.addSeparator(y),this.addMenuItem(q,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(q,["publishLink"],y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(q.addSeparator(y),c.menus.addSubmenu("embed",q,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,y){function B(T){T.pickFile(function(m){c.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(m,function(z){var I="data:image/"==z.getData().substring(0,11)?M(z.getTitle()):"text/xml";/\.svg$/i.test(z.getTitle())&&-!c.editor.isDataSvg(z.getData())&&(z.setData(Editor.createSvgDataUri(z.getData())),I="image/svg+xml");C(z.getData(),I,z.getTitle())},function(z){c.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)},T==c.drive)},!0)}var C=mxUtils.bind(this,function(T,m,z){var I=l.view,L=l.getGraphBounds(),N=l.snap(Math.ceil(Math.max(0,L.x/I.scale-I.translate.x)+4*l.gridSize)),P=l.snap(Math.ceil(Math.max(0,(L.y+L.height)/I.scale-I.translate.y)+4*l.gridSize));"data:image/"==T.substring(0,11)?c.loadImage(T,-mxUtils.bind(this,function(S){var U=!0,W=mxUtils.bind(this,function(){c.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=U?Math.min(1,Math.min(c.maxImageSize/Z,c.maxImageSize/Y)):1;c.importFile(T,m,N,P,Math.round(Z*X),Math.round(Y*X),z,function(ba){c.spinner.stop();l.setSelectionCells(ba);l.scrollCellToVisible(l.getSelectionCell())})}),U)});T.length>c.resampleThreshold?c.confirmImageResize(function(X){U=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):-c.importFile(T,m,N,P,0,0,z,function(S){c.spinner.stop();l.setSelectionCells(S);l.scrollCellToVisible(l.getSelectionCell())})}),M=mxUtils.bind(this,function(T){var m="text/xml";/\.png$/i.test(T)?m="image/png":/\.jpe?g$/i.test(T)?m="image/jpg":/\.gif$/i.test(T)?m="image/gif":/\.pdf$/i.test(T)&&(m="application/pdf");return m});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&+!c.editor.isDataSvg(z.getData())&&(z.setData(Editor.createSvgDataUri(z.getData())),I="image/svg+xml");C(z.getData(),I,z.getTitle())},function(z){c.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)},T==c.drive)},!0)}var C=mxUtils.bind(this,function(T,m,z){var I=l.view,L=l.getGraphBounds(),N=l.snap(Math.ceil(Math.max(0,L.x/I.scale-I.translate.x)+4*l.gridSize)),O=l.snap(Math.ceil(Math.max(0,(L.y+L.height)/I.scale-I.translate.y)+4*l.gridSize));"data:image/"==T.substring(0,11)?c.loadImage(T,+mxUtils.bind(this,function(S){var U=!0,W=mxUtils.bind(this,function(){c.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=U?Math.min(1,Math.min(c.maxImageSize/Z,c.maxImageSize/Y)):1;c.importFile(T,m,N,O,Math.round(Z*X),Math.round(Y*X),z,function(ba){c.spinner.stop();l.setSelectionCells(ba);l.scrollCellToVisible(l.getSelectionCell())})}),U)});T.length>c.resampleThreshold?c.confirmImageResize(function(X){U=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):+c.importFile(T,m,N,O,0,0,z,function(S){c.spinner.stop();l.setSelectionCells(S);l.scrollCellToVisible(l.getSelectionCell())})}),M=mxUtils.bind(this,function(T){var m="text/xml";/\.png$/i.test(T)?m="image/png":/\.jpe?g$/i.test(T)?m="image/jpg":/\.gif$/i.test(T)?m="image/gif":/\.pdf$/i.test(T)&&(m="application/pdf");return m});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){B(c.oneDrive)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){B(c.dropbox)},y):c.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){B(c.gitHub)},y);c.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){B(c.gitLab)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){B(c.trello)},y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(c,"",mxResources.get("import"),function(m){if(null!=m&&0<m.length&&@@ -14431,8 +14433,8 @@ y),q.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.removfunction(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),y)))})));this.put("pages",new Menu(mxUtils.bind(this,function(q,y){var B=c.currentPage;c.editor.graph.isLightboxView()||(q.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(M){c.handleError(M)}}),y,null,c.editor.graph.isEnabled()),q.addSeparator(y));if(null!=c.pages)for(var C=0;C<c.pages.length;C++)mxUtils.bind(this,function(M){var T=null;T=c.pages[M]!=B||c.editor.graph.isLightboxView()?q.addItem(c.getShortPageName(c.pages[M]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[M])}),y):c.menus.addSubmenu("currentPage",q,y,c.getShortPageName(B));var m=c.pages[M].getId();T.setAttribute("title",c.pages[M].getName()+" ("+(M+1)+"/"+c.pages.length+")"+(null!=m?" ["+m+"]":""));c.pages[M]==B&&q.addCheckmark(T,Editor.checkmarkImage)})(C)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;p=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});p.setToggleAction(!0);p.setSelectedCallback(function(){return R});var V="1"==urlParams.enableStoreBkp;p=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();V=!V});p.setToggleAction(!0);p.setSelectedCallback(function(){return V});var Q="1"==urlParams.isGoogleFontsEnabled;p=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();Q=!Q;c.alert(mxResources.get("restartForChangeRequired"))});p.setToggleAction(!0);p.setSelectedCallback(function(){return Q});c.actions.addAction("openDevTools",-function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var q=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=1E3*y,EditorUi.enableDrafts=0<y,mxSettings.setDraftSaveDelay(y),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(q.container,320,80,!0,!0);q.init()})}var O=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,y){if("simple"==Editor.currentTheme||-"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||c.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",q,y);q.addSeparator(y);null==O||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",q,y);c.menus.addSubmenu("units",+function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var q=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=1E3*y,EditorUi.enableDrafts=0<y,mxSettings.setDraftSaveDelay(y),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(q.container,320,80,!0,!0);q.init()})}var P=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,y){if("simple"==Editor.currentTheme||+"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||c.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",q,y);q.addSeparator(y);null==P||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",q,y);c.menus.addSubmenu("units",q,y);c.menus.addMenuItems(q,"- copyConnect collapseExpand - tooltips animations -".split(" "),y);var B=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],y),c.menus.addMenuItems(q,["ruler","-"],y));EditorUi.isElectronApp&&c.menus.addMenuItems(q,"- googleFonts spellCheck autoBkp drafts -".split(" "),y);this.addSubmenu("diagramLanguage",q,y);q.addSeparator(y);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(q,"configuration",y);q.addSeparator(y)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",q,y),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",q,y),q.addSeparator(y),B=this.addSubmenu("adaptiveColors",q,y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(B,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(B=this.addMenuItem(q,"mathematicalTypesetting",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(q,["googleFonts","spellCheck","autoBkp","drafts","-"],y),this.addMenuItems(q,["copyConnect","collapseExpand","-"],y),"1"!=urlParams.embed&&(B=c.getCurrentFile(),null!=@@ -14454,14 +14456,14 @@ OneDriveFile||c.menus.addMenuItems(q,["share"],y));q.addSeparator(y);null!=B&&B.y):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(q.addSeparator(y),C=this.addMenuItem(q,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==B||this.addMenuItems(q,["share","-"],y),null!=B&&B.isRenamable()&&this.addMenuItems(q,["rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],y):(this.addMenuItems(q,["makeCopy"],y),null!=B&&(B.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],y),null!=B.getFolderUrl()&&c.menus.addMenuItems(q,["openFolder"],y)))),q.addSeparator(y),this.addSubmenu("importFrom",q,y),this.addSubmenu("exportAs",q,y),q.addSeparator(y),this.addSubmenu("embed",q,y),this.addSubmenu("publish",q,y),q.addSeparator(y),this.addSubmenu("newLibrary",q,y),this.addSubmenu("openLibraryFrom",q,y),c.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],y),null!=B&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(C=null!=B.getTitle()?B.getTitle():c.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(C))&&this.addMenuItems(q,["-","properties"])),this.addMenuItems(q,["-","pageSetup"],y),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],y),-this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,y){function B(N){var P=encodeURIComponent(N.name)+(null==N.url?"":"@"+encodeURIComponent(N.url));if(!M[P]){for(var S=N.name,U=0;null!=I[S.toLowerCase()];)S=N.name+" ("+ ++U+")";null==z[P]&&(L.push({name:N.name,url:N.url,label:S,title:N.url}),I[S.toLowerCase()]=N,z[P]=N)}}for(var C=mxUtils.bind(this,function(N,P,S,U,W){var X=c.editor.graph,Z=this.styleChange(q,null!=U?U:N,[mxConstants.STYLE_FONTFAMILY,-"fontSource","FType"],[N,null!=P?encodeURIComponent(P):null,null],null,y,function(){X.setFont(N,P);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[N,null!=P?encodeURIComponent(P):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),-S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(N,P);this.editorUi.hideCurrentMenu();-mxEvent.consume(Y)})));Graph.addFont(N,P);Z.firstChild.nextSibling.style.fontFamily=N;W=null!=U?U:N;null!=P&&(W+=" ("+P+")");Z.setAttribute("title",W)}),M={},T=0;T<this.defaultFonts.length;T++){var m=this.defaultFonts[T];"string"===typeof m?C(m):null!=m.fontFamily&&null!=m.fontUrl&&(M[encodeURIComponent(m.fontFamily)+"@"+encodeURIComponent(m.fontUrl)]=!0,C(m.fontFamily,m.fontUrl))}q.addSeparator(y);var z={},I={},L=[];for(T=0;T<this.customFonts.length;T++)B(this.customFonts[T]);L.sort(function(N,P){return N.label<-P.label?-1:N.label>P.label?1:0});if(0<L.length){for(T=0;T<L.length;T++)C(L[T].name,L[T].url,!0,L[T].label);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);q.addSeparator(y);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var N=this.editorUi.editor.graph,P=N.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",U=null;if(N.isEditing()){var W=-N.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){P=mxUtils.getCssFontFamily(X.fontFamily);X=N.getView().getState(N.cellEditor.getEditingCell());U=null!=X?X.style.fontSource:null;for(null!=U&&(U=decodeURIComponent(U));null!=W&&W!=N.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){U=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==P){U=null;break}W=W.parentNode}null!=U&&(Graph.isGoogleFontUrl(U)?-(U=null,S="g"):S="w")}}}else X=N.getView().getState(N.getSelectionCell()),null!=X&&(P=X.style[mxConstants.STYLE_FONTFAMILY]||P,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",U=W)));null!=U&&U.substring(0,PROXY_URL.length)==PROXY_URL&&(U=decodeURIComponent(U.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==N.cellEditor.textarea&&(Z=N.cellEditor.saveSelection());P=new FontDialog(this.editorUi,P,U,S,mxUtils.bind(this,function(Y,ba,-ea){null!=Z&&(N.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),N.isEditing())N.setFont(Y,ba);else{N.getModel().beginUpdate();try{N.stopEditing(!1),N.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),N.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),N.setCellStyles("FType",null)}finally{N.getModel().endUpdate()}}}));this.editorUi.showDialog(P.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);P.init()}),+this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,y){function B(N){var O=encodeURIComponent(N.name)+(null==N.url?"":"@"+encodeURIComponent(N.url));if(!M[O]){for(var S=N.name,U=0;null!=I[S.toLowerCase()];)S=N.name+" ("+ ++U+")";null==z[O]&&(L.push({name:N.name,url:N.url,label:S,title:N.url}),I[S.toLowerCase()]=N,z[O]=N)}}for(var C=mxUtils.bind(this,function(N,O,S,U,W){var X=c.editor.graph,Z=this.styleChange(q,null!=U?U:N,[mxConstants.STYLE_FONTFAMILY,+"fontSource","FType"],[N,null!=O?encodeURIComponent(O):null,null],null,y,function(){X.setFont(N,O);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[N,null!=O?encodeURIComponent(O):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),+S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(N,O);this.editorUi.hideCurrentMenu();+mxEvent.consume(Y)})));Graph.addFont(N,O);Z.firstChild.nextSibling.style.fontFamily=N;W=null!=U?U:N;null!=O&&(W+=" ("+O+")");Z.setAttribute("title",W)}),M={},T=0;T<this.defaultFonts.length;T++){var m=this.defaultFonts[T];"string"===typeof m?C(m):null!=m.fontFamily&&null!=m.fontUrl&&(M[encodeURIComponent(m.fontFamily)+"@"+encodeURIComponent(m.fontUrl)]=!0,C(m.fontFamily,m.fontUrl))}q.addSeparator(y);var z={},I={},L=[];for(T=0;T<this.customFonts.length;T++)B(this.customFonts[T]);L.sort(function(N,O){return N.label<+O.label?-1:N.label>O.label?1:0});if(0<L.length){for(T=0;T<L.length;T++)C(L[T].name,L[T].url,!0,L[T].label);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);q.addSeparator(y);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var N=this.editorUi.editor.graph,O=N.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",U=null;if(N.isEditing()){var W=+N.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){O=mxUtils.getCssFontFamily(X.fontFamily);X=N.getView().getState(N.cellEditor.getEditingCell());U=null!=X?X.style.fontSource:null;for(null!=U&&(U=decodeURIComponent(U));null!=W&&W!=N.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){U=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==O){U=null;break}W=W.parentNode}null!=U&&(Graph.isGoogleFontUrl(U)?+(U=null,S="g"):S="w")}}}else X=N.getView().getState(N.getSelectionCell()),null!=X&&(O=X.style[mxConstants.STYLE_FONTFAMILY]||O,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",U=W)));null!=U&&U.substring(0,PROXY_URL.length)==PROXY_URL&&(U=decodeURIComponent(U.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==N.cellEditor.textarea&&(Z=N.cellEditor.saveSelection());O=new FontDialog(this.editorUi,O,U,S,mxUtils.bind(this,function(Y,ba,+ea){null!=Z&&(N.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),N.isEditing())N.setFont(Y,ba);else{N.getModel().beginUpdate();try{N.stopEditing(!1),N.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),N.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),N.setCellStyles("FType",null)}finally{N.getModel().endUpdate()}}}));this.editorUi.showDialog(O.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);O.init()}),y,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.diagramModified=!1;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)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}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,f){this.ui=b;this.oldIndex=e;this.newIndex=f}@@ -14538,12 +14540,12 @@ l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodfunction(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(C){return v.isVertex(C)&&n(C)}function l(C){var M=!1;null!=C&&(M="1"==k.getCurrentCellStyle(C).treeMoving);return M}function n(C){var M=!1;null!=C&&(C=v.getParent(C),M=k.view.getState(C),M="tree"==(null!=M?M.style:k.getCellStyle(C)).containerType);return M}function p(C){var M=!1;null!=C&&(C=v.getParent(C),M=k.view.getState(C),k.view.getState(C),M=null!=(null!=M?M.style:k.getCellStyle(C)).childLayout);return M}function u(C){C=k.view.getState(C);if(null!=C){var M=k.getIncomingTreeEdges(C.cell);if(0<M.length&&(M=k.view.getState(M[0]),null!=M&&(M=M.absolutePoints,null!=M&&0<M.length&&(M=M[M.length-1],null!=M)))){if(M.y==C.y&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_SOUTH;if(M.y==C.y+C.height&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_NORTH;if(M.x>C.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function F(C,M){M=null!=M?M:!0;k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=k.cloneCells([m[0],C]);k.model.setTerminal(z[0],k.model.getTerminal(m[0],-!0),!0);var I=u(C),L=T.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?z[1].geometry.x+=M?C.geometry.width+10:-z[1].geometry.width-10:z[1].geometry.y+=M?C.geometry.height+10:-z[1].geometry.height-10;k.view.currentRoot!=T&&(z[1].geometry.x-=L.x,z[1].geometry.y-=L.y);var N=k.view.getState(C),P=k.view.scale;if(null!=N){var S=mxRectangle.fromRectangle(N);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?S.x+=(M?C.geometry.width+10:-z[1].geometry.width-10)*P:S.y+=(M?-C.geometry.height+10:-z[1].geometry.height-10)*P;var U=k.getOutgoingTreeEdges(k.model.getTerminal(m[0],!0));if(null!=U){for(var W=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,X=L=m=0;X<U.length;X++){var Z=k.model.getTerminal(U[X],!1);if(I==u(Z)){var Y=k.view.getState(Z);Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY())&&mxUtils.intersects(S,Y)&&(m=10+Math.max(m,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/P),L=10+Math.max(L,(Math.min(S.y+-S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/P))}}W?L=0:m=0;for(X=0;X<U.length;X++)if(Z=k.model.getTerminal(U[X],!1),I==u(Z)&&(Y=k.view.getState(Z),Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY()))){var ba=[];k.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&k.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});k.moveCells(ba,(M?1:-1)*m,(M?1:-1)*L)}}}return k.addCells(z,T)}finally{k.model.endUpdate()}}function H(C){k.model.beginUpdate();-try{var M=u(C),T=k.getIncomingTreeEdges(C),m=k.cloneCells([T[0],C]);k.model.setTerminal(T[0],m[1],!1);k.model.setTerminal(m[0],m[1],!0);k.model.setTerminal(m[0],C,!1);var z=k.model.getParent(C),I=z.geometry,L=[];k.view.currentRoot!=z&&(m[1].geometry.x-=I.x,m[1].geometry.y-=I.y);k.traverse(C,!0,function(S,U){var W=null!=U&&k.isTreeEdge(U);W&&L.push(U);(null==U||W)&&L.push(S);return null==U||W});var N=C.geometry.width+40,P=C.geometry.height+40;M==mxConstants.DIRECTION_SOUTH?N=0:M==mxConstants.DIRECTION_NORTH?-(N=0,P=-P):M==mxConstants.DIRECTION_WEST?(N=-N,P=0):M==mxConstants.DIRECTION_EAST&&(P=0);k.moveCells(L,N,P);return k.addCells(m,z)}finally{k.model.endUpdate()}}function E(C,M){k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=u(C);0==m.length&&(m=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],z=M);var I=k.cloneCells([m[0],C]);k.model.setTerminal(I[0],C,!0);null==k.model.getTerminal(I[0],!1)&&(k.model.setTerminal(I[0],I[1],!1),k.applyNewEdgeStyle(I[1],-[I[0]],z));m=k.getOutgoingTreeEdges(C);var L=T.geometry;M=[];k.view.currentRoot==T&&(L=new mxRectangle);for(var N=0;N<m.length;N++){var P=k.model.getTerminal(m[N],!1);null!=P&&M.push(P)}var S=k.view.getBounds(M),U=k.view.translate,W=k.view.scale;z==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-I[1].geometry.width)/2:(S.x+S.width)/W-U.x-L.x+10,I[1].geometry.y+=I[1].geometry.height-L.y+40):z==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-+!0),!0);var I=u(C),L=T.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?z[1].geometry.x+=M?C.geometry.width+10:-z[1].geometry.width-10:z[1].geometry.y+=M?C.geometry.height+10:-z[1].geometry.height-10;k.view.currentRoot!=T&&(z[1].geometry.x-=L.x,z[1].geometry.y-=L.y);var N=k.view.getState(C),O=k.view.scale;if(null!=N){var S=mxRectangle.fromRectangle(N);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?S.x+=(M?C.geometry.width+10:-z[1].geometry.width-10)*O:S.y+=(M?+C.geometry.height+10:-z[1].geometry.height-10)*O;var U=k.getOutgoingTreeEdges(k.model.getTerminal(m[0],!0));if(null!=U){for(var W=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,X=L=m=0;X<U.length;X++){var Z=k.model.getTerminal(U[X],!1);if(I==u(Z)){var Y=k.view.getState(Z);Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY())&&mxUtils.intersects(S,Y)&&(m=10+Math.max(m,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/O),L=10+Math.max(L,(Math.min(S.y++S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/O))}}W?L=0:m=0;for(X=0;X<U.length;X++)if(Z=k.model.getTerminal(U[X],!1),I==u(Z)&&(Y=k.view.getState(Z),Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY()))){var ba=[];k.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&k.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});k.moveCells(ba,(M?1:-1)*m,(M?1:-1)*L)}}}return k.addCells(z,T)}finally{k.model.endUpdate()}}function H(C){k.model.beginUpdate();+try{var M=u(C),T=k.getIncomingTreeEdges(C),m=k.cloneCells([T[0],C]);k.model.setTerminal(T[0],m[1],!1);k.model.setTerminal(m[0],m[1],!0);k.model.setTerminal(m[0],C,!1);var z=k.model.getParent(C),I=z.geometry,L=[];k.view.currentRoot!=z&&(m[1].geometry.x-=I.x,m[1].geometry.y-=I.y);k.traverse(C,!0,function(S,U){var W=null!=U&&k.isTreeEdge(U);W&&L.push(U);(null==U||W)&&L.push(S);return null==U||W});var N=C.geometry.width+40,O=C.geometry.height+40;M==mxConstants.DIRECTION_SOUTH?N=0:M==mxConstants.DIRECTION_NORTH?+(N=0,O=-O):M==mxConstants.DIRECTION_WEST?(N=-N,O=0):M==mxConstants.DIRECTION_EAST&&(O=0);k.moveCells(L,N,O);return k.addCells(m,z)}finally{k.model.endUpdate()}}function E(C,M){k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=u(C);0==m.length&&(m=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],z=M);var I=k.cloneCells([m[0],C]);k.model.setTerminal(I[0],C,!0);null==k.model.getTerminal(I[0],!1)&&(k.model.setTerminal(I[0],I[1],!1),k.applyNewEdgeStyle(I[1],+[I[0]],z));m=k.getOutgoingTreeEdges(C);var L=T.geometry;M=[];k.view.currentRoot==T&&(L=new mxRectangle);for(var N=0;N<m.length;N++){var O=k.model.getTerminal(m[N],!1);null!=O&&M.push(O)}var S=k.view.getBounds(M),U=k.view.translate,W=k.view.scale;z==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-I[1].geometry.width)/2:(S.x+S.width)/W-U.x-L.x+10,I[1].geometry.y+=I[1].geometry.height-L.y+40):z==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-I[1].geometry.width)/2:(S.x+S.width)/W-U.x+-L.x+10,I[1].geometry.y-=I[1].geometry.height+L.y+40):(I[1].geometry.x=z==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+L.x+40):I[1].geometry.x+(I[1].geometry.width-L.x+40),I[1].geometry.y=null==S?C.geometry.y+(C.geometry.height-I[1].geometry.height)/2:(S.y+S.height)/W-U.y+-L.y+10);return k.addCells(I,T)}finally{k.model.endUpdate()}}function K(C,M,T){C=k.getOutgoingTreeEdges(C);T=k.view.getState(T);var m=[];if(null!=T&&null!=C){for(var z=0;z<C.length;z++){var I=k.view.getState(k.model.getTerminal(C[z],!1));null!=I&&(!M&&Math.min(I.x+I.width,T.x+T.width)>=Math.max(I.x,T.x)||M&&Math.min(I.y+I.height,T.y+T.height)>=Math.max(I.y,T.y))&&m.push(I)}m.sort(function(L,N){return M?L.x+L.width-N.x-N.width:L.y+L.height-N.y-N.height})}return m}function d(C,M){var T=u(C),m=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==m&&T!=M?g.actions.get("selectParent").funct():T==M?(M=k.getOutgoingTreeEdges(C),null!=M&&0<M.length&&k.setSelectionCell(k.model.getTerminal(M[0],!1))):(T=k.getIncomingTreeEdges(C),null!=T&&0<T.length&&(m=K(k.model.getTerminal(T[0],!0),m,C),C=k.view.getState(C),null!=C&&(C=mxUtils.indexOf(m,C),0<=C&&(C+=M==mxConstants.DIRECTION_NORTH||M==mxConstants.DIRECTION_WEST?-1:1,0<=C&&C<=m.length-1&&k.setSelectionCell(m[C].cell)))))}var g=this,k=g.editor.graph,v=k.getModel(),t=g.menus.createPopupMenu;g.menus.createPopupMenu=function(C,M,T){t.apply(this,arguments);@@ -14551,16 +14553,16 @@ if(1==k.getSelectionCount()){M=k.getSelectionCell();var m=k.getOutgoingTreeEdges1==k.getSelectionCount()){var M=k.getSelectionCell();C=mxEvent.isControlDown(C)?null:k.getOutgoingTreeEdges(M);if(null!=C&&0<C.length){M=[];for(var T=0;T<C.length;T++)M.push(k.model.getTerminal(C[T],!1));k.setSelectionCells(M)}else k.setSelectionCells(k.model.getChildren(M))}},null,null,"Alt+Shift+C");g.actions.addAction("selectDescendants",function(C){var M=k.getSelectionCell();if(k.isEnabled()&&null!=M){var T=[];mxEvent.isControlDown(C)||k.traverse(M,!0,function(m,z){var I=null!=z&&k.isTreeEdge(z);I&&mxEvent.isControlDown(C)&&T.push(z);(null==z||I)&&T.push(m);return null==z||I});if(0==T.length||1==T.length&&T[0]==M)T=k.model.getDescendants(M);k.setSelectionCells(T)}},null,null,"Alt+Shift+X");g.actions.addAction("selectParent",function(C){var M=k.getSelectionCell();k.isEnabled()&&null!=M&&(C=mxEvent.isControlDown(C)?null:k.getIncomingTreeEdges(M),null!=C&&0<C.length?k.setSelectionCell(k.model.getTerminal(C[0],!0)):k.selectParentCell())},null,null,"Alt+Shift+P");g.actions.addAction("selectSiblings",function(C){if(k.isEnabled()&&1==k.getSelectionCount()){var M=k.getSelectionCell(),T=mxEvent.isControlDown(C)?null:k.getIncomingTreeEdges(M);C=[];if(null!=T&&0<T.length&&(T=k.getOutgoingTreeEdges(k.model.getTerminal(T[0],!0)),null!=T))for(var m=0;m<T.length;m++)C.push(k.model.getTerminal(T[m],!1));0==C.length&&(C=k.model.getChildren(k.model.getParent(M)));k.setSelectionCells(C)}},null,null,"Alt+Shift+S");var x=k.removeCells;k.removeCells=function(C,M){M=null!=M?M:!0;null==C&&(C=this.getDeletableCells(this.getSelectionCells()));-M&&(C=this.getDeletableCells(this.addAllEdges(C)));for(var T=[],m=0;m<C.length;m++){var z=C[m];v.isEdge(z)&&n(z)&&(T.push(z),z=v.getTerminal(z,!1));if(c(z)){var I=[];k.traverse(z,!0,function(L,N){var P=null!=N&&k.isTreeEdge(N);P&&I.push(N);(null==N||P)&&I.push(L);return null==N||P});0<I.length&&(T=T.concat(I),z=k.getIncomingTreeEdges(C[m]),C=C.concat(z))}else null!=z&&T.push(C[m])}C=T;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(C,M,T){return c(C.cell)?null:this.graph.view.getState(this.graph.getCellAt(M,-T))};var A=k.duplicateCells;k.duplicateCells=function(C,M){C=null!=C?C:this.getSelectionCells();for(var T=C.slice(0),m=0;m<T.length;m++){var z=k.view.getState(T[m]);if(null!=z&&c(z.cell)){var I=k.getIncomingTreeEdges(z.cell);for(z=0;z<I.length;z++)mxUtils.remove(I[z],C)}}this.model.beginUpdate();try{var L=A.call(this,C,M);if(L.length==C.length)for(m=0;m<C.length;m++)if(c(C[m])){var N=k.getIncomingTreeEdges(L[m]);I=k.getIncomingTreeEdges(C[m]);if(0==N.length&&0<I.length){var P=this.cloneCell(I[0]);-this.addEdge(P,k.getDefaultParent(),this.model.getTerminal(I[0],!0),L[m])}}}finally{this.model.endUpdate()}return L};var J=k.moveCells;k.moveCells=function(C,M,T,m,z,I,L){for(var N=null,P=[],S=0;S<C.length;S++)(l(C[S])||c(C[S]))&&!p(C[S])&&this.isCellCollapsed(C[S])?P=P.concat(this.getSubtree(C[S])):P.push(C[S]);C=mxUtils.removeDuplicates(P);this.model.beginUpdate();try{P=z;var U=this.getCurrentCellStyle(z);if(null!=C&&c(z)&&"1"==mxUtils.getValue(U,"treeFolding","0")){for(S=0;S<C.length;S++)if(c(C[S])||-k.model.isEdge(C[S])&&null==k.model.getTerminal(C[S],!0)){z=k.model.getParent(C[S]);break}if(null!=P&&z!=P&&null!=this.view.getState(C[0])){var W=k.getIncomingTreeEdges(C[0]);if(0<W.length){var X=k.view.getState(k.model.getTerminal(W[0],!0));if(null!=X){var Z=k.view.getState(P);null!=Z&&(M=(Z.getCenterX()-X.getCenterX())/k.view.scale,T=(Z.getCenterY()-X.getCenterY())/k.view.scale)}}}}N=J.apply(this,arguments);if(null!=N&&null!=C&&N.length==C.length)for(S=0;S<N.length;S++)if(this.model.isEdge(N[S]))c(P)&&-0>mxUtils.indexOf(N,this.model.getTerminal(N[S],!0))&&this.model.setTerminal(N[S],P,!0);else if(c(C[S])&&(W=k.getIncomingTreeEdges(C[S]),0<W.length))if(!m)c(P)&&0>mxUtils.indexOf(C,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],P,!0);else if(0==k.getIncomingTreeEdges(N[S]).length){U=P;if(null==U||U==k.model.getParent(C[S]))U=k.model.getTerminal(W[0],!0);m=this.cloneCell(W[0]);this.addEdge(m,k.getDefaultParent(),U,N[S])}}finally{this.model.endUpdate()}return N};if(null!=g.sidebar){var D=+M&&(C=this.getDeletableCells(this.addAllEdges(C)));for(var T=[],m=0;m<C.length;m++){var z=C[m];v.isEdge(z)&&n(z)&&(T.push(z),z=v.getTerminal(z,!1));if(c(z)){var I=[];k.traverse(z,!0,function(L,N){var O=null!=N&&k.isTreeEdge(N);O&&I.push(N);(null==N||O)&&I.push(L);return null==N||O});0<I.length&&(T=T.concat(I),z=k.getIncomingTreeEdges(C[m]),C=C.concat(z))}else null!=z&&T.push(C[m])}C=T;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(C,M,T){return c(C.cell)?null:this.graph.view.getState(this.graph.getCellAt(M,+T))};var A=k.duplicateCells;k.duplicateCells=function(C,M){C=null!=C?C:this.getSelectionCells();for(var T=C.slice(0),m=0;m<T.length;m++){var z=k.view.getState(T[m]);if(null!=z&&c(z.cell)){var I=k.getIncomingTreeEdges(z.cell);for(z=0;z<I.length;z++)mxUtils.remove(I[z],C)}}this.model.beginUpdate();try{var L=A.call(this,C,M);if(L.length==C.length)for(m=0;m<C.length;m++)if(c(C[m])){var N=k.getIncomingTreeEdges(L[m]);I=k.getIncomingTreeEdges(C[m]);if(0==N.length&&0<I.length){var O=this.cloneCell(I[0]);+this.addEdge(O,k.getDefaultParent(),this.model.getTerminal(I[0],!0),L[m])}}}finally{this.model.endUpdate()}return L};var J=k.moveCells;k.moveCells=function(C,M,T,m,z,I,L){for(var N=null,O=[],S=0;S<C.length;S++)(l(C[S])||c(C[S]))&&!p(C[S])&&this.isCellCollapsed(C[S])?O=O.concat(this.getSubtree(C[S])):O.push(C[S]);C=mxUtils.removeDuplicates(O);this.model.beginUpdate();try{O=z;var U=this.getCurrentCellStyle(z);if(null!=C&&c(z)&&"1"==mxUtils.getValue(U,"treeFolding","0")){for(S=0;S<C.length;S++)if(c(C[S])||+k.model.isEdge(C[S])&&null==k.model.getTerminal(C[S],!0)){z=k.model.getParent(C[S]);break}if(null!=O&&z!=O&&null!=this.view.getState(C[0])){var W=k.getIncomingTreeEdges(C[0]);if(0<W.length){var X=k.view.getState(k.model.getTerminal(W[0],!0));if(null!=X){var Z=k.view.getState(O);null!=Z&&(M=(Z.getCenterX()-X.getCenterX())/k.view.scale,T=(Z.getCenterY()-X.getCenterY())/k.view.scale)}}}}N=J.apply(this,arguments);if(null!=N&&null!=C&&N.length==C.length)for(S=0;S<N.length;S++)if(this.model.isEdge(N[S]))c(O)&&+0>mxUtils.indexOf(N,this.model.getTerminal(N[S],!0))&&this.model.setTerminal(N[S],O,!0);else if(c(C[S])&&(W=k.getIncomingTreeEdges(C[S]),0<W.length))if(!m)c(O)&&0>mxUtils.indexOf(C,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],O,!0);else if(0==k.getIncomingTreeEdges(N[S]).length){U=O;if(null==U||U==k.model.getParent(C[S]))U=k.model.getTerminal(W[0],!0);m=this.cloneCell(W[0]);this.addEdge(m,k.getDefaultParent(),U,N[S])}}finally{this.model.endUpdate()}return N};if(null!=g.sidebar){var D=g.sidebar.dropAndConnect;g.sidebar.dropAndConnect=function(C,M,T,m){var z=k.model,I=null;z.beginUpdate();try{if(I=D.apply(this,arguments),c(C))for(var L=0;L<I.length;L++)if(z.isEdge(I[L])&&null==z.getTerminal(I[L],!0)){z.setTerminal(I[L],C,!0);var N=k.getCellGeometry(I[L]);N.points=null;null!=N.getTerminalPoint(!0)&&N.setTerminalPoint(null,!0)}}finally{z.endUpdate()}return I}}var G={67:g.actions.get("selectChildren"),88:g.actions.get("selectDescendants"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},R={67:g.actions.get("copyStyle"),86:g.actions.get("pasteStyle")},V=g.onKeyDown;g.onKeyDown=function(C){try{var M=k.getSelectionCell();if(k.isEnabled()&&!k.isEditing()&&null!=M){var T=mxEvent.isAltDown(C)&&mxEvent.isShiftDown(C)?G[C.keyCode]:mxEvent.isAltDown(C)?R[C.keyCode]:null;null!=T?(T.funct(C),mxEvent.consume(C)):c(M)&&(T=null,0<k.getIncomingTreeEdges(M).length&&(9==C.which?T=mxEvent.isShiftDown(C)?H(M):E(M):13==C.which&&(T=F(M,!mxEvent.isShiftDown(C)))),null!=T&&0<T.length?(1==T.length&&k.model.isEdge(T[0])?k.setSelectionCell(k.model.getTerminal(T[0],!1)):k.setSelectionCell(T[T.length-1]),null!=g.hoverIcons&&g.hoverIcons.update(k.view.getState(M)),k.startEditingAtCell(M),mxEvent.consume(C)):37==C.keyCode?(d(M,mxConstants.DIRECTION_WEST),mxEvent.consume(C)):38==C.keyCode?(d(M,mxConstants.DIRECTION_NORTH),mxEvent.consume(C)):39==C.keyCode?(d(M,mxConstants.DIRECTION_EAST),mxEvent.consume(C)):40==C.keyCode&&(d(M,mxConstants.DIRECTION_SOUTH),mxEvent.consume(C)))}}catch(m){g.handleError(m)}mxEvent.isConsumed(C)||-V.apply(this,arguments)};var Q=k.connectVertex;k.connectVertex=function(C,M,T,m,z,I,L){var N=k.getIncomingTreeEdges(C);if(c(C)){var P=u(C),S=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,U=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;return P==M||0==N.length?E(C,M):S==U?H(C):F(C,M!=mxConstants.DIRECTION_NORTH&&M!=mxConstants.DIRECTION_WEST)}return Q.apply(this,arguments)};k.getSubtree=function(C){var M=[C];!l(C)&&!c(C)||p(C)||k.traverse(C,!0,function(T,m){var z=null!=-m&&k.isTreeEdge(m);z&&0>mxUtils.indexOf(M,m)&&M.push(m);(null==m||z)&&0>mxUtils.indexOf(M,T)&&M.push(T);return null==m||z});return M};var O=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){O.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",+V.apply(this,arguments)};var Q=k.connectVertex;k.connectVertex=function(C,M,T,m,z,I,L){var N=k.getIncomingTreeEdges(C);if(c(C)){var O=u(C),S=O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST,U=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;return O==M||0==N.length?E(C,M):S==U?H(C):F(C,M!=mxConstants.DIRECTION_NORTH&&M!=mxConstants.DIRECTION_WEST)}return Q.apply(this,arguments)};k.getSubtree=function(C){var M=[C];!l(C)&&!c(C)||p(C)||k.traverse(C,!0,function(T,m){var z=null!=+m&&k.isTreeEdge(m);z&&0>mxUtils.indexOf(M,m)&&M.push(m);(null==m||z)&&0>mxUtils.indexOf(M,T)&&M.push(T);return null==m||z});return M};var P=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){P.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(C){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(C),mxEvent.getClientY(C),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(C);this.graph.isMouseDown=!0;g.hoverIcons.reset();mxEvent.consume(C)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var q=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){q.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){y.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=C?"":"none")};var B=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(C,M){B.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=@@ -14605,39 +14607,39 @@ mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fa){fa.preventDefault()}));mxEvent.addListener(ca,"click",function(fa){"disabled"!=ca.getAttribute("disabled")&&X(fa);mxEvent.consume(fa)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),J.addListener("enabledChanged",W),W());return ca}function k(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=A.statusContainer?D.insertBefore(Z,A.statusContainer):D.appendChild(Z);return Z}function v(){for(var W=D.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}G=D.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>c;var Z=null;W||(Z=d("diagram"));X=W?d("diagram",null,-Editor.menuImage):null;null!=X&&(Z=X);k([Z,g(mxResources.get("shapes"),A.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),A.actions.get("image"),W?Editor.shapesImage:null),g(mxResources.get("format"),A.actions.get("format").funct,null,mxResources.get("format")+" ("+A.actions.get("format").shortcut+")",A.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=d("insert",!0,W?O:null);k([X,g(mxResources.get("delete"),A.actions.get("delete").funct,null,mxResources.get("delete"),-A.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);J.isEnabled()||X.classList.add("mxDisabled");411<=c&&(k([L,N],60),520<=c&&k([P,640<=c?g("",M.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",M,Editor.zoomInImage):null,640<=c?g("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}K.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),+Editor.menuImage):null;null!=X&&(Z=X);k([Z,g(mxResources.get("shapes"),A.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),A.actions.get("image"),W?Editor.shapesImage:null),g(mxResources.get("format"),A.actions.get("format").funct,null,mxResources.get("format")+" ("+A.actions.get("format").shortcut+")",A.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=d("insert",!0,W?P:null);k([X,g(mxResources.get("delete"),A.actions.get("delete").funct,null,mxResources.get("delete"),+A.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);J.isEnabled()||X.classList.add("mxDisabled");411<=c&&(k([L,N],60),520<=c&&k([O,640<=c?g("",M.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",M,Editor.zoomInImage):null,640<=c?g("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}K.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),t.classList.add("geMinimal"));t=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var x=document.createElement("div");x.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";x.style.bottom=t?"32px":"0px";this.sidebar=this.createSidebar(x);if(1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=c&&(b(this,!0),this.formatWindow.window.setVisible(!0));var A=this,J=A.editor.graph;A.toolbar=this.createToolbar(A.createDiv("geToolbar"));A.defaultLibraryName=mxResources.get("untitledLibrary");var D=document.createElement("div");D.className="geMenubarContainer";var G=null,R=new Menubar(A,D);A.statusContainer=A.createStatusContainer();A.statusContainer.style.position="relative";A.statusContainer.style.maxWidth="";A.statusContainer.style.cursor="default";var V=A.hideCurrentMenu;A.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var Q=A.descriptorChanged;A.descriptorChanged=function(){Q.apply(this,arguments);var W=A.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);D.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else D.removeAttribute("title")};A.setStatusText(A.editor.getStatus());D.appendChild(A.statusContainer);A.buttonContainer=document.createElement("div");A.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";D.appendChild(A.buttonContainer);A.menubarContainer=A.buttonContainer;A.tabContainer=document.createElement("div");A.tabContainer.className="geTabContainer geTabItem";A.tabContainer.style.cssText=-"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";t=A.diagramContainer.parentNode;x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";A.diagramContainer.style.top="47px";var O=Editor.addBoxImage;if(null!=A.hoverIcons){var q=A.hoverIcons.update;A.hoverIcons.update=function(){J.freehand.isDrawing()||q.apply(this,arguments)}}if(null!=J.freehand){var y=J.freehand.createStyle;J.freehand.createStyle=+"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";t=A.diagramContainer.parentNode;x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";A.diagramContainer.style.top="47px";var P=Editor.addBoxImage;if(null!=A.hoverIcons){var q=A.hoverIcons.update;A.hoverIcons.update=function(){J.freehand.isDrawing()||q.apply(this,arguments)}}if(null!=J.freehand){var y=J.freehand.createStyle;J.freehand.createStyle=function(W){return y.apply(this,arguments)+"sketch=0;"}}A.editor.addListener("statusChanged",mxUtils.bind(this,function(){A.setStatusText(A.editor.getStatus())}));A.setStatusText(A.editor.getStatus());var B=A.menus.get("viewZoom");if(null!=B){var C=function(W){if(mxEvent.isAltDown(W))A.hideCurrentMenu(),A.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))A.hideCurrentMenu(),A.actions.get("smartFit").funct(),mxEvent.consume(W)},-M=A.actions.get("zoomIn"),T=A.actions.get("zoomOut"),m=A.actions.get("resetView"),z=A.actions.get("undo"),I=A.actions.get("redo"),L=g("",z.funct,null,mxResources.get("undo")+" ("+z.shortcut+")",z,Editor.undoImage),N=g("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),P=g("",C,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,Editor.zoomFitImage);D.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";+M=A.actions.get("zoomIn"),T=A.actions.get("zoomOut"),m=A.actions.get("resetView"),z=A.actions.get("undo"),I=A.actions.get("redo"),L=g("",z.funct,null,mxResources.get("undo")+" ("+z.shortcut+")",z,Editor.undoImage),N=g("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),O=g("",C,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,Editor.zoomFitImage);D.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";var S=R.addMenu("100%",B.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.className="geTabItem";S.style.height=A.tabContainerHeight+"px";S.style.position="absolute";S.style.display="0"!=urlParams.pages?"flex":"none";S.style.alignItems="center";S.style.justifyContent="center";S.style.paddingRight="11px";S.style.whiteSpace="nowrap";S.style.overflow="hidden";S.style.fontSize="11px";S.style.width="51px";S.style.right="0px";S.style.bottom="0px";S.style.boxSizing="content-box";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px top 15px";S.style.backgroundRepeat="no-repeat";S.style.backgroundSize="10px";S.style.zIndex="1";x.appendChild(S);(function(W){mxEvent.addListener(W,"click",C);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*A.editor.graph.view.scale*(null!=ba?ba:1))+"%")});A.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);A.editor.addListener("resetGraphView",X);A.editor.addListener("pageSelected",X);A.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(S);var U=A.setGraphEnabled;A.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}x.appendChild(D);x.appendChild(A.diagramContainer);t.appendChild(x);A.updateTabContainer();!EditorUi.windowed&&1E3<=c&&b(this,!0);x.appendChild(A.tabContainer);v();A.addListener("lockedChanged",v);mxEvent.addListener(window,"resize",function(){v();null!=A.sidebarWindow&&A.sidebarWindow.window.fit();null!=A.formatWindow&&A.formatWindow.window.fit();null!=A.actions.outlineWindow&&A.actions.outlineWindow.window.fit();null!=A.actions.layersWindow&&A.actions.layersWindow.window.fit();null!=A.menus.chatWindow&&A.menus.chatWindow.window.fit();null!=A.menus.tagsWindow&&A.menus.tagsWindow.window.fit();null!=A.menus.findWindow&&A.menus.findWindow.window.fit();null!=A.menus.findReplaceWindow&&A.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,l,n,p){var u=l.y,F=l.x,H=!1,E=!1;if(null!=this.states&&null!=c&&null!=l){var K=this,d=new mxCellState,g=this.graph.getView().scale,k=Math.max(2,this.getGuideTolerance()/2);d.x=c.x+F;d.y=c.y+u;d.width=c.width;d.height=c.height;for(var v=[],t=[],x=0;x<this.states.length;x++){var A=this.states[x];A instanceof mxCellState&&(p||!this.graph.isCellSelected(A.cell))&&((d.x>=A.x&&d.x<=A.x+A.width||A.x>=d.x&&A.x<=d.x+d.width)&&(d.y>-A.y+A.height+4||d.y+d.height+4<A.y)?v.push(A):(d.y>=A.y&&d.y<=A.y+A.height||A.y>=d.y&&A.y<=d.y+d.height)&&(d.x>A.x+A.width+4||d.x+d.width+4<A.x)&&t.push(A))}var J=0,D=0,G=A=0,R=0,V=0,Q=0,O=0,q=5*g;if(1<v.length){v.push(d);v.sort(function(M,T){return M.y-T.y});var y=!1;x=d==v[0];g=d==v[v.length-1];if(!x&&!g)for(x=1;x<v.length-1;x++)if(d==v[x]){g=v[x-1];x=v[x+1];A=D=G=(x.y-g.y-g.height-d.height)/2;break}for(x=0;x<v.length-1;x++){g=v[x];var B=v[x+1],C=d==g||d==B;B=B.y-g.y-g.height;y|=d==g;if(0==D&&0==-J)D=B,J=1;else if(Math.abs(D-B)<=(C||1==x&&y?k:0))J+=1;else if(1<J&&y){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!y)J=0,A=D=0!=G?G:0,v.splice(0,0==x?1:x),x=-1;else break;0!=A||C||(D=A=B)}3==v.length&&v[1]==d&&(A=0)}if(1<t.length){t.push(d);t.sort(function(M,T){return M.x-T.x});y=!1;x=d==t[0];g=d==t[t.length-1];if(!x&&!g)for(x=1;x<t.length-1;x++)if(d==t[x]){g=t[x-1];x=t[x+1];Q=V=O=(x.x-g.x-g.width-d.width)/2;break}for(x=0;x<t.length-1;x++){g=t[x];B=t[x+1];C=d==g||d==B;B=B.x-g.x-g.width;y|=d==g;-if(0==V&&0==R)V=B,R=1;else if(Math.abs(V-B)<=(C||1==x&&y?k:0))R+=1;else if(1<R&&y){t=t.slice(0,x+1);break}else if(3<=t.length-x&&!y)R=0,Q=V=0!=O?O:0,t.splice(0,0==x?1:x),x=-1;else break;0!=Q||C||(V=Q=B)}3==t.length&&t[1]==d&&(Q=0)}k=function(M,T,m,z){var I=[];if(z){z=q;var L=0}else z=0,L=q;I.push(new mxPoint(M.x-z,M.y-L));I.push(new mxPoint(M.x+z,M.y+L));I.push(M);I.push(T);I.push(new mxPoint(T.x-z,T.y-L));I.push(new mxPoint(T.x+z,T.y+L));if(null!=m)return m.points=I,m;M=new mxPolyline(I,mxConstants.GUIDE_COLOR,-mxConstants.GUIDE_STROKEWIDTH);M.dialect=mxConstants.DIALECT_SVG;M.pointerEvents=!1;M.init(K.graph.getView().getOverlayPane());return M};V=function(M,T){if(M&&null!=K.guidesArrHor)for(M=0;M<K.guidesArrHor.length;M++)K.guidesArrHor[M].node.style.visibility="hidden";if(T&&null!=K.guidesArrVer)for(M=0;M<K.guidesArrVer.length;M++)K.guidesArrVer[M].node.style.visibility="hidden"};if(1<R&&R==t.length-1){R=[];O=K.guidesArrHor;H=[];F=0;x=t[0]==d?1:0;y=t[x].y+t[x].height;if(0<Q)for(x=0;x<t.length-1;x++)g=-t[x],B=t[x+1],d==g?(F=B.x-g.width-Q,H.push(new mxPoint(F+g.width+q,y)),H.push(new mxPoint(B.x-q,y))):d==B?(H.push(new mxPoint(g.x+g.width+q,y)),F=g.x+g.width+Q,H.push(new mxPoint(F-q,y))):(H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(B.x-q,y)));else g=t[0],x=t[2],F=g.x+g.width+(x.x-g.x-g.width-d.width)/2,H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(F-q,y)),H.push(new mxPoint(F+d.width+q,y)),H.push(new mxPoint(x.x-q,y));for(x=0;x<H.length;x+=2)t=H[x],Q=H[x+1],t=k(t,Q,null!=O?-O[x/2]:null),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=H.length/2;null!=O&&x<O.length;x++)O[x].destroy();K.guidesArrHor=R;F-=c.x;H=!0}else V(!0);if(1<J&&J==v.length-1){R=[];O=K.guidesArrVer;E=[];u=0;x=v[0]==d?1:0;J=v[x].x+v[x].width;if(0<A)for(x=0;x<v.length-1;x++)g=v[x],B=v[x+1],d==g?(u=B.y-g.height-A,E.push(new mxPoint(J,u+g.height+q)),E.push(new mxPoint(J,B.y-q))):d==B?(E.push(new mxPoint(J,g.y+g.height+q)),u=g.y+g.height+A,E.push(new mxPoint(J,u-q))):(E.push(new mxPoint(J,g.y+-g.height+q)),E.push(new mxPoint(J,B.y-q)));else g=v[0],x=v[2],u=g.y+g.height+(x.y-g.y-g.height-d.height)/2,E.push(new mxPoint(J,g.y+g.height+q)),E.push(new mxPoint(J,u-q)),E.push(new mxPoint(J,u+d.height+q)),E.push(new mxPoint(J,x.y-q));for(x=0;x<E.length;x+=2)t=E[x],Q=E[x+1],t=k(t,Q,null!=O?O[x/2]:null,!0),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=E.length/2;null!=O&&x<O.length;x++)O[x].destroy();K.guidesArrVer=R;u-=c.y;E=!0}else V(!1,!0)}if(H||E)return d=new mxPoint(F,u),v=b.call(this,+A.y+A.height+4||d.y+d.height+4<A.y)?v.push(A):(d.y>=A.y&&d.y<=A.y+A.height||A.y>=d.y&&A.y<=d.y+d.height)&&(d.x>A.x+A.width+4||d.x+d.width+4<A.x)&&t.push(A))}var J=0,D=0,G=A=0,R=0,V=0,Q=0,P=0,q=5*g;if(1<v.length){v.push(d);v.sort(function(M,T){return M.y-T.y});var y=!1;x=d==v[0];g=d==v[v.length-1];if(!x&&!g)for(x=1;x<v.length-1;x++)if(d==v[x]){g=v[x-1];x=v[x+1];A=D=G=(x.y-g.y-g.height-d.height)/2;break}for(x=0;x<v.length-1;x++){g=v[x];var B=v[x+1],C=d==g||d==B;B=B.y-g.y-g.height;y|=d==g;if(0==D&&0==+J)D=B,J=1;else if(Math.abs(D-B)<=(C||1==x&&y?k:0))J+=1;else if(1<J&&y){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!y)J=0,A=D=0!=G?G:0,v.splice(0,0==x?1:x),x=-1;else break;0!=A||C||(D=A=B)}3==v.length&&v[1]==d&&(A=0)}if(1<t.length){t.push(d);t.sort(function(M,T){return M.x-T.x});y=!1;x=d==t[0];g=d==t[t.length-1];if(!x&&!g)for(x=1;x<t.length-1;x++)if(d==t[x]){g=t[x-1];x=t[x+1];Q=V=P=(x.x-g.x-g.width-d.width)/2;break}for(x=0;x<t.length-1;x++){g=t[x];B=t[x+1];C=d==g||d==B;B=B.x-g.x-g.width;y|=d==g;+if(0==V&&0==R)V=B,R=1;else if(Math.abs(V-B)<=(C||1==x&&y?k:0))R+=1;else if(1<R&&y){t=t.slice(0,x+1);break}else if(3<=t.length-x&&!y)R=0,Q=V=0!=P?P:0,t.splice(0,0==x?1:x),x=-1;else break;0!=Q||C||(V=Q=B)}3==t.length&&t[1]==d&&(Q=0)}k=function(M,T,m,z){var I=[];if(z){z=q;var L=0}else z=0,L=q;I.push(new mxPoint(M.x-z,M.y-L));I.push(new mxPoint(M.x+z,M.y+L));I.push(M);I.push(T);I.push(new mxPoint(T.x-z,T.y-L));I.push(new mxPoint(T.x+z,T.y+L));if(null!=m)return m.points=I,m;M=new mxPolyline(I,mxConstants.GUIDE_COLOR,+mxConstants.GUIDE_STROKEWIDTH);M.dialect=mxConstants.DIALECT_SVG;M.pointerEvents=!1;M.init(K.graph.getView().getOverlayPane());return M};V=function(M,T){if(M&&null!=K.guidesArrHor)for(M=0;M<K.guidesArrHor.length;M++)K.guidesArrHor[M].node.style.visibility="hidden";if(T&&null!=K.guidesArrVer)for(M=0;M<K.guidesArrVer.length;M++)K.guidesArrVer[M].node.style.visibility="hidden"};if(1<R&&R==t.length-1){R=[];P=K.guidesArrHor;H=[];F=0;x=t[0]==d?1:0;y=t[x].y+t[x].height;if(0<Q)for(x=0;x<t.length-1;x++)g=+t[x],B=t[x+1],d==g?(F=B.x-g.width-Q,H.push(new mxPoint(F+g.width+q,y)),H.push(new mxPoint(B.x-q,y))):d==B?(H.push(new mxPoint(g.x+g.width+q,y)),F=g.x+g.width+Q,H.push(new mxPoint(F-q,y))):(H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(B.x-q,y)));else g=t[0],x=t[2],F=g.x+g.width+(x.x-g.x-g.width-d.width)/2,H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(F-q,y)),H.push(new mxPoint(F+d.width+q,y)),H.push(new mxPoint(x.x-q,y));for(x=0;x<H.length;x+=2)t=H[x],Q=H[x+1],t=k(t,Q,null!=P?+P[x/2]:null),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=H.length/2;null!=P&&x<P.length;x++)P[x].destroy();K.guidesArrHor=R;F-=c.x;H=!0}else V(!0);if(1<J&&J==v.length-1){R=[];P=K.guidesArrVer;E=[];u=0;x=v[0]==d?1:0;J=v[x].x+v[x].width;if(0<A)for(x=0;x<v.length-1;x++)g=v[x],B=v[x+1],d==g?(u=B.y-g.height-A,E.push(new mxPoint(J,u+g.height+q)),E.push(new mxPoint(J,B.y-q))):d==B?(E.push(new mxPoint(J,g.y+g.height+q)),u=g.y+g.height+A,E.push(new mxPoint(J,u-q))):(E.push(new mxPoint(J,g.y++g.height+q)),E.push(new mxPoint(J,B.y-q)));else g=v[0],x=v[2],u=g.y+g.height+(x.y-g.y-g.height-d.height)/2,E.push(new mxPoint(J,g.y+g.height+q)),E.push(new mxPoint(J,u-q)),E.push(new mxPoint(J,u+d.height+q)),E.push(new mxPoint(J,x.y-q));for(x=0;x<E.length;x+=2)t=E[x],Q=E[x+1],t=k(t,Q,null!=P?P[x/2]:null,!0),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=E.length/2;null!=P&&x<P.length;x++)P[x].destroy();K.guidesArrVer=R;u-=c.y;E=!0}else V(!1,!0)}if(H||E)return d=new mxPoint(F,u),v=b.call(this,c,d,n,p),H&&!E?d.y=v.y:E&&!H&&(d.x=v.x),v.y!=d.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=d.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),d;V(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,n=this.guidesArrHor;if(null!=l)for(var p=0;p<l.length;p++)l[p].node.style.visibility=c?"visible":"hidden";if(null!=-n)for(p=0;p<n.length;p++)n[p].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=l){for(n=0;n<l.length;n++)l[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;K.style.top=J.offsetTop-F+"px";K.style.left=J.offsetLeft-F+"px";K.style.width=(f?0:J.offsetWidth)+F+"px";K.style.height=(f?J.offsetHeight:0)+F+"px"}function n(J,D,G){if(null!=p)return J;var R;return function(){var V=this,Q=arguments,O=G&&!R;clearTimeout(R);R=setTimeout(function(){R=null;G||J.apply(V,Q)},D);O&&J.apply(V,Q)}}var p=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,+n)for(p=0;p<n.length;p++)n[p].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=l){for(n=0;n<l.length;n++)l[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;K.style.top=J.offsetTop-F+"px";K.style.left=J.offsetLeft-F+"px";K.style.width=(f?0:J.offsetWidth)+F+"px";K.style.height=(f?J.offsetHeight:0)+F+"px"}function n(J,D,G){if(null!=p)return J;var R;return function(){var V=this,Q=arguments,P=G&&!R;clearTimeout(R);R=setTimeout(function(){R=null;G||J.apply(V,Q)},D);P&&J.apply(V,Q)}}var p=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,u=window.cancelAnimationFrame||window.mozCancelAnimationFrame,F=this.RULER_THICKNESS,H=this;this.unit=e;var E=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"},K=document.createElement("div");K.className="geRuler";K.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){E=Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};K.style[f?"borderRight":"borderBottom"]="0.5px solid "+E.strokeClr;K.style.borderLeft="0.5px solid "+E.strokeClr});this.updateStyle();b.diagramContainer.appendChild(K);mxEvent.disableContextMenu(K);this.editorUiRefresh=b.refresh;b.refresh=function(J){H.editorUiRefresh.apply(b,arguments);l()};l();var d=document.createElement("canvas");d.width=K.offsetWidth;d.height=K.offsetHeight;K.style.overflow="hidden";d.style.position="relative";K.appendChild(d);var g=d.getContext("2d");this.ui=b;var k=b.editor.graph;this.graph=k;this.container=K;this.canvas=d;var v=function(J,D,G,R,V){J=Math.round(J);D=Math.round(D);G=Math.round(G);R=Math.round(R);g.beginPath();g.moveTo(J+.5,D+.5);g.lineTo(G+.5,R+.5);g.stroke();V&&(f?(g.save(),g.translate(J,D),g.rotate(-Math.PI/2),g.fillText(V,0,0),-g.restore()):g.fillText(V,J,D))},t=function(){g.clearRect(0,0,d.width,d.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=E.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var J=k.view.scale,D=k.view.getBackgroundPageBounds(),G=k.view.translate,R=k.pageVisible;G=R?F+(f?D.y-k.container.scrollTop:D.x-k.container.scrollLeft):F+(f?G.y*J-k.container.scrollTop:G.x*J-k.container.scrollLeft);var V=0;R&&(V=k.getPageLayout(),V=f?V.y*k.pageFormat.height:V.x*k.pageFormat.width);var Q;switch(H.unit){case mxConstants.POINTS:var O=-Q=10;var q=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:Q=10;O=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:Q=20;O=mxConstants.PIXELS_PER_MM;q=[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>=J||4<=J?8:16,O=mxConstants.PIXELS_PER_INCH/Q,q=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=O;2<=J?y=O/(2*Math.floor(J/2)):.5>=J&&(y=O*Math.floor(1/J/2)*(H.unit==mxConstants.MILLIMETERS?2:1));O=null;D=R?Math.min(G+(f?D.height:D.width),f?-d.height:d.width):f?d.height:d.width;if(R)if(g.fillStyle=E.outBkgClr,f){var B=G-F;0<B&&g.fillRect(0,F,F,B);D<d.height&&g.fillRect(0,D,F,d.height)}else B=G-F,0<B&&g.fillRect(F,0,B,F),D<d.width&&g.fillRect(D,0,d.width,F);g.fillStyle=E.fontClr;for(R=R?G:G%(y*J);R<=D;R+=y*J)if(B=Math.round((R-G)/J/y),!(R<F||B==O)){O=B;var C=null;0==B%Q&&(C=H.formatText(V+B*y)+"");f?v(F-q[Math.abs(B)%Q],R,F,R,C):v(R,F-q[Math.abs(B)%Q],R,F,C)}g.lineWidth=1;v(f?0:F,f?F:0,F,F);g.fillStyle=E.cornerClr;g.fillRect(0,0,F,F)},+g.restore()):g.fillText(V,J,D))},t=function(){g.clearRect(0,0,d.width,d.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=E.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var J=k.view.scale,D=k.view.getBackgroundPageBounds(),G=k.view.translate,R=k.pageVisible;G=R?F+(f?D.y-k.container.scrollTop:D.x-k.container.scrollLeft):F+(f?G.y*J-k.container.scrollTop:G.x*J-k.container.scrollLeft);var V=0;R&&(V=k.getPageLayout(),V=f?V.y*k.pageFormat.height:V.x*k.pageFormat.width);var Q;switch(H.unit){case mxConstants.POINTS:var P=+Q=10;var q=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:Q=10;P=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:Q=20;P=mxConstants.PIXELS_PER_MM;q=[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>=J||4<=J?8:16,P=mxConstants.PIXELS_PER_INCH/Q,q=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=P;2<=J?y=P/(2*Math.floor(J/2)):.5>=J&&(y=P*Math.floor(1/J/2)*(H.unit==mxConstants.MILLIMETERS?2:1));P=null;D=R?Math.min(G+(f?D.height:D.width),f?+d.height:d.width):f?d.height:d.width;if(R)if(g.fillStyle=E.outBkgClr,f){var B=G-F;0<B&&g.fillRect(0,F,F,B);D<d.height&&g.fillRect(0,D,F,d.height)}else B=G-F,0<B&&g.fillRect(F,0,B,F),D<d.width&&g.fillRect(D,0,d.width,F);g.fillStyle=E.fontClr;for(R=R?G:G%(y*J);R<=D;R+=y*J)if(B=Math.round((R-G)/J/y),!(R<F||B==P)){P=B;var C=null;0==B%Q&&(C=H.formatText(V+B*y)+"");f?v(F-q[Math.abs(B)%Q],R,F,R,C):v(R,F-q[Math.abs(B)%Q],R,F,C)}g.lineWidth=1;v(f?0:F,f?F:0,F,F);g.fillStyle=E.cornerClr;g.fillRect(0,0,F,F)},x=-1,A=function(){null!=p?(null!=u&&u(x),x=p(t)):t()};this.drawRuler=A;this.sizeListener=e=n(function(){var J=k.container;f?(J=J.offsetHeight+F,d.height!=J&&(d.height=J,K.style.height=J+"px",A())):(J=J.offsetWidth+F,d.width!=J&&(d.width=J,K.style.width=J+"px",A()))},10);this.pageListener=function(){A()};this.scrollListener=c=n(function(){var J=f?k.container.scrollTop:k.container.scrollLeft;H.lastScroll!=J&&(H.lastScroll=J,A())},10);this.unitListener=function(J,D){H.setUnit(D.getProperty("unit"))};k.addListener(mxEvent.SIZE,e);k.container.addEventListener("scroll",c);k.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){E=J;K.style.background=E.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,D,G,R){if(f&&4<J.height||!f&&4<J.width){if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,-H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(z){}var V=H.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=E.guideClr;g.setLineDash([2]);if(f){var Q=J.y+V.y+F-this.graph.container.scrollTop;var O=0;var q=Q+J.height/2;var y=F/2;var B=Q+J.height;var C=0;var M=g.getImageData(O,Q-1,F,3);v(O,Q,F,Q);Q--;var T=g.getImageData(y,q-1,F,3);v(y,q,F,q);q--;var m=g.getImageData(C,-B-1,F,3);v(C,B,F,B);B--}else Q=0,O=J.x+V.x+F-this.graph.container.scrollLeft,q=F/2,y=O+J.width/2,B=0,C=O+J.width,M=g.getImageData(O-1,Q,3,F),v(O,Q,O,F),O--,T=g.getImageData(y-1,q,3,F),v(y,q,y,F),y--,m=g.getImageData(C-1,B,3,F),v(C,B,C,F),C--;if(null==H.guidePart||H.guidePart.x1!=O||H.guidePart.y1!=Q)H.guidePart={imgData1:M,x1:O,y1:Q,imgData2:T,x2:y,y2:q,imgData3:m,x3:C,y3:B}}catch(z){}}else V=H.origGuideMove.apply(this,arguments);return V};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=+H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(z){}var V=H.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=E.guideClr;g.setLineDash([2]);if(f){var Q=J.y+V.y+F-this.graph.container.scrollTop;var P=0;var q=Q+J.height/2;var y=F/2;var B=Q+J.height;var C=0;var M=g.getImageData(P,Q-1,F,3);v(P,Q,F,Q);Q--;var T=g.getImageData(y,q-1,F,3);v(y,q,F,q);q--;var m=g.getImageData(C,+B-1,F,3);v(C,B,F,B);B--}else Q=0,P=J.x+V.x+F-this.graph.container.scrollLeft,q=F/2,y=P+J.width/2,B=0,C=P+J.width,M=g.getImageData(P-1,Q,3,F),v(P,Q,P,F),P--,T=g.getImageData(y-1,q,3,F),v(y,q,y,F),y--,m=g.getImageData(C-1,B,3,F),v(C,B,C,F),C--;if(null==H.guidePart||H.guidePart.x1!=P||H.guidePart.y1!=Q)H.guidePart={imgData1:M,x1:P,y1:Q,imgData2:T,x2:y,y2:q,imgData3:m,x3:C,y3:B}}catch(z){}}else V=H.origGuideMove.apply(this,arguments);return V};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var J=H.origGuideDestroy.apply(this,arguments);if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3),H.guidePart=null}catch(D){}return J}}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(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};@@ -14648,32 +14650,32 @@ mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setfunction(q){E=q};this.setAutoScroll=function(q){K=q};this.setOpenFill=function(q){d=q};this.setStopClickEnabled=function(q){v=q};this.setSelectInserted=function(q){t=q};this.setSmoothing=function(q){f=q};this.getSmoothing=function(){return f};this.setPerfectFreehandMode=function(q){J=q};this.isPerfectFreehandMode=function(){return J};this.setBrushSize=function(q){A.size=q};this.getBrushSize=function(){return A.size};var D=function(q){k=q;b.getRubberband().setEnabled(!q);b.graphHandler.setSelectEnabled(!q);b.graphHandler.setMoveEnabled(!q);b.container.style.cursor=q?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){D(!0)};this.isDrawing=function(){return k};var G=mxUtils.bind(this,function(q){if(c){var y=u.length,B=v&&0<p.length&&null!=u&&2>u.length;B||p.push.apply(p,u);u=[];p.push(null);l.push(c);c=null;(B||E)&&this.stopDrawing();E&&(!B||2<=y)&&this.startDrawing();mxEvent.consume(q)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(q){var y=null!=x?x:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=y||q||(y=b.shapeForegroundColor);return y};this.setStrokeColor=function(q){x=q};this.createStyle=function(q){var y=";fillColor=none;";J&&(y=";lineShape=1;");y+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+q+y};this.stopDrawing=function(){if(0<l.length){if(J){for(var q=[],y=0;y<p.length;y++)null!=p[y]&&q.push([p[y].x,-p[y].y]);q=PerfectFreehand.getStroke(q,A);p=[];for(y=0;y<q.length;y++)p.push({x:q[y][0],y:q[y][1]});p.push(null)}q=p[0].x;var B=p[0].x,C=p[0].y,M=p[0].y;for(y=1;y<p.length;y++)null!=p[y]&&(q=Math.max(q,p[y].x),B=Math.min(B,p[y].x),C=Math.max(C,p[y].y),M=Math.min(M,p[y].y));q-=B;C-=M;if(0<q&&0<C){var T=100/q,m=100/C;p.map(function(P){if(null==P)return P;P.x=(P.x-B)*T;P.y=(P.y-M)*m;return P});var z='<shape strokewidth="inherit"><foreground>',I=0;for(y=0;y<p.length;y++){var L=p[y];if(null==L){L=!1;I=+p[y].y]);q=PerfectFreehand.getStroke(q,A);p=[];for(y=0;y<q.length;y++)p.push({x:q[y][0],y:q[y][1]});p.push(null)}q=p[0].x;var B=p[0].x,C=p[0].y,M=p[0].y;for(y=1;y<p.length;y++)null!=p[y]&&(q=Math.max(q,p[y].x),B=Math.min(B,p[y].x),C=Math.max(C,p[y].y),M=Math.min(M,p[y].y));q-=B;C-=M;if(0<q&&0<C){var T=100/q,m=100/C;p.map(function(O){if(null==O)return O;O.x=(O.x-B)*T;O.y=(O.y-M)*m;return O});var z='<shape strokewidth="inherit"><foreground>',I=0;for(y=0;y<p.length;y++){var L=p[y];if(null==L){L=!1;I=p[I];var N=p[y-1];!F&&H&&(L=I.x-N.x,N=I.y-N.y,L=Math.sqrt(L*L+N*N)<=b.tolerance);if(F||L)z+='<line x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>';z+="</path>"+(d||F||L?"<fillstroke/>":"<stroke/>");I=y+1}else z=y==I?z+('<path><move x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>'):z+('<line x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>')}z+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){y=this.createStyle("stencil("+Graph.compress(z)+")");z=b.view.scale;I=b.view.translate;y=new mxCell("",new mxGeometry(B/z-I.x,M/z-I.y,q/z,C/z),y);y.vertex=1;b.model.beginUpdate();try{y=b.addCell(y),b.fireEvent(new mxEventObject("cellsInserted","cells",[y])),b.fireEvent(new mxEventObject("freehandInserted","cell",y))}finally{b.model.endUpdate()}t&&b.setSelectionCells([y])}}for(y=0;y<l.length;y++)l[y].parentNode.removeChild(l[y]);c=null;l=[];p=[]}D(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(q,y){q=y.getProperty("eventName");y=y.getProperty("event");q==mxEvent.MOUSE_MOVE&&k&&(null!=y.sourceState&&y.sourceState.setCursor("crosshair"),y.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(q,y){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q=y.getEvent(),k&&!mxEvent.isPopupTrigger(q)&&!mxEvent.isMiddleMouseButton(q)&&!mxEvent.isMultiTouchEvent(q))){var B=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);B=Math.max(1,B*b.view.scale);var C=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",J?C:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",C);c.setAttribute("stroke-width",B);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(C=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",C=C.split(" ").map(function(M){return parseFloat(M)*B}).join(" "),c.setAttribute("stroke-dasharray",C));g=[];q=V(q);Q(q);n="M"+q.x+" "+q.y;p.push(q);u=[];c.setAttribute("d",J?PerfectFreehand.getSvgPathFromStroke([[q.x,q.y]],A):n);e.appendChild(c);y.consume()}}),-mouseMove:mxUtils.bind(this,function(q,y){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){q=y.getEvent();q=V(q);Q(q);var B=O(0);if(B)if(p.push(B),J){var C=[];for(B=0;B<p.length;B++)C.push([p[B].x,p[B].y]);u=[];for(var M=2;M<g.length;M+=2)B=O(M),C.push([B.x,B.y]),u.push(B);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(C,A))}else{n+=" L"+B.x+" "+B.y;C="";u=[];for(M=2;M<g.length;M+=2)B=O(M),C+=" L"+B.x+" "+B.y,u.push(B);c.setAttribute("d",n+C)}K&&(B=b.view.translate,b.scrollRectToVisible((new mxRectangle(q.x--B.x,q.y-B.y)).grow(20)));y.consume()}}),mouseUp:mxUtils.bind(this,function(q,y){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(G(y.getEvent()),y.consume())})});var V=function(q){return mxUtils.convertPoint(b.container,mxEvent.getClientX(q),mxEvent.getClientY(q))},Q=function(q){for(g.push(q);g.length>f;)g.shift()},O=function(q){var y=g.length;if(1===y%2||y>=f){var B=0,C=0,M,T=0;for(M=q;M<y;M++)T++,q=g[M],B+=q.x,C+=q.y;return{x:B/T,y:C/T}}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;function P2PCollab(b,e,f){function c(I,L){try{if(!O){var N=e.file.getCurrentUser();if(Q&&null!=N&&null!=N.displayName){var P={from:D,id:v,type:I,sessionId:e.clientId,userId:N.id,username:N.displayName,data:L,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};P={bytes:e.objectToString(P),data:"aes"};P=JSON.stringify(P);q&&"cursor"!=I&&EditorUi.debug("P2PCollab: sending to socket server",[P]);v++;N=!q&&("cursor"==I||"selectionChange"==I);V&&!N&&M("message",P);if(N)for(p2pId in R)R[p2pId].send(P)}}}catch(S){null!=-window.console&&console.error(S,I,L)}}function l(I){if(b.shareCursorPosition&&!E.isMouseDown){var L=mxUtils.getOffset(E.container),N=E.view.translate,P=E.view.scale,S=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:S,x:Math.round((I.getX()-L.x+E.container.scrollLeft)/P-N.x),y:Math.round((I.getY()-L.y+E.container.scrollTop)/P-N.y)})}}function n(I,L){var N=null!=b.currentPage?b.currentPage.getId():null;if(null!=I&&null!=I.cursor&&null!=I.lastCursor)if(null!=I.lastCursor.hide||!b.isShowRemoteCursors()||-null!=I.lastCursor.pageId&&I.lastCursor.pageId!=N)I.cursor.style.display="none";else{N=function(){var Z=Math.max(E.container.scrollLeft,Math.min(E.container.scrollLeft+E.container.clientWidth-I.cursor.clientWidth,U)),Y=Math.max(E.container.scrollTop-22,Math.min(E.container.scrollTop+E.container.clientHeight-I.cursor.clientHeight,W));X.style.opacity=Z!=U||Y!=W?0:1;I.cursor.style.left=Z+"px";I.cursor.style.top=Y+"px";I.cursor.style.display=""};var P=E.view.translate,S=E.view.scale,U=(P.x+I.lastCursor.x)*-S+8,W=(P.y+I.lastCursor.y)*S-12,X=I.cursor.getElementsByTagName("img")[0];L?(mxUtils.setPrefixedStyle(I.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(N,0)):(mxUtils.setPrefixedStyle(I.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),N())}}function p(I,L){try{var N=function(){if(null==k[S]){var ca=J[S];null==ca&&(ca=K%g.length,J[S]=ca,K++);var fa=g[ca];ca=11<ca?"black":"white";+mouseMove:mxUtils.bind(this,function(q,y){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){q=y.getEvent();q=V(q);Q(q);var B=P(0);if(B)if(p.push(B),J){var C=[];for(B=0;B<p.length;B++)C.push([p[B].x,p[B].y]);u=[];for(var M=2;M<g.length;M+=2)B=P(M),C.push([B.x,B.y]),u.push(B);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(C,A))}else{n+=" L"+B.x+" "+B.y;C="";u=[];for(M=2;M<g.length;M+=2)B=P(M),C+=" L"+B.x+" "+B.y,u.push(B);c.setAttribute("d",n+C)}K&&(B=b.view.translate,b.scrollRectToVisible((new mxRectangle(q.x-+B.x,q.y-B.y)).grow(20)));y.consume()}}),mouseUp:mxUtils.bind(this,function(q,y){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(G(y.getEvent()),y.consume())})});var V=function(q){return mxUtils.convertPoint(b.container,mxEvent.getClientX(q),mxEvent.getClientY(q))},Q=function(q){for(g.push(q);g.length>f;)g.shift()},P=function(q){var y=g.length;if(1===y%2||y>=f){var B=0,C=0,M,T=0;for(M=q;M<y;M++)T++,q=g[M],B+=q.x,C+=q.y;return{x:B/T,y:C/T}}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;function P2PCollab(b,e,f){function c(I,L){try{if(!P){var N=e.file.getCurrentUser();if(Q&&null!=N&&null!=N.displayName){var O={from:D,id:v,type:I,sessionId:e.clientId,userId:N.id,username:N.displayName,data:L,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};O={bytes:e.objectToString(O),data:"aes"};O=JSON.stringify(O);q&&"cursor"!=I&&EditorUi.debug("P2PCollab: sending to socket server",[O]);v++;N=!q&&("cursor"==I||"selectionChange"==I);V&&!N&&M("message",O);if(N)for(p2pId in R)R[p2pId].send(O)}}}catch(S){null!=+window.console&&console.error(S,I,L)}}function l(I){if(b.shareCursorPosition&&!E.isMouseDown){var L=mxUtils.getOffset(E.container),N=E.view.translate,O=E.view.scale,S=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:S,x:Math.round((I.getX()-L.x+E.container.scrollLeft)/O-N.x),y:Math.round((I.getY()-L.y+E.container.scrollTop)/O-N.y)})}}function n(I,L){var N=null!=b.currentPage?b.currentPage.getId():null;if(null!=I&&null!=I.cursor&&null!=I.lastCursor)if(null!=I.lastCursor.hide||!b.isShowRemoteCursors()||+null!=I.lastCursor.pageId&&I.lastCursor.pageId!=N)I.cursor.style.display="none";else{N=function(){var Z=Math.max(E.container.scrollLeft,Math.min(E.container.scrollLeft+E.container.clientWidth-I.cursor.clientWidth,U)),Y=Math.max(E.container.scrollTop-22,Math.min(E.container.scrollTop+E.container.clientHeight-I.cursor.clientHeight,W));X.style.opacity=Z!=U||Y!=W?0:1;I.cursor.style.left=Z+"px";I.cursor.style.top=Y+"px";I.cursor.style.display=""};var O=E.view.translate,S=E.view.scale,U=(O.x+I.lastCursor.x)*+S+8,W=(O.y+I.lastCursor.y)*S-12,X=I.cursor.getElementsByTagName("img")[0];L?(mxUtils.setPrefixedStyle(I.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(N,0)):(mxUtils.setPrefixedStyle(I.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),N())}}function p(I,L){try{var N=function(){if(null==k[S]){var ca=J[S];null==ca&&(ca=K%g.length,J[S]=ca,K++);var fa=g[ca];ca=11<ca?"black":"white";k[S]={cursor:document.createElement("div"),color:fa,selection:{}};x[L]=S;U=k[S].cursor;U.style.pointerEvents="none";U.style.position="absolute";U.style.display="none";U.style.opacity="0.9";var aa=document.createElement("img");mxUtils.setPrefixedStyle(aa.style,"transform","rotate(-45deg)translateX(-14px)");aa.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+fa+'" fill="'+fa+'"/>').src);aa.style.width="10px";U.appendChild(aa);aa=document.createElement("div");-aa.style.backgroundColor=fa;aa.style.color=ca;aa.style.fontSize="9pt";aa.style.padding="3px 7px";aa.style.marginTop="8px";aa.style.borderRadius="10px";aa.style.maxWidth="100px";aa.style.overflow="hidden";aa.style.textOverflow="ellipsis";aa.style.whiteSpace="nowrap";mxUtils.write(aa,P);U.appendChild(aa);b.diagramContainer.appendChild(U)}else U=k[S].cursor;W=k[S].selection};if(!O){I=JSON.parse(I);null!=I.bytes&&(I=e.stringToObject(I.bytes));q&&"cursor"!=I.type&&EditorUi.debug("P2PCollab: msg received",-[I]);if(null!=L){if(I.from==D||t[I.from]>=I.id){EditorUi.debug("P2PCollab: Dropped Message",I,D,t[I.from]);return}t[I.from]=I.id}var P=I.username?I.username:"Anonymous",S=I.sessionId,U,W;null!=k[S]&&(clearTimeout(k[S].inactiveTO),k[S].inactiveTO=setTimeout(function(){F(null,S)},12E4));var X=I.data;switch(I.type){case "cursor":N();k[S].lastCursor=X;n(k[S],!0);break;case "diff":try{I=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(I.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",+aa.style.backgroundColor=fa;aa.style.color=ca;aa.style.fontSize="9pt";aa.style.padding="3px 7px";aa.style.marginTop="8px";aa.style.borderRadius="10px";aa.style.maxWidth="100px";aa.style.overflow="hidden";aa.style.textOverflow="ellipsis";aa.style.whiteSpace="nowrap";mxUtils.write(aa,O);U.appendChild(aa);b.diagramContainer.appendChild(U)}else U=k[S].cursor;W=k[S].selection};if(!P){I=JSON.parse(I);null!=I.bytes&&(I=e.stringToObject(I.bytes));q&&"cursor"!=I.type&&EditorUi.debug("P2PCollab: msg received",+[I]);if(null!=L){if(I.from==D||t[I.from]>=I.id){EditorUi.debug("P2PCollab: Dropped Message",I,D,t[I.from]);return}t[I.from]=I.id}var O=I.username?I.username:"Anonymous",S=I.sessionId,U,W;null!=k[S]&&(clearTimeout(k[S].inactiveTO),k[S].inactiveTO=setTimeout(function(){F(null,S)},12E4));var X=I.data;switch(I.type){case "cursor":N();k[S].lastCursor=X;n(k[S],!0);break;case "diff":try{I=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(I.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=X.pageId&&X.pageId==Z){N();for(N=0;N<X.removed.length;N++){var Y=X.removed[N];if(null!=Y){var ba=W[Y];delete W[Y];null!=ba&&ba.destroy()}}for(N=0;N<X.added.length;N++)if(Y=X.added[N],null!=Y){var ea=E.model.getCell(Y);null!=ea&&(W[Y]=E.highlightCell(ea,k[S].color,6E4,70,3))}}}break;case "notify":I=null!=X.data?e.stringToObject(decodeURIComponent(X.data)):X.msg,-e.handleMessageData(I.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",I))}}catch(ca){null!=window.console&&console.warn(ca,I,L)}}function u(I,L){if(!q&&SimplePeer.WEBRTC_SUPPORT){var N=new SimplePeer({initiator:L,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});N.on("signal",function(P){M("sendSignal",{to:I,from:D,signal:P})});N.on("error",function(P){delete G[I];EditorUi.debug("P2PCollab: p2p socket error",P);!O&&L&&N.destroyed&&A[I]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",-I),u(I,!0))});N.on("connect",function(){delete G[I];null==R[I]||R[I].destroyed?(R[I]=N,A[I]=!0,EditorUi.debug("P2PCollab: p2p socket connected",I)):(N.noP2PMapDel=!0,N.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",I))});N.on("close",function(){N.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",I),H(x[I]),delete R[I])});N.on("data",p);return G[I]=N}}function F(I,L){H(L||x[I]);null!=I&&(delete x[I],A[I]=!1)}function H(I){var L=k[I];if(null!=L){var N=L.selection,P;for(P in N)null!=-N[P]&&N[P].destroy();null!=L.cursor&&null!=L.cursor.parentNode&&L.cursor.parentNode.removeChild(L.cursor);clearTimeout(L.inactiveTO);delete k[I]}}var E=b.editor.graph,K=0,d=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),k={},v=1,t={},x={},A={},J={},D,G={},R={},V=!0,Q=!1,O=!1,q="0"!=urlParams["no-p2p"],y=!1,B=0,C=null,M=mxUtils.bind(this,function(I,L){if(!O)try{null!=+e.handleMessageData(I.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",I))}}catch(ca){null!=window.console&&console.warn(ca,I,L)}}function u(I,L){if(!q&&SimplePeer.WEBRTC_SUPPORT){var N=new SimplePeer({initiator:L,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});N.on("signal",function(O){M("sendSignal",{to:I,from:D,signal:O})});N.on("error",function(O){delete G[I];EditorUi.debug("P2PCollab: p2p socket error",O);!P&&L&&N.destroyed&&A[I]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",+I),u(I,!0))});N.on("connect",function(){delete G[I];null==R[I]||R[I].destroyed?(R[I]=N,A[I]=!0,EditorUi.debug("P2PCollab: p2p socket connected",I)):(N.noP2PMapDel=!0,N.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",I))});N.on("close",function(){N.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",I),H(x[I]),delete R[I])});N.on("data",p);return G[I]=N}}function F(I,L){H(L||x[I]);null!=I&&(delete x[I],A[I]=!1)}function H(I){var L=k[I];if(null!=L){var N=L.selection,O;for(O in N)null!=+N[O]&&N[O].destroy();null!=L.cursor&&null!=L.cursor.parentNode&&L.cursor.parentNode.removeChild(L.cursor);clearTimeout(L.inactiveTO);delete k[I]}}var E=b.editor.graph,K=0,d=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),k={},v=1,t={},x={},A={},J={},D,G={},R={},V=!0,Q=!1,P=!1,q="0"!=urlParams["no-p2p"],y=!1,B=0,C=null,M=mxUtils.bind(this,function(I,L){if(!P)try{null!=d?(d.send(JSON.stringify({action:I,msg:L})),q||EditorUi.debug("P2PCollab: sending to socket server",[I],[L])):this.joinFile(!0)}catch(N){C=N,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,N)}});this.sendMessage=c;this.sendDiff=function(I){this.sendMessage("diff",{diff:I})};this.sendNotification=function(I){this.sendMessage("notify",{msg:I})};this.getState=function(){return null!=d?d.readyState:3};this.getLastError=function(){return C};-this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(I,L){},mouseMove:function(I,L){var N,P=-1;return function(){clearTimeout(N);var S=this,U=arguments,W=function(){N=null;P=Date.now();I.apply(S,U)};Date.now()-P>L?W():N=setTimeout(W,L)}}(function(I,L){l(L)},300),mouseUp:function(I,L){l(L)}};E.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);-var T=mxGraphHandler.prototype.maxCells,m=null,z={};this.selectionChangeListener=function(I,L){var N=function(P){return null!=P?P.id:null};null!=m&&window.clearTimeout(m);m=window.setTimeout(function(){for(var P=E.getSelectionCount()>T?[]:E.getSelectionCells().map(N),S=null!=b.currentPage?b.currentPage.getId():null,U={},W=[],X=[],Z=0;Z<P.length;Z++){var Y=P[Z];null!=Y&&(U[Y]=!0,null==z[Y]&&X.push(Y))}for(Y in z)U[Y]||W.push(Y);z=U;c("selectionChange",{pageId:S,removed:W,added:X})},300)};E.getSelectionModel().addListener(mxEvent.CHANGE,-this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var I in k)n(k[I])});mxEvent.addListener(E.container,"scroll",this.cursorHandler);E.getView().addListener(mxEvent.SCALE,this.cursorHandler);E.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);E.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(I){if(!O)try{y&&-(EditorUi.debug("P2PCollab: joinInProgress on",y),C="busy");y=++B;try{null!=d&&1==d.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",d.joinId),d.close(1E3),d=null)}catch(P){EditorUi.debug("P2PCollab: closing socket error",P)}var L=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);null==d&&(d=L);L.addEventListener("open",function(P){d=L;d.joinId=y;y=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",d.joinId);Editor.enableRealtimeCache||-window.setTimeout(function(){e.sendJoinMessage()},0);I&&e.scheduleCleanup()});L.addEventListener("message",function(P){try{q||EditorUi.debug("P2PCollab: msg received",[P]);var S=JSON.parse(P.data);q&&"message"!=S.action&&EditorUi.debug("P2PCollab: msg received",[P]);switch(S.action){case "message":p(S.msg,S.from);break;case "clientsList":var U=S.msg;D=U.cId;Q=!0;for(S=0;S<U.list.length;S++)u(U.list[S],!0);break;case "signal":var W=S.msg;if(!q){if(G[W.from])var X=G[W.from];else X=u(W.from,!1),V=!0;-X.signal(W.signal)}break;case "newClient":V=!0;break;case "clientLeft":F(S.msg);break;case "sendSignalFailed":var Z=S.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete G[Z.to];A[Z.to]=!1}}catch(Y){null!=window.console&&console.warn(Y,P)}});var N=!1;L.addEventListener("close",mxUtils.bind(this,function(P){EditorUi.debug("P2PCollab: WebSocket closed",L.joinId,"reconnecting",P.code,P.reason);EditorUi.debug("P2PCollab: closing socket on",L.joinId);O||1E3==P.code||B!=-L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in close on",L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),window.setTimeout(mxUtils.bind(this,function(){N=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));L.addEventListener("error",mxUtils.bind(this,function(P){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",P);EditorUi.debug("P2PCollab: error socket on",L.joinId);O||B!=L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in error on",-L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),N=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(P){C=P,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!O){EditorUi.debug("P2PCollab: destroyed");O=!0;for(sessionId in k)H(sessionId);null!=this.mouseListeners&&E.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&+this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(I,L){},mouseMove:function(I,L){var N,O=-1;return function(){clearTimeout(N);var S=this,U=arguments,W=function(){N=null;O=Date.now();I.apply(S,U)};Date.now()-O>L?W():N=setTimeout(W,L)}}(function(I,L){l(L)},300),mouseUp:function(I,L){l(L)}};E.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);+var T=mxGraphHandler.prototype.maxCells,m=null,z={};this.selectionChangeListener=function(I,L){var N=function(O){return null!=O?O.id:null};null!=m&&window.clearTimeout(m);m=window.setTimeout(function(){for(var O=E.getSelectionCount()>T?[]:E.getSelectionCells().map(N),S=null!=b.currentPage?b.currentPage.getId():null,U={},W=[],X=[],Z=0;Z<O.length;Z++){var Y=O[Z];null!=Y&&(U[Y]=!0,null==z[Y]&&X.push(Y))}for(Y in z)U[Y]||W.push(Y);z=U;c("selectionChange",{pageId:S,removed:W,added:X})},300)};E.getSelectionModel().addListener(mxEvent.CHANGE,+this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var I in k)n(k[I])});mxEvent.addListener(E.container,"scroll",this.cursorHandler);E.getView().addListener(mxEvent.SCALE,this.cursorHandler);E.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);E.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(I){if(!P)try{y&&+(EditorUi.debug("P2PCollab: joinInProgress on",y),C="busy");y=++B;try{null!=d&&1==d.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",d.joinId),d.close(1E3),d=null)}catch(O){EditorUi.debug("P2PCollab: closing socket error",O)}var L=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);null==d&&(d=L);L.addEventListener("open",function(O){d=L;d.joinId=y;y=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",d.joinId);Editor.enableRealtimeCache||+window.setTimeout(function(){e.sendJoinMessage()},0);I&&e.scheduleCleanup()});L.addEventListener("message",function(O){try{q||EditorUi.debug("P2PCollab: msg received",[O]);var S=JSON.parse(O.data);q&&"message"!=S.action&&EditorUi.debug("P2PCollab: msg received",[O]);switch(S.action){case "message":p(S.msg,S.from);break;case "clientsList":var U=S.msg;D=U.cId;Q=!0;for(S=0;S<U.list.length;S++)u(U.list[S],!0);break;case "signal":var W=S.msg;if(!q){if(G[W.from])var X=G[W.from];else X=u(W.from,!1),V=!0;+X.signal(W.signal)}break;case "newClient":V=!0;break;case "clientLeft":F(S.msg);break;case "sendSignalFailed":var Z=S.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete G[Z.to];A[Z.to]=!1}}catch(Y){null!=window.console&&console.warn(Y,O)}});var N=!1;L.addEventListener("close",mxUtils.bind(this,function(O){EditorUi.debug("P2PCollab: WebSocket closed",L.joinId,"reconnecting",O.code,O.reason);EditorUi.debug("P2PCollab: closing socket on",L.joinId);P||1E3==O.code||B!=+L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in close on",L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),window.setTimeout(mxUtils.bind(this,function(){N=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));L.addEventListener("error",mxUtils.bind(this,function(O){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",O);EditorUi.debug("P2PCollab: error socket on",L.joinId);P||B!=L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in error on",+L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),N=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(O){C=O,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!P){EditorUi.debug("P2PCollab: destroyed");P=!0;for(sessionId in k)H(sessionId);null!=this.mouseListeners&&E.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&E.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(E.container,"scroll",this.cursorHandler),E.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=d&&1<=d.readyState&&(d.close(1E3),d=null);for(var I in R)null!=R[I]&&R[I].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.jsindex 899e758e1..51fc86747 100644--- a/src/main/webapp/js/integrate.min.js+++ b/src/main/webapp/js/integrate.min.js@@ -64,7 +64,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"26.0.13",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.15",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),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||@@ -2003,10 +2003,10 @@ Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFiEditor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(f,h){b.undoableEditHappened(h.getProperty("edit"))};var e=mxUtils.bind(this,function(f,h){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(f,h){f=h.getProperty("edit").changes;f=a.getSelectionCellsForChanges(f);h=!1;if(0<f.length){for(var d=[],g=0;g<f.length;g++)null!=a.view.getState(f[g])&&(d.push(f[g]),h||(a.scrollCellToVisible(f[g]),h=!0));a.setSelectionCells(d)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};-function Dialog(a,b,e,f,h,d,g,m,p,k,u){this.editorUi=a;var w=p?57:0,z=e,C=f,E=p?0:64,D=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(D.height=window.innerHeight);var G=D.height;D=Math.max(1,Math.round((D.width-e-E)/2));var K=Math.max(1,Math.round((G-f-a.footerHeight)/3));b.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-E):e;f=Math.min(f,G-E);0<a.dialogs.length&&-(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var L=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=L.x+"px";this.bg.style.top=L.y+"px";D+=L.x;K+=L.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",K+=a.embedViewport.y,D+=a.embedViewport.x);-h&&document.body.appendChild(this.bg);var Q=a.createDiv(p?"geTransDialog":"geDialog");h=this.getPosition(D,K,e,f);D=h.x;K=h.y;Q.style.width=e+"px";Q.style.height=f+"px";Q.style.left=D+"px";Q.style.top=K+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")),-d.className="geDialogClose",d.style.top=K+14+"px",d.style.left=D+e+38-w+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!u)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(U){N=!0}),null,mxUtils.bind(this,function(U){N&&(a.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var U=k();null!=U&&(z=e=U.w,C=f=U.h)}U=Editor.inlineFullscreen||+function Dialog(a,b,e,f,h,d,g,m,p,k,u){this.editorUi=a;var w=p?57:0,z=e,C=f,E=p?0:64,D=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(D.height=window.innerHeight);var G=D.height;D=Math.max(1,Math.round((D.width-e-E)/2));var J=Math.max(1,Math.round((G-f-a.footerHeight)/3));b.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-E):e;f=Math.min(f,G-E);0<a.dialogs.length&&+(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var L=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=L.x+"px";this.bg.style.top=L.y+"px";D+=L.x;J+=L.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",J+=a.embedViewport.y,D+=a.embedViewport.x);+h&&document.body.appendChild(this.bg);var Q=a.createDiv(p?"geTransDialog":"geDialog");h=this.getPosition(D,J,e,f);D=h.x;J=h.y;Q.style.width=e+"px";Q.style.height=f+"px";Q.style.left=D+"px";Q.style.top=J+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")),+d.className="geDialogClose",d.style.top=J+14+"px",d.style.left=D+e+38-w+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!u)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(U){N=!0}),null,mxUtils.bind(this,function(U){N&&(a.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var U=k();null!=U&&(z=e=U.w,C=f=U.h)}U=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);G=U.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");e=null!=document.body?Math.min(z,document.body.scrollWidth-E):z;f=Math.min(C,G-E);U=Math.max(1,Math.round((U.width-e-E)/2));var Y=Math.max(1,Math.round((G-f-a.footerHeight)/3));Y=this.getPosition(U,Y,e,f);U=Y.x;Y=Y.y;var P=mxUtils.getDocumentScrollOrigin(document);U+=P.x;Y+=P.y;Editor.inlineFullscreen||null==a.embedViewport||(Y+=a.embedViewport.y,U+=a.embedViewport.x);Q.style.left=U+"px";Q.style.top=Y+"px";Q.style.width=e+"px";Q.style.height=f+"px";!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Y+14+"px",this.dialogImg.style.left=U+e+38-w+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=g;this.container=Q;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;@@ -2019,8 +2019,8 @@ this.container.parentNode.removeChild(this.container)};var ErrorDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);w.appendChild(z)}b=document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));var C=mxUtils.button(f,function(){p&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e){this.create(a,b,e)};-PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,K=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(K=mxUtils.getScaleForPageCount(L,e,G))}var Q=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);K*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,Q-=D.y*G.height):-E=!0;E=PrintDialog.createPrintPreview(e,K,G,0,L,Q,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));+PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,J=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(J=mxUtils.getScaleForPageCount(L,e,G))}var Q=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);J*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,Q-=D.y*G.height):+E=!0;E=PrintDialog.createPrintPreview(e,J,G,0,L,Q,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));m.appendChild(p);mxEvent.addListener(p,"click",function(C){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(C)});mxEvent.addListener(g,"change",function(){k.checked=!g.checked});d.appendChild(m);h.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("posterPrint")+":");m.appendChild(p);mxEvent.addListener(p,"click",function(C){k.checked=!k.checked;g.checked=!k.checked;mxEvent.consume(C)});d.appendChild(m);var u=document.createElement("input");u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.setAttribute("size","4");u.setAttribute("disabled","disabled");u.style.width="50px";m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(u);mxUtils.write(m," "+mxResources.get("pages")+" (max)");d.appendChild(m);h.appendChild(d);mxEvent.addListener(k,"change",function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");g.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";m.appendChild(w);d.appendChild(m);h.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;@@ -2032,14 +2032,14 @@ var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrvar d=document.createElement("tr");var g=document.createElement("td");g.style.verticalAlign="top";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("paperSize")+":");d.appendChild(g);g=document.createElement("td");g.style.verticalAlign="top";g.style.fontSize="10pt";var m=PageSetupDialog.addPageFormatPanel(g,"pagesetupdialog",e.pageFormat);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");mxUtils.write(g,mxResources.get("gridSize")+":");d.appendChild(g);g=document.createElement("td");g.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();g.appendChild(p);mxEvent.addListener(p,"change",function(){var D=parseInt(p.value);p.value=Math.max(1,isNaN(D)?e.getGridSize():D)});d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");mxUtils.write(g,mxResources.get("background")+":");d.appendChild(g);g=document.createElement("td");var k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="middle";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="contain";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.height="32px";-u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,z=e.background,C=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(G,K,L,Q){K||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),w=G,C=Q);z=L;b()},w,z,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();g.appendChild(u);g.appendChild(k);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");+u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,z=e.background,C=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(G,J,L,Q){J||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),w=G,C=Q);z=L;b()},w,z,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();g.appendChild(u);g.appendChild(k);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="16px";g.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&g.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,w,m.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=C&&(D.shadowVisible=C);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});E.className="geBtn gePrimaryBtn";g.appendChild(E);a.editor.cancelFirst||g.appendChild(k);d.appendChild(g);h.appendChild(d);f.appendChild(h);this.container=f};PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var h=document.createElement("input");h.setAttribute("name",b);h.setAttribute("type","radio");h.setAttribute("value","portrait");var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="4px";g.style.borderRadius="4px";g.style.borderWidth="1px";g.style.borderStyle="solid";g.style.boxSizing="border-box";g.style.padding="2px";g.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";h.style.marginRight="6px";m.appendChild(h);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var p=document.createElement("span");p.style.width="100px";mxUtils.write(p,mxResources.get("landscape"));m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign="right";k.appendChild(w);var z=document.createElement("select");z.style.marginLeft="4px";z.style.maxWidth="78px";z.style.width="78px";for(var C=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],E=0;E<C.length;E++){var D=document.createElement("option");D.setAttribute("value",C[E].unit);mxUtils.write(D,C[E].label);z.appendChild(D)}z.value=Editor.pageSizeUnit;k.appendChild(z);m.style.display=-"none";k.style.display="none";var G={},K=PageSetupDialog.getFormats();for(E=0;E<K.length;E++)C=K[E],G[C.key]=C,D=document.createElement("option"),D.setAttribute("value",C.key),mxUtils.write(D,C.title),g.appendChild(D);var L=function(){g.value="custom";for(var N=0;N<K.length;N++){var U=K[N];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=+"none";k.style.display="none";var G={},J=PageSetupDialog.getFormats();for(E=0;E<J.length;E++)C=J[E],G[C.key]=C,D=document.createElement("option"),D.setAttribute("value",C.key),mxUtils.write(D,C.title),g.appendChild(D);var L=function(){g.value="custom";for(var N=0;N<J.length;N++){var U=J[N];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==U.format.width&&e.height==U.format.height?(g.value=U.key,h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==U.format.height&&e.height==U.format.width&&(g.value=U.key,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==g.value?(u.value=Editor.toUnit(e.width,z.value),w.value=Editor.toUnit(e.height,z.value),h.setAttribute("checked","checked"),g.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};L();a.appendChild(g);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var Q=function(N,U){N=G[g.value];null!=N.format?(u.value=Editor.toUnit(d.checked?N.format.height:N.format.width,z.value),w.value=Editor.toUnit(d.checked?N.format.width:N.format.height,z.value),k.style.display="none",m.style.display=""):(m.style.display="none",k.style.display="");N=parseFloat(u.value);if(isNaN(N)||0>=N)u.value=Editor.toUnit(e.width,z.value);N=parseFloat(w.value);if(isNaN(N)||0>=N)w.value=Editor.toUnit(e.height,z.value);N=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),z.value)));U||N.width==e.width&&N.height==e.height||(e=N,null!=f&&f(e))};mxEvent.addListener(b,"click",function(N){h.checked=!0;Q(N);mxEvent.consume(N)});@@ -2050,11 +2050,11 @@ format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",fo{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};var FilenameDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),z=document.createElement("div");z.style.width="100%";z.style.display="grid";z.style.gap="5px 8px";z.style.gridAutoColumns="auto 1fr";z.style.boxSizing="border-box";z.style.padding="3px";var C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.justifyContent="flex-end";C.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";E.style.textOverflow="ellipsis";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.fontSize="10pt";E.style.padding="2px 0";E.setAttribute("title",h||mxResources.get("filename"));mxUtils.write(E,(h||mxResources.get("filename"))+":");C.appendChild(E);z.appendChild(C);var D=document.createElement("input");D.setAttribute("value",b||"");D.style.flexGrow="1";var G=mxUtils.button(e,function(){if(null==d||d(D.value))p&&a.hideDialog(),f(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=-h||null==g)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var K=z.parentNode;if(null!=K){var L=null;mxEvent.addListener(K,"dragleave",function(Q){null!=L&&(L.style.backgroundColor="",L=null);Q.stopPropagation();Q.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=D,L.style.backgroundColor=-"#ebf2f9");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Q.dataTransfer.getData("text/uri-list")),G.click());Q.stopPropagation();Q.preventDefault()}))}}};C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.gap="4px";C.style.whiteSpace="nowrap";C.appendChild(D);z.appendChild(C);+h||null==g)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var J=z.parentNode;if(null!=J){var L=null;mxEvent.addListener(J,"dragleave",function(Q){null!=L&&(L.style.backgroundColor="",L=null);Q.stopPropagation();Q.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(Q){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=D,L.style.backgroundColor=+"#ebf2f9");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(Q){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Q.dataTransfer.getData("text/uri-list")),G.click());Q.stopPropagation();Q.preventDefault()}))}}};C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.gap="4px";C.style.whiteSpace="nowrap";C.appendChild(D);z.appendChild(C);null==h&&null!=g||null==u||null==a.editor.diagramFileTypes||(C=document.createElement("div"),C.style.display="inline-flex",C.style.alignItems="center",C.style.textOverflow="ellipsis",C.style.justifyContent="flex-end",C.style.fontSize="10pt",mxUtils.write(C,mxResources.get("type")+":"),z.appendChild(C),C=document.createElement("div"),C.style.display="inline-flex",C.style.alignItems="center",C.style.whiteSpace="nowrap",z.appendChild(C),b=FilenameDialog.createFileTypes(a,D,a.editor.diagramFileTypes),b.style.width="100%",C.appendChild(b));null!=g&&z.appendChild(g);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=u?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});C.className="geBtn";null==m||a.isOffline()||row.appendChild(a.createHelpIcon(m));-a.editor.cancelFirst&&row.appendChild(C);mxEvent.addListener(D,"keypress",function(K){13==K.keyCode&&G.click()});row.appendChild(G);a.editor.cancelFirst||row.appendChild(C);z.appendChild(row);w.appendChild(z);this.container=w};FilenameDialog.filenameHelpLink=null;+a.editor.cancelFirst&&row.appendChild(C);mxEvent.addListener(D,"keypress",function(J){13==J.keyCode&&G.click()});row.appendChild(G);a.editor.cancelFirst||row.appendChild(C);z.appendChild(row);w.appendChild(z);this.container=w};FilenameDialog.filenameHelpLink=null;FilenameDialog.createFileTypes=function(a,b,e){var f=document.createElement("select");for(a=0;a<e.length;a++){var h=document.createElement("option");h.setAttribute("value",a);mxUtils.write(h,mxResources.get(e[a].description)+" (."+e[a].extension+")");f.appendChild(h)}mxEvent.addListener(f,"change",function(d){d=e[f.value].extension;var g=b.value.lastIndexOf(".drawio.");g=0<g?g:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<g?b.value.substring(0,g+1)+d:b.value+"."+d;"createEvent"indocument?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var g=0,m=0;m<e.length;m++){var p=e[m].extension,k=null;"drawio"!=p&&(k=p,p=".drawio."+p);if(d.substring(d.length-p.length-1)=="."+p||null!=k&&d.substring(d.length-k.length-1)=="."+k){g=m;break}}f.value=g};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return f};var WrapperWindow=function(a,b,e,f,h,d,g){var m=a.createSidebarContainer();g(m);this.window=new mxWindow(b,m,e,f,h,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(p){null==p&&(p=window.event);return null!=p&&a.isSelectionAllowed(p)}))};@@ -2062,43 +2062,43 @@ var WrapperWindow=function(a,b,e,f,h,d,g){var m=a.createSidebarContainer();g(m);this.backgroundPageShape.init(g.container),p.style.position="absolute",g.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){g.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=g.tooltipHandler&&g.tooltipHandler.isHideOnHover()&&g.tooltipHandler.hide();g.isMouseDown&&!mxEvent.isConsumed(k)&&g.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=-10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,K=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*-this.scale-z+m,E)+K*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=+10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,J=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*+this.scale-z+m,E)+J*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme="none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,"1"==urlParams.transparent?k.container.style.background="transparent":!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*p;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,w=-this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,K=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(Q){if(null!=Q){for(var N=Q==this.horizontalPageBreaks?D:G,U=-0;U<=N;U++){var Y=Q==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(K),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=Q[U]?(Q[U].points=Y,Q[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),Q[U]=Y)}for(U=N;U<+this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,J=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(Q){if(null!=Q){for(var N=Q==this.horizontalPageBreaks?D:G,U=+0;U<=N;U++){var Y=Q==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(J),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=Q[U]?(Q[U].points=Y,Q[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),Q[U]=Y)}for(U=N;U<Q.length;U++)null!=Q[U]&&Q[U].destroy();Q.splice(N,Q.length-N)}});g(this.horizontalPageBreaks);g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var g=e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var z=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,w){var z=h.apply(this,arguments);null==w||w||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var w=this.graph.isCellSelected(p);u=u||w;if(w||!u&&(this.graph.isTableCell(g)||-this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var J=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Z=this.view.translate,ia=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((Z.x+V.x)*ia,(Z.y+V.y)*ia,V.width*ia,V.height*ia))}return J};h.useCssTransforms&&-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(J,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=-0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(J){for(var V=J.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(J.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(J){try{h.getModel().isEdge(J)?-p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(J,!1),Z=[],ia=[],oa;for(oa in V)Z.push(V[oa]),ia.push(oa);h.getModel().isEdge(J)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",Z,"cells",[J],"force",!0));h.getModel().isEdge(J)?p=h.pasteEdgeStyle=!0:m=!0}catch(sa){this.handleError(sa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=p=h.pasteEdgeStyle=-!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};h.addListener("cellsInserted",function(J,V){h.pasteCellStyles(h.includeDescendants(V.getProperty("cells")))});h.addListener("textInserted",function(J,V){h.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(J){null==J&&(J=window.event);return h.isEditing()||null!=J&&this.isSelectionAllowed(J)});this.container!=document.body||this.editor.chromeless&&+this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var K=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Z=this.view.translate,ia=this.view.scale;K=mxRectangle.fromRectangle(K);K.add(new mxRectangle((Z.x+V.x)*ia,(Z.y+V.y)*ia,V.width*ia,V.height*ia))}return K};h.useCssTransforms&&+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(K,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=+0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(K){for(var V=K.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(K.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(K){try{h.getModel().isEdge(K)?+p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(K,!1),Z=[],ia=[],oa;for(oa in V)Z.push(V[oa]),ia.push(oa);h.getModel().isEdge(K)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",Z,"cells",[K],"force",!0));h.getModel().isEdge(K)?p=h.pasteEdgeStyle=!0:m=!0}catch(sa){this.handleError(sa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=p=h.pasteEdgeStyle=+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};h.addListener("cellsInserted",function(K,V){h.pasteCellStyles(h.includeDescendants(V.getProperty("cells")))});h.addListener("textInserted",function(K,V){h.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(K){null==K&&(K=window.event);return h.isEditing()||null!=K&&this.isSelectionAllowed(K)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=-k),mxClient.IS_IOS&&(b=function(){var J=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{J=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(Z){}}return J}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,-"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(J){if(null!=J){var V=mxEvent.getSource(J);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return k(J)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,+k),mxClient.IS_IOS&&(b=function(){var K=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{K=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(Z){}}return K}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,+"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(K){if(null!=K){var V=mxEvent.getSource(K);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return k(K)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):h.panningHandler.usePopupTrigger=!1;h.init(this.diagramContainer);mxClient.IS_SVG&&null!=h.view.getDrawPane()&&(b=h.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=h.graphHandler){var u=h.graphHandler.start;h.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,-function(J){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(J)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(J)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(J,V){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(J){16==J.which?this.shiftDown=-!0:32!=J.which||h.isEditing()?mxEvent.isConsumed(J)||27!=J.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),h.container.style.cursor="move",h.isEditing()||mxEvent.getSource(J)!=h.container||mxEvent.consume(J))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(J){h.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=h.panningHandler.isForcePanningEvent;-h.panningHandler.isForcePanningEvent=function(J){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(J.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(J.getEvent()))&&(!mxEvent.isControlDown(J.getEvent())&&mxEvent.isRightMouseButton(J.getEvent())||mxEvent.isMiddleMouseButton(J.getEvent()))};var C=h.cellEditor.isStopEditingEvent;h.cellEditor.isStopEditingEvent=function(J){return C.apply(this,arguments)||13==J.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(J)||mxClient.IS_MAC&&-mxEvent.isMetaDown(J)||mxClient.IS_SF&&mxEvent.isShiftDown(J))};var E=h.isZoomWheelEvent;h.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=!1,G=null,K=null,L=null,Q=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=h.cellEditor.isContentEditing()){for(var J=this.toolbar.container.firstChild,V=[];null!=J;){var Z=J.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,J)&&(J.parentNode.removeChild(J),V.push(J));J=Z}J=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;-if(null==L)this.toolbar.createTextToolbar();else{for(var ia=0;ia<L.length;ia++)this.toolbar.container.appendChild(L[ia]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=K}D=h.cellEditor.isContentEditing();G=J;K=Z;L=V}}),N=h.cellEditor.startEditing;h.cellEditor.startEditing=function(){N.apply(this,arguments);Q();if(h.cellEditor.isContentEditing()){var J=!1,V=function(){J||(J=!0,window.setTimeout(function(){var Z=h.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=f.toolbar&&-(f.toolbar.setFontName(mxUtils.getCssFontFamily(Z.fontFamily)),f.toolbar.setFontSize(parseInt(Z.fontSize))));J=!1},0))};mxEvent.addListener(h.cellEditor.textarea,"input",V);mxEvent.addListener(h.cellEditor.textarea,"touchend",V);mxEvent.addListener(h.cellEditor.textarea,"mouseup",V);mxEvent.addListener(h.cellEditor.textarea,"keyup",V);V()}};var U=h.cellEditor.stopEditing;h.cellEditor.stopEditing=function(J,V){try{U.apply(this,arguments),Q()}catch(Z){f.handleError(Z)}};h.container.setAttribute("tabindex",-"0");h.container.style.cursor="default";if(window.self===window.top&&null!=h.container.parentNode)try{h.container.focus()}catch(J){}var Y=h.fireMouseEvent;h.fireMouseEvent=function(J,V,Z){try{J==mxEvent.MOUSE_DOWN&&this.container.focus(),Y.apply(this,arguments)}catch(ia){f.handleError(ia)}};var P=h.foldCells;h.foldCells=function(J,V,Z,ia,oa){try{P.apply(this,arguments)}catch(sa){f.handleError(sa)}};h.popupMenuHandler.autoExpand=!0;null!=this.menus&&(h.popupMenuHandler.factoryMethod=mxUtils.bind(this,-function(J,V,Z){this.menus.createPopupMenu(J,V,Z)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(J){h.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};h.connectionHandler.addListener(mxEvent.CONNECT,function(J,V){var Z=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(Z.push(V.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(h.view.getState(Z[Z.length--1]))},0));h.pasteCellStyles(Z)});this.addListener("styleChanged",mxUtils.bind(this,function(J,V){J=V.getProperty("force");(this.updateDefaultStyle||J)&&h.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),h.currentVertexStyle,h.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(h.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(h.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&+function(K){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(K)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(K)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(K,V){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(K){16==K.which?this.shiftDown=+!0:32!=K.which||h.isEditing()?mxEvent.isConsumed(K)||27!=K.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),h.container.style.cursor="move",h.isEditing()||mxEvent.getSource(K)!=h.container||mxEvent.consume(K))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(K){h.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=h.panningHandler.isForcePanningEvent;+h.panningHandler.isForcePanningEvent=function(K){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(K.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(K.getEvent()))&&(!mxEvent.isControlDown(K.getEvent())&&mxEvent.isRightMouseButton(K.getEvent())||mxEvent.isMiddleMouseButton(K.getEvent()))};var C=h.cellEditor.isStopEditingEvent;h.cellEditor.isStopEditingEvent=function(K){return C.apply(this,arguments)||13==K.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(K)||mxClient.IS_MAC&&+mxEvent.isMetaDown(K)||mxClient.IS_SF&&mxEvent.isShiftDown(K))};var E=h.isZoomWheelEvent;h.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=!1,G=null,J=null,L=null,Q=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=h.cellEditor.isContentEditing()){for(var K=this.toolbar.container.firstChild,V=[];null!=K;){var Z=K.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,K)&&(K.parentNode.removeChild(K),V.push(K));K=Z}K=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;+if(null==L)this.toolbar.createTextToolbar();else{for(var ia=0;ia<L.length;ia++)this.toolbar.container.appendChild(L[ia]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=J}D=h.cellEditor.isContentEditing();G=K;J=Z;L=V}}),N=h.cellEditor.startEditing;h.cellEditor.startEditing=function(){N.apply(this,arguments);Q();if(h.cellEditor.isContentEditing()){var K=!1,V=function(){K||(K=!0,window.setTimeout(function(){var Z=h.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=f.toolbar&&+(f.toolbar.setFontName(mxUtils.getCssFontFamily(Z.fontFamily)),f.toolbar.setFontSize(parseInt(Z.fontSize))));K=!1},0))};mxEvent.addListener(h.cellEditor.textarea,"input",V);mxEvent.addListener(h.cellEditor.textarea,"touchend",V);mxEvent.addListener(h.cellEditor.textarea,"mouseup",V);mxEvent.addListener(h.cellEditor.textarea,"keyup",V);V()}};var U=h.cellEditor.stopEditing;h.cellEditor.stopEditing=function(K,V){try{U.apply(this,arguments),Q()}catch(Z){f.handleError(Z)}};h.container.setAttribute("tabindex",+"0");h.container.style.cursor="default";if(window.self===window.top&&null!=h.container.parentNode)try{h.container.focus()}catch(K){}var Y=h.fireMouseEvent;h.fireMouseEvent=function(K,V,Z){try{K==mxEvent.MOUSE_DOWN&&this.container.focus(),Y.apply(this,arguments)}catch(ia){f.handleError(ia)}};var P=h.foldCells;h.foldCells=function(K,V,Z,ia,oa){try{P.apply(this,arguments)}catch(sa){f.handleError(sa)}};h.popupMenuHandler.autoExpand=!0;null!=this.menus&&(h.popupMenuHandler.factoryMethod=mxUtils.bind(this,+function(K,V,Z){this.menus.createPopupMenu(K,V,Z)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(K){h.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};h.connectionHandler.addListener(mxEvent.CONNECT,function(K,V){var Z=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(Z.push(V.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(h.view.getState(Z[Z.length-+1]))},0));h.pasteCellStyles(Z)});this.addListener("styleChanged",mxUtils.bind(this,function(K,V){K=V.getProperty("force");(this.updateDefaultStyle||K)&&h.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),h.currentVertexStyle,h.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(h.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(h.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(V=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="orthogonalEdgeStyle"==h.currentEdgeStyle.edgeStyle&&"1"==h.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==h.currentEdgeStyle.edgeStyle||"none"==h.currentEdgeStyle.edgeStyle||null==h.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==h.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(V=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="link"==h.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==h.currentEdgeStyle.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&-(a=mxUtils.bind(this,function(){var J=h.currentVertexStyle.fontFamily||"Helvetica",V=String(h.currentVertexStyle.fontSize||"12"),Z=h.getView().getState(h.getSelectionCell());null!=Z&&(J=Z.style[mxConstants.STYLE_FONTFAMILY]||J,V=Z.style[mxConstants.STYLE_FONTSIZE]||V,10<J.length&&(J=J.substring(0,8)+"..."));this.toolbar.setFontName(J);this.toolbar.setFontSize(V)}),h.getSelectionModel().addListener(mxEvent.CHANGE,a),h.getModel().addListener(mxEvent.CHANGE,a));h.addListener(mxEvent.CELLS_ADDED,function(J,-V){J=V.getProperty("cells");V=V.getProperty("parent");null!=V&&h.getModel().isLayer(V)&&!h.isCellVisible(V)&&null!=J&&0<J.length&&h.getModel().setVisible(V,!0)});Graph.selectParentLayer&&h.selectionModel.addListener(mxEvent.CHANGE,function(){if(h.isEnabled()&&!h.isSelectionEmpty()){var J=h.getLayerForCells(h.getSelectionCells());null!=J&&h.setDefaultParent(J)}});this.gestureHandler=mxUtils.bind(this,function(J){null!=this.currentMenu&&mxEvent.getSource(J)!=this.currentMenu.div&&this.hideCurrentMenu()});+(a=mxUtils.bind(this,function(){var K=h.currentVertexStyle.fontFamily||"Helvetica",V=String(h.currentVertexStyle.fontSize||"12"),Z=h.getView().getState(h.getSelectionCell());null!=Z&&(K=Z.style[mxConstants.STYLE_FONTFAMILY]||K,V=Z.style[mxConstants.STYLE_FONTSIZE]||V,10<K.length&&(K=K.substring(0,8)+"..."));this.toolbar.setFontName(K);this.toolbar.setFontSize(V)}),h.getSelectionModel().addListener(mxEvent.CHANGE,a),h.getModel().addListener(mxEvent.CHANGE,a));h.addListener(mxEvent.CELLS_ADDED,function(K,+V){K=V.getProperty("cells");V=V.getProperty("parent");null!=V&&h.getModel().isLayer(V)&&!h.isCellVisible(V)&&null!=K&&0<K.length&&h.getModel().setVisible(V,!0)});Graph.selectParentLayer&&h.selectionModel.addListener(mxEvent.CHANGE,function(){if(h.isEnabled()&&!h.isSelectionEmpty()){var K=h.getLayerForCells(h.getSelectionCells());null!=K&&h.setDefaultParent(K)}});this.gestureHandler=mxUtils.bind(this,function(K){null!=this.currentMenu&&mxEvent.getSource(K)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var T=null;this.resizeHandler=mxUtils.bind(this,function(){null!=T&&window.clearTimeout(T);T=window.setTimeout(mxUtils.bind(this,function(){T=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));h.addListener("gridSizeChanged",mxUtils.bind(this,function(){h.isGridEnabled()&&h.view.validateBackground()}));this.editor.resetGraph()}this.init();h.standalone||this.open()};EditorUi.compactUi=!0;@@ -2124,14 +2124,14 @@ EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.popupMenuHandler.isMenuShowing=function(){return f.apply(this,arguments)||null!=b.shapePicker||null!=b.currentMenu};var h=a.dblClick;a.dblClick=function(p,k){if(this.isEnabled())if(null!=k||null==b.sidebar||mxEvent.isShiftDown(p)||a.isCellLocked(a.getDefaultParent()))h.apply(this,arguments);else{var u=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));mxEvent.consume(p);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.x,u.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var g=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?g.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(z,C,E){var D=a.getCompositeParent(p.cell);z=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=z&&z.relative;)cell=D,D=a.model.getParent(cell),z=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(G){E(G);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(G))}),k)}),30)}),mxUtils.bind(this,function(z){this.graph.selectCellsForConnectVertex(z,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=-k.getProperty("arrow"),w=k.getProperty("direction"),z=k.getProperty("event");u=u.getBoundingClientRect();var C=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-C.x;C=a.container.scrollTop+u.y-C.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=b.showShapePicker(E,C,D,mxUtils.bind(this,function(K){null!=K&&a.connectVertex(D,w,a.defaultEdgeLength,z,!0,!1,function(L,Q,N){N(K);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(K))},+k.getProperty("arrow"),w=k.getProperty("direction"),z=k.getProperty("event");u=u.getBoundingClientRect();var C=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-C.x;C=a.container.scrollTop+u.y-C.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=b.showShapePicker(E,C,D,mxUtils.bind(this,function(J){null!=J&&a.connectVertex(D,w,a.defaultEdgeLength,z,!0,!1,function(L,Q,N){N(J);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(J))},function(L){a.selectCellsForConnectVertex(L)},z,this.hoverIcons)}),w,!0);null!=G&&(this.centerShapePicker(G,u,E,C,w),mxUtils.setOpacity(G,30),mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)}),mxEvent.addListener(G,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};EditorUi.prototype.centerShapePicker=function(a,b,e,f,h){if(h==mxConstants.DIRECTION_EAST||h==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();h==mxConstants.DIRECTION_NORTH?(e-=d.width/2-10,f-=d.height+6):h==mxConstants.DIRECTION_SOUTH?(e-=d.width/2-10,f+=b.height+6):h==mxConstants.DIRECTION_WEST?(e-=d.width+6,f-=d.height/2-10):h==mxConstants.DIRECTION_EAST&&(e+=b.width+6,f-=d.height/2-10);a.style.left=e+"px";a.style.top=f+"px"};EditorUi.prototype.showShapePicker=function(a,b,e,f,h,d,g,m,p){var k=null;this.editor.graph.freehand.isDrawing()||(m=m||null==e,k=this.createShapePicker(a,b,e,f,h,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,d,m),d,g,m,p),null!=k&&(null==this.hoverIcons||d||this.hoverIcons.reset(),a=this.editor.graph,a.popupMenuHandler.hideMenu(),a.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=f,this.shapePicker=k));return k};-EditorUi.prototype.createShapePicker=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,z=null;p=null!=p?p:function(D){D=D[0];var G=0,K=0,L=D.geometry;null!=L&&(w.model.isEdge(D)&&(D=L.getTerminalPoint(!1),L=new mxRectangle(0,0,D.x,D.y)),G=L.width/2,K=L.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-G),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-K))};if(null!=g&&0<g.length){var C=this;w=this.editor.graph;z=document.createElement("div");+EditorUi.prototype.createShapePicker=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,z=null;p=null!=p?p:function(D){D=D[0];var G=0,J=0,L=D.geometry;null!=L&&(w.model.isEdge(D)&&(D=L.getTerminalPoint(!1),L=new mxRectangle(0,0,D.x,D.y)),G=L.width/2,J=L.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-G),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-J))};if(null!=g&&0<g.length){var C=this;w=this.editor.graph;z=document.createElement("div");h=w.view.getState(e);var E=null==e||null!=h&&w.isTransparentState(h)?null:w.copyStyle(e);h=6>g.length?35*g.length:140;z.className="geToolbarContainer geSidebarContainer geShapePicker";z.setAttribute("title",mxResources.get("sidebarTooltip"));z.style.left=Math.round(a)+"px";z.style.top=Math.round(b)+"px";z.style.width=h+"px";mxClient.IS_POINTER&&(z.style.touchAction="none");m||mxUtils.setPrefixedStyle(z.style,"transform","translate(-22px,-22px)");w.container.appendChild(z);h=mxUtils.bind(this,function(D){var G=-document.createElement("a");G.className="geToolbarButton";G.style.display="inline-block";G.style.position="relative";G.style.overflow="hidden";G.style.cursor="pointer";G.style.width="30px";G.style.height="30px";G.style.padding="1px";z.appendChild(G);null!=E&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var K=D.geometry;w.model.isEdge(D)&&(K=K.getTerminalPoint(!1),K=new mxRectangle(0,0,K.x,K.y));null!=K&&-G.appendChild(this.sidebar.createVertexTemplateFromCells([D],K.width,K.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isShiftDown(L)||null==e&&w.isSelectionEmpty()){var Q=w.cloneCell(D);if(null!=f)f(Q);else{var N=p([Q]);w.model.isEdge(Q)?Q.geometry.translate(N.x,N.y):(Q.geometry.x=N.x,Q.geometry.y=N.y);w.model.beginUpdate();try{w.addCell(Q),w.model.isVertex(Q)&&w.isAutoSizeCell(Q)&&w.updateCellSize(Q)}finally{w.model.endUpdate()}w.setSelectionCell(Q);w.scrollCellToVisible(Q);u&&+document.createElement("a");G.className="geToolbarButton";G.style.display="inline-block";G.style.position="relative";G.style.overflow="hidden";G.style.cursor="pointer";G.style.width="30px";G.style.height="30px";G.style.padding="1px";z.appendChild(G);null!=E&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var J=D.geometry;w.model.isEdge(D)&&(J=J.getTerminalPoint(!1),J=new mxRectangle(0,0,J.x,J.y));null!=J&&+G.appendChild(this.sidebar.createVertexTemplateFromCells([D],J.width,J.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isShiftDown(L)||null==e&&w.isSelectionEmpty()){var Q=w.cloneCell(D);if(null!=f)f(Q);else{var N=p([Q]);w.model.isEdge(Q)?Q.geometry.translate(N.x,N.y):(Q.geometry.x=N.x,Q.geometry.y=N.y);w.model.beginUpdate();try{w.addCell(Q),w.model.isVertex(Q)&&w.isAutoSizeCell(Q)&&w.updateCellSize(Q)}finally{w.model.endUpdate()}w.setSelectionCell(Q);w.scrollCellToVisible(Q);u&&w.startEditing(Q);null!=C.hoverIcons&&C.hoverIcons.update(w.view.getState(Q))}}else Q=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(D,Q);null!=d&&d(L);mxEvent.consume(L)}),25,25,null,null,e))});for(k=0;k<(m?Math.min(g.length,4):g.length);k++)h(g[k]);g=z.offsetTop+z.clientHeight-(w.container.scrollTop+w.container.offsetHeight);0<g&&(z.style.top=Math.max(w.container.scrollTop+22,b-g)+"px");g=z.offsetLeft+z.clientWidth-(w.container.scrollLeft+w.container.offsetWidth);0<g&&(z.style.left=Math.max(w.container.scrollLeft+22,a-g)+"px")}return z};EditorUi.prototype.getCellsForShapePicker=function(a,b,e){var f=this.editor.graph,h=mxUtils.bind(this,function(d,g,m,p){return f.createVertex(null,null,p||"",0,0,g||120,m||60,d,!1)});b=mxUtils.bind(this,function(d,g,m){d=new mxCell(m||"",new mxGeometry(0,0,f.defaultEdgeLength+20,0),d);d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,null!=g?g:0),!1);d.geometry.points=null!=g?[new mxPoint(d.geometry.width/2,g)]:[];d.geometry.relative=!0;d.edge=@@ -2168,18 +2168,18 @@ p.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.m(u.style.display="none",p.style.display="none",k.style.display="none");w()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(H){var ea=new mxPopupMenu(C.funct);ea.div.className+=" geMenubarMenu";ea.smartSeparators=!0;ea.showDisabled=!0;ea.autoExpand=!0;ea.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(ea,arguments);ea.destroy()});var ra=mxUtils.getOffset(k);ea.popup(ra.x,ra.y+k.offsetHeight,null,H);mxEvent.addListener(ea.div,"mouseleave",mxUtils.bind(this,function(){ea.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(H)}),Editor.zoomFitImage,mxResources.get("fit"));var E=null,D=null,G=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);E=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);E=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),-600)}),H||200)}),K=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&+600)}),H||200)}),J=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ea=L.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=ea.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));ea=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=ea.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){L.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(H){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var N=this.lightboxToolbarActions[z];N.elem=d(N.fn,N.icon,N.tooltip)}if(null!=h.refreshBtn){var U=null==h.refreshBtn.url?null:Graph.sanitizeLink(h.refreshBtn.url);d(mxUtils.bind(this,function(H){null!=U?window.location.href=U:window.location.reload();mxEvent.consume(H)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=h.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(H){h.fullscreenBtn.url?a.openLink(h.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(H)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!h.noCloseBtn&&(h.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,function(H){"1"==urlParams.close||h.closeBtn?window.close():(this.destroy(),mxEvent.consume(H))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||-(mxEvent.isShiftDown(H)||K(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?G():K(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?G():K(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||K(30)}));var Y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,ea){this.startX=ea.getGraphX();this.startY=ea.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,ea){},mouseUp:function(H,ea){mxEvent.isTouchEvent(ea.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Y&&Math.abs(this.scrollTop-a.container.scrollTop)<-Y&&Math.abs(this.startX-ea.getGraphX())<Y&&Math.abs(this.startY-ea.getGraphY())<Y&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():K(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate,T=new mxPoint,J=!1,V=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&V!=e.currentPage){V=e.currentPage;J=!0;var H=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==+(mxEvent.isShiftDown(H)||J(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?G():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?G():J(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,+"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||J(30)}));var Y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,ea){this.startX=ea.getGraphX();this.startY=ea.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,ea){},mouseUp:function(H,ea){mxEvent.isTouchEvent(ea.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Y&&Math.abs(this.scrollTop-a.container.scrollTop)<+Y&&Math.abs(this.startX-ea.getGraphX())<Y&&Math.abs(this.startY-ea.getGraphY())<Y&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate,T=new mxPoint,K=!1,V=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&V!=e.currentPage){V=e.currentPage;K=!0;var H=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==H&&(H=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));H=a.getPageLayout(H,T,1);var ea=a.getDefaultTranslate(H);this.x0=H.x;this.y0=H.y;if(ea.x!=this.translate.x||ea.y!=this.translate.y)this.invalidate(),this.translate.x=ea.x,this.translate.y=ea.y}ea=a.getPagePadding();var ra=a.getPageSize();H=ea.x-(this.x0||0)*ra.width;ea=ea.y-(this.y0||0)*ra.height;if(this.translate.x!=H||this.translate.y!=ea)this.invalidate(),this.translate.x=H,this.translate.y=ea}P.apply(this,-arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){var H=J;J=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var ea=this.getPageLayout(),ra=this.getDefaultTranslate(ea),qa=this.view.translate.x,Pa=this.view.translate.y;if(ra.x!=qa||ra.y!=Pa){this.view.x0=ea.x;this.view.y0=ea.y;this.autoTranslate=!0;this.view.setTranslate(ra.x,ra.y);this.autoTranslate=!1;H||(this.container.scrollLeft+=Math.round((ra.x-qa)*+arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){var H=K;K=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var ea=this.getPageLayout(),ra=this.getDefaultTranslate(ea),qa=this.view.translate.x,Pa=this.view.translate.y;if(ra.x!=qa||ra.y!=Pa){this.view.x0=ea.x;this.view.y0=ea.y;this.autoTranslate=!0;this.view.setTranslate(ra.x,ra.y);this.autoTranslate=!1;H||(this.container.scrollLeft+=Math.round((ra.x-qa)*this.view.scale),this.container.scrollTop+=Math.round((ra.y-Pa)*this.view.scale));return}}Z.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ia=a.view.getBackgroundPane(),oa=a.view.getDrawPane();a.cumulativeZoomFactor=1;var sa=null,O=null,X=null,ba=null,da=null,ca=function(H){null!=sa&&window.clearTimeout(sa);0<=H&&window.setTimeout(function(){if(!a.isMouseDown||ba)sa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),oa.style.transformOrigin="",ia.style.transformOrigin="",mxClient.IS_SF?(oa.style.transform="scale(1)",ia.style.transform="scale(1)",window.setTimeout(function(){oa.style.transform="";ia.style.transform=""},0)):(oa.style.transform="",ia.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ea=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ra=mxUtils.getOffset(a.container),qa=a.view.scale,Pa=0,ma=0;null!=O&&(Pa=a.container.offsetWidth/2-O.x+ra.x,ma=a.container.offsetHeight/2-O.y+ra.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=qa&&(null!=X&&(Pa+=ea.x-X.x,ma+=ea.y-X.y),null!=b&&e.chromelessResize(!1,null,Pa*(a.cumulativeZoomFactor-1),ma*(a.cumulativeZoomFactor-@@ -2279,8 +2279,8 @@ EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bEditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};EditorUi.prototype.createKeyHandler=function(a){function b(w,z,C){if(!f.isSelectionEmpty()&&f.isEnabled()){z=null!=z?z:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(C){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var G=f.getCellGeometry(E[D]);null!=G&&(G=G.clone(),37==w?G.width=Math.max(0,G.width-z):38==w?G.height=Math.max(0,G.height-z):39==w?G.width+=z:40==w&&(G.height+=z),f.getModel().setGeometry(E[D],-G))}}finally{f.getModel().endUpdate()}}else{G=f.model.getParent(D);var K=f.getView().scale;C=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(C=f.layoutManager.getLayout(G));if(null!=C&&C.constructor==mxStackLayout)z=G.getIndex(D),37==w||38==w?f.model.add(G,D,Math.max(0,z-1)):(39==w||40==w)&&f.model.add(G,D,Math.min(f.model.getChildCount(G),z+1));else{var L=f.graphHandler;null!=L&&(null==L.first&&L.start(D,0,0,f.getMovableCells(E)),null!=L.first&&(D=-E=0,37==w?E=-z:38==w?D=-z:39==w?E=z:40==w&&(D=z),L.currentDx+=E*K,L.currentDy+=D*K,L.checkPreview(),L.updatePreview()),null!=g&&window.clearTimeout(g),g=window.setTimeout(function(){if(null!=L.first){var Q=L.roundLength(L.currentDx/K),N=L.roundLength(L.currentDy/K);L.moveCells(L.cells,Q,N);L.reset()}},400))}}}}var e=this,f=this.editor.graph,h=new mxKeyHandler(f),d=h.isEventIgnored;h.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||+G))}}finally{f.getModel().endUpdate()}}else{G=f.model.getParent(D);var J=f.getView().scale;C=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(C=f.layoutManager.getLayout(G));if(null!=C&&C.constructor==mxStackLayout)z=G.getIndex(D),37==w||38==w?f.model.add(G,D,Math.max(0,z-1)):(39==w||40==w)&&f.model.add(G,D,Math.min(f.model.getChildCount(G),z+1));else{var L=f.graphHandler;null!=L&&(null==L.first&&L.start(D,0,0,f.getMovableCells(E)),null!=L.first&&(D=+E=0,37==w?E=-z:38==w?D=-z:39==w?E=z:40==w&&(D=z),L.currentDx+=E*J,L.currentDy+=D*J,L.checkPreview(),L.updatePreview()),null!=g&&window.clearTimeout(g),g=window.setTimeout(function(){if(null!=L.first){var Q=L.roundLength(L.currentDx/J),N=L.roundLength(L.currentDy/J);L.moveCells(L.cells,Q,N);L.reset()}},400))}}}}var e=this,f=this.editor.graph,h=new mxKeyHandler(f),d=h.isEventIgnored;h.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||90!=w.keyCode&&89!=w.keyCode&&188!=w.keyCode&&190!=w.keyCode&&85!=w.keyCode&&83!=w.keyCode)&&(66!=w.keyCode&&73!=w.keyCode||!this.isControlDown(w)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=w.keyCode&&107!=w.keyCode||!this.isControlDown(w)&&!mxEvent.isShiftDown(w)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};h.isEnabledForEvent=function(w){return!mxEvent.isConsumed(w)&&this.isGraphEvent(w)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};h.isControlDown=function(w){return mxEvent.isControlDown(w)||mxClient.IS_MAC&&w.metaKey};var g=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=h.getFunction;mxKeyHandler.prototype.getFunction=function(w){if(f.isEnabled()){var z=null;mxEvent.isShiftDown(w)&&this.isControlDown(w)&&mxEvent.isAltDown(w)?z=e.actions.get(e.ctrlAltShiftActions[w.keyCode]):mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)?z=e.actions.get(e.altShiftActions[w.keyCode]):this.isControlDown(w)&&mxEvent.isAltDown(w)&&(z=e.actions.get(e.ctrlAltActions[w.keyCode]));if(null!=z)return z.funct;if(null!=m[w.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(w)&&mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)){if(f.model.isVertex(f.getSelectionCell()))return function(){var C=f.connectVertex(f.getSelectionCell(),m[w.keyCode],f.defaultEdgeLength,w,!0);null!=C&&0<C.length&&(1==C.length&&f.model.isEdge(C[0])?f.setSelectionCell(f.model.getTerminal(C[0],@@ -2337,13 +2337,13 @@ Sidebar.prototype.searchEntries=function(a,b,e,f,h,d){if(null!=this.taglist&&nuld)&&(m.push(C),k==g.length-1&&m.length==h))){f(m.slice(e*b,h),h,!0,g);return}}}else m=[];a=u;p++}}d=m.length;f(m.slice(e*b,(e+1)*b),d,!1,g)}else f([],null,null,g)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],e={},f=0;f<a.length;f++)null==e[a[f]]&&(e[a[f]]="1",b.push(a[f]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,e){};Sidebar.prototype.addSearchPalette=function(a){function b(){g.setAttribute("src",Editor.magnifyImage);g.setAttribute("title",mxResources.get("search"));p.style.display="none";k=d.value="";D()}var e=document.createElement("div");e.style.visibility="hidden";this.appendChild(e);var f=document.createElement("div");f.className="geSidebar geSearchSidebar";a||(f.style.display="none");var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.textOverflow="clip";h.style.paddingBottom="8px";h.style.cursor="default";var d=document.createElement("input");d.setAttribute("placeholder",mxResources.get("searchShapes"));d.setAttribute("type","text");h.appendChild(d);var g=document.createElement("img");g.setAttribute("src",Editor.magnifyImage);g.setAttribute("title",mxResources.get("search"));g.className="geAdaptiveAsset";g.style.position="relative";g.style.cursor="pointer";g.style.opacity="0.5";g.style.height="16px";g.style.left="-20px";g.style.top="4px";g.style.background="url('"+this.editorUi.editor.transparentImage+-"')";h.appendChild(g);f.appendChild(h);var m=document.createElement("center"),p=mxUtils.button(mxResources.get("moreResults"),function(){G()});p.style.display="none";p.style.lineHeight="normal";p.style.fontSize="12px";p.style.padding="6px 12px 6px 12px";p.style.marginTop="4px";p.style.marginBottom="8px";m.style.paddingTop="4px";m.style.paddingBottom="4px";m.appendChild(p);f.appendChild(m);var k="",u=!1,w=!1,z=0,C={},E=12,D=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var K=f.firstChild;null!=-K;){var L=K.nextSibling;K!=h&&K!=m&&K.parentNode.removeChild(K);K=L}});mxEvent.addListener(g,"click",function(){g.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){E=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(D(),k=d.value,C={},w=!1,z=0),!u&&!w)){p.setAttribute("disabled","true");p.style.display="";p.style.cursor="wait";p.innerHTML=mxResources.get("loading")+-"...";u=!0;var K={};this.currentSearch=K;try{this.searchEntries(k,E,z,mxUtils.bind(this,function(L,Q,N,U){if(this.currentSearch==K){L=null!=L?L:[];u=!1;z++;this.insertSearchHint(f,k,E,z,L,Q,N,U);0==L.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(Q=0;Q<L.length;Q++)mxUtils.bind(this,function(Y){try{var P=Y();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(Y,!1)&&(P.style.opacity=this.closedLibraryOpacity);null==C[P.innerHTML]?(C[P.innerHTML]=-null!=Y.parentLibraries?Y.parentLibraries.slice():[],f.appendChild(P)):null!=Y.parentLibraries&&(C[P.innerHTML]=C[P.innerHTML].concat(Y.parentLibraries));mxEvent.addGestureListeners(P,null,null,mxUtils.bind(this,function(T){var J=C[P.innerHTML];mxEvent.isPopupTrigger(T)&&this.showPopupMenuForEntry(P,J,T)}));mxEvent.disableContextMenu(P)}catch(T){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(T.stack)):console.error(T))}})(L[Q]);N?(p.removeAttribute("disabled"),-p.innerHTML=mxResources.get("moreResults")):(p.innerHTML=mxResources.get("reset"),p.style.display="none",w=!0);p.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){p.style.cursor=""}),this.searchClosedLibraries)}catch(L){this.editorUi.handleError(L)}}}else D(),k=d.value="",C={},p.style.display="none",w=!1,d.focus()});this.searchShapes=function(K){d.value=K;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(K){13==K.keyCode?(G(),mxEvent.consume(K)):27==K.keyCode&&b()}));+"')";h.appendChild(g);f.appendChild(h);var m=document.createElement("center"),p=mxUtils.button(mxResources.get("moreResults"),function(){G()});p.style.display="none";p.style.lineHeight="normal";p.style.fontSize="12px";p.style.padding="6px 12px 6px 12px";p.style.marginTop="4px";p.style.marginBottom="8px";m.style.paddingTop="4px";m.style.paddingBottom="4px";m.appendChild(p);f.appendChild(m);var k="",u=!1,w=!1,z=0,C={},E=12,D=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var J=f.firstChild;null!=+J;){var L=J.nextSibling;J!=h&&J!=m&&J.parentNode.removeChild(J);J=L}});mxEvent.addListener(g,"click",function(){g.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){E=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(D(),k=d.value,C={},w=!1,z=0),!u&&!w)){p.setAttribute("disabled","true");p.style.display="";p.style.cursor="wait";p.innerHTML=mxResources.get("loading")++"...";u=!0;var J={};this.currentSearch=J;try{this.searchEntries(k,E,z,mxUtils.bind(this,function(L,Q,N,U){if(this.currentSearch==J){L=null!=L?L:[];u=!1;z++;this.insertSearchHint(f,k,E,z,L,Q,N,U);0==L.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(Q=0;Q<L.length;Q++)mxUtils.bind(this,function(Y){try{var P=Y();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(Y,!1)&&(P.style.opacity=this.closedLibraryOpacity);null==C[P.innerHTML]?(C[P.innerHTML]=+null!=Y.parentLibraries?Y.parentLibraries.slice():[],f.appendChild(P)):null!=Y.parentLibraries&&(C[P.innerHTML]=C[P.innerHTML].concat(Y.parentLibraries));mxEvent.addGestureListeners(P,null,null,mxUtils.bind(this,function(T){var K=C[P.innerHTML];mxEvent.isPopupTrigger(T)&&this.showPopupMenuForEntry(P,K,T)}));mxEvent.disableContextMenu(P)}catch(T){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(T.stack)):console.error(T))}})(L[Q]);N?(p.removeAttribute("disabled"),+p.innerHTML=mxResources.get("moreResults")):(p.innerHTML=mxResources.get("reset"),p.style.display="none",w=!0);p.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){p.style.cursor=""}),this.searchClosedLibraries)}catch(L){this.editorUi.handleError(L)}}}else D(),k=d.value="",C={},p.style.display="none",w=!1,d.focus()});this.searchShapes=function(J){d.value=J;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(J){13==J.keyCode?(G(),mxEvent.consume(J)):27==J.keyCode&&b()}));a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==d.value?(g.setAttribute("src",Editor.magnifyImage),g.setAttribute("title",mxResources.get("search"))):(g.setAttribute("src",Editor.crossImage),g.setAttribute("title",mxResources.get("reset")));""==d.value?(w=!0,p.style.display="none"):d.value!=k?(p.style.display="none",w=!1):u||(p.style.display=w?"none":"")}),0)});mxEvent.addListener(d,"keyup",a);mxEvent.addListener(d,"paste",a);mxEvent.addListener(d,"cut",a);mxEvent.addListener(d,-"mousedown",function(K){K.stopPropagation&&K.stopPropagation();K.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(K){K.stopPropagation&&K.stopPropagation();K.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};+"mousedown",function(J){J.stopPropagation&&J.stopPropagation();J.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(J){J.stopPropagation&&J.stopPropagation();J.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};Sidebar.prototype.insertSearchHint=function(a,b,e,f,h,d,g,m){0==h.length&&1==f&&(e=document.createElement("div"),e.className="geTitle",e.style.cssText="background-color:transparent;border-color:transparent;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important;font-size:11px;font-weight:normal;",mxUtils.write(e,mxResources.get("noResultsFor",[b])),a.appendChild(e))};Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this.editorUi.editor.graph,e=this,f=parseInt(this.initialDefaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var h=b.appendFontSize("edgeLabel;resizable=0;html=1;",b.edgeFontSize),d=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;"+f);d.vertex=!0;b=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry(b.appendFontSize("text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",b.vertexFontSize),60,30,"Text","Text",null,null,"text textbox textarea label"),this.createVertexTemplateEntry("text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;",@@ -2454,18 +2454,18 @@ a.height))/100,this.graph.view.scaleAndTranslate(k,(b-a.width*k)/2/k-a.x,(e-a.hek.style.overflow=null!=w?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=h&&0!=g&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,h),f.appendChild(b));return a};Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};-Sidebar.prototype.createItem=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a");E.className="geItem";E.style.overflow="hidden";var D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";E.style.padding=this.thumbPadding+"px";mxEvent.addListener(E,"click",function(K){mxEvent.consume(K)});var G=new mxRectangle(0,0,h,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),+Sidebar.prototype.createItem=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a");E.className="geItem";E.style.overflow="hidden";var D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";E.style.padding=this.thumbPadding+"px";mxEvent.addListener(E,"click",function(J){mxEvent.consume(J)});var G=new mxRectangle(0,0,h,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),null!=w?(E.style.backgroundImage="url("+w+")",E.style.backgroundRepeat="no-repeat",E.style.backgroundPosition="center",E.style.backgroundSize="24px 24px"):this.createThumb(D,k,u,E,b,e,f,h,d),1<a.length||a[0].vertex?(f=this.createDragSource(E,this.createDropHandler(a,!0,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p,z),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):-null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(K){mxEvent.isMouseEvent(K)&&this.showTooltip(E,a,G.width,G.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};+null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(J){mxEvent.isMouseEvent(J)&&this.showTooltip(E,a,G.width,G.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};Sidebar.prototype.createDropHandler=function(a,b,e,f,h,d){e=null!=e?e:!0;return mxUtils.bind(this,function(g,m,p,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();w=null==p||mxEvent.isAltDown(m)?!1:g.isValidDropTarget(p,a,m);var z=null;null==p||w||(p=null);if(!g.isCellLocked(p||-g.getDefaultParent())){g.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&g.isSplitTarget(p,a,m)){var C=g.view.scale,E=g.view.translate,D=(k+E.x)*C,G=(u+E.y)*C,K=g.cloneCells(a);g.splitEdge(p,K,null,k-f.width/2,u-f.height/2,D,G);z=K}else if(0<a.length&&(z=g.importCells(a,k,u,p),g.model.isVertex(d)&&1==z.length&&g.model.isVertex(z[0]))){var L=g.insertEdge(g.model.getParent(d),null,"",d,z[0],g.createCurrentEdgeStyle());g.applyNewEdgeStyle(d,[L]);z.push(L);g.connectionHandler.insertBeforeSource&&+g.getDefaultParent())){g.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&g.isSplitTarget(p,a,m)){var C=g.view.scale,E=g.view.translate,D=(k+E.x)*C,G=(u+E.y)*C,J=g.cloneCells(a);g.splitEdge(p,J,null,k-f.width/2,u-f.height/2,D,G);z=J}else if(0<a.length&&(z=g.importCells(a,k,u,p),g.model.isVertex(d)&&1==z.length&&g.model.isVertex(z[0]))){var L=g.insertEdge(g.model.getParent(d),null,"",d,z[0],g.createCurrentEdgeStyle());g.applyNewEdgeStyle(d,[L]);z.push(L);g.connectionHandler.insertBeforeSource&&g.insertEdgeBeforeCell(L,d)}if(null!=g.layoutManager){var Q=g.layoutManager.getLayout(p);if(null!=Q){C=g.view.scale;E=g.view.translate;D=(k+E.x)*C;G=(u+E.y)*C;for(var N=0;N<z.length;N++)Q.moveCell(z[N],D,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||g.fireEvent(new mxEventObject("cellsInserted","cells",z));for(N=0;N<z.length;N++)g.model.isVertex(z[N])&&g.isAutoSizeCell(z[N])&&g.updateCellSize(z[N])}catch(U){this.editorUi.handleError(U)}finally{g.model.endUpdate()}null!=z&&0<z.length&&(g.scrollCellToVisible(z[0]),g.setSelectionCells(z));(h||g.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=z&&1==z.length)&&window.setTimeout(function(){g.startEditing(z[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};-Sidebar.prototype.dropAndConnect=function(a,b,e,f,h,d,g){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:g;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(C);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=D=0;if(null!=k){var K=k.origin;D=K.x;-G=K.y}var L=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),Q=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(J,V,Z){return!m.isContainer(J.cell)});if(null!=Q&&Q!=C)k=m.view.getState(Q),null!=k&&(K=k.origin,C=Q,L=!0,m.model.isEdge(a)||(p.x-=K.x-D,p.y-=K.y-G));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=G;D=z.x;G=z.y;m.model.isEdge(b[f])&&(G=D=0);k=b=m.importCells(b,p.x-(L?D:0),p.y-(L?+Sidebar.prototype.dropAndConnect=function(a,b,e,f,h,d,g){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:g;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(C);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=D=0;if(null!=k){var J=k.origin;D=J.x;+G=J.y}var L=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),Q=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(K,V,Z){return!m.isContainer(K.cell)});if(null!=Q&&Q!=C)k=m.view.getState(Q),null!=k&&(J=k.origin,C=Q,L=!0,m.model.isEdge(a)||(p.x-=J.x-D,p.y-=J.y-G));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=G;D=z.x;G=z.y;m.model.isEdge(b[f])&&(G=D=0);k=b=m.importCells(b,p.x-(L?D:0),p.y-(L?G:0),L?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=g&&null!=d&&(m.model.remove(b[g]),m.updateShapes(b[g],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var N=m.getCellGeometry(b[f]),U=null!=N?N.getTerminalPoint(!0):null;N.points=null;if(null!=U)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var Y=m.getCellGeometry(b[e]),P=null!=Y?Y.getTerminalPoint(!0):null;null!=P&&P.x==U.x&&P.y==U.y&&m.model.setTerminal(b[e],a,-!0)}if(null!=N.getTerminalPoint(!1))N.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(L&&m.model.isVertex(C)){var T=m.view.getState(C);K=T.cell!=m.view.currentRoot?T.origin:new mxPoint(0,0);m.cellsMoved(b,K.x,K.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),D=p.x-Math.round(z.x),G=p.y-Math.round(z.y),p.x=Math.round(z.x),p.y=Math.round(z.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=g?m.model.setTerminal(b[g],a,!0):b.push(m.insertEdge(null,-null,"",a,b[f],m.createCurrentEdgeStyle())));null!=h&&mxEvent.isShiftDown(h)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(J){this.editorUi.handleError(J)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=h&&mxEvent.isMouseEvent(h)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=g&&1<k.length&&k.splice(g,1);return k};+!0)}if(null!=N.getTerminalPoint(!1))N.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(L&&m.model.isVertex(C)){var T=m.view.getState(C);J=T.cell!=m.view.currentRoot?T.origin:new mxPoint(0,0);m.cellsMoved(b,J.x,J.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),D=p.x-Math.round(z.x),G=p.y-Math.round(z.y),p.x=Math.round(z.x),p.y=Math.round(z.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=g?m.model.setTerminal(b[g],a,!0):b.push(m.insertEdge(null,+null,"",a,b[f],m.createCurrentEdgeStyle())));null!=h&&mxEvent.isShiftDown(h)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(K){this.editorUi.handleError(K)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=h&&mxEvent.isMouseEvent(h)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=g&&1<k.length&&k.splice(g,1);return k};Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var h=this.editorUi.editor.graph,d=h.view,g=1<f.length,m=h.view.getState(a),p=h.getCellGeometry(a);f=h.getCellGeometry(b);null!=m&&null!=p&&null!=f&&(f=f.clone(),h.model.isEdge(a)?(p=m.absolutePoints,b=p[0],h=p[p.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=h.x/d.scale-d.translate.x-f.width/2,f.y=h.y/d.scale-d.translate.y-f.height/2)):(p.relative&&(p=p.clone(),p.x=(m.x-d.translate.x)/d.scale,p.y=(m.y-d.translate.y)/d.scale),d=h.defaultEdgeLength,h.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),h=f.getTerminalPoint(!1),d=h.x-b.x,b=h.y-b.y,d=Math.sqrt(d*d+b*b),f.x=p.getCenterX(),f.y=p.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=p.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=p.x+p.width,f.setTerminalPoint(new mxPoint(f.x+f.width,f.y),!1)):e==mxConstants.DIRECTION_SOUTH?(f.height=d,f.y=p.y+p.height,f.setTerminalPoint(new mxPoint(f.x,f.y+f.height),!1)):e==mxConstants.DIRECTION_WEST&&(f.width=d,f.x=p.x-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1))):(!g&&45<f.width&&45<f.height&&45<p.width&&45<p.height&&(f.width*=p.height/f.height,f.height=p.height),f.x=p.x+p.width/2-f.width/2,f.y=p.y+p.height/2-f.height/2,e==mxConstants.DIRECTION_NORTH?f.y=f.y-p.height/2-f.height/2-d:e==mxConstants.DIRECTION_EAST?f.x=f.x+p.width/2+@@ -2476,7 +2476,7 @@ Sidebar.prototype.createDragSource=function(a,b,e,f,h,d){function g(ma,Ba){var Cp.editor.graph,u=null,w=null,z=this;d=0;for(var C=this.livePreview,E=0;E<f.length&&C;E++)d+=k.model.getDescendants(f[E]).length,C=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==w&&k.model.isVertex(f[E])?w=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==w||null==u);E++);var D=this.isDropStyleEnabled(f,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(ma,Ba,Ca,Ja,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=N&&O==V){var Da=ma.isCellSelected(N.cell)?ma.getSelectionCells():[N.cell];ma.updateShapes(ma.model.isEdge(N.cell)?f[0]:f[w],Da,!0);ma.setSelectionCells(Da)}else null!=f&&null!=O&&null!=L&&O!=V?(Da=ma.model.isEdge(L.cell)||null==u?w:u,ma.setSelectionCells(this.dropAndConnect(L.cell,f,sa,Da,Ba,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(ma.view.getState(ma.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),G.createPreviewElement=mxUtils.bind(this,function(ma){var Ba=document.createElement("a");Ba.className="geItem";Ba.style.overflow="visible";ma=ma.view.scale;Ba.style.width=ma*Math.max(1,h.width)+"px";Ba.style.height=ma*Math.max(1,h.height)+"px";mxUtils.setOpacity(Ba,50);var Ca=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Ca),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(Ca,ma*Math.max(1,h.width),ma*Math.max(1,h.height),Ba,null,null,null,null,null,k.shapeBackgroundColor,-0,ma);return Ba}));var K=G.mouseDown;G.mouseDown=function(ma){mxEvent.isPopupTrigger(ma)||mxEvent.isMultiTouchEvent(ma)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),K.apply(this,arguments))};var L=null,Q=null,N=null,U=!1,Y=g(this.triangleUp,mxResources.get("connect")),P=g(this.triangleRight,mxResources.get("connect")),T=g(this.triangleDown,mxResources.get("connect")),J=g(this.triangleLeft,mxResources.get("connect")),V=g(this.refreshTarget,mxResources.get("replace")),Z=null,ia=g(this.roundDrop),+0,ma);return Ba}));var J=G.mouseDown;G.mouseDown=function(ma){mxEvent.isPopupTrigger(ma)||mxEvent.isMultiTouchEvent(ma)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),J.apply(this,arguments))};var L=null,Q=null,N=null,U=!1,Y=g(this.triangleUp,mxResources.get("connect")),P=g(this.triangleRight,mxResources.get("connect")),T=g(this.triangleDown,mxResources.get("connect")),K=g(this.triangleLeft,mxResources.get("connect")),V=g(this.refreshTarget,mxResources.get("replace")),Z=null,ia=g(this.roundDrop),oa=g(this.roundDrop),sa=mxConstants.DIRECTION_NORTH,O=null,X=G.createPreviewElement;G.createPreviewElement=function(ma){var Ba=X.apply(this,arguments);mxClient.IS_SVG&&(Ba.style.pointerEvents="none");this.previewElementWidth=Ba.style.width;this.previewElementHeight=Ba.style.height;return Ba};var ba=G.dragEnter;G.dragEnter=function(ma,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ba.apply(this,arguments)};var da=G.dragExit;G.dragExit=function(ma,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");da.apply(this,arguments)};G.dragOver=function(ma,Ba){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=O&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var Ca=ma.view;if(null!=N&&O==V)this.previewElement.style.display="none";else if(null!=L&&null!=O){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ja=ma.model.isEdge(L.cell)||null!=w?w:u,Ia=z.getDropAndConnectGeometry(L.cell,f[Ja],sa,f),Da=ma.model.isEdge(L.cell)?null:ma.getCellGeometry(L.cell),Ga=ma.getCellGeometry(f[Ja]),ta=ma.model.getParent(L.cell),La=Ca.translate.x*Ca.scale,Xa=Ca.translate.y*Ca.scale;null!=Da&&!Da.relative&&ma.model.isVertex(ta)&&ta!=Ca.currentRoot&&(Xa=Ca.getState(ta),La=Xa.x,Xa=Xa.y);Da=Ga.x;Ga=Ga.y;ma.model.isEdge(f[Ja])&&(Ga=Da=0);this.previewElement.style.left=(Ia.x-Da)*Ca.scale+La+"px";this.previewElement.style.top=(Ia.y-Ga)*Ca.scale+Xa+"px";1==f.length&&(this.previewElement.style.width=Ia.width*Ca.scale+"px",this.previewElement.style.height=@@ -2489,12 +2489,12 @@ mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==m2,this.refreshTarget.width,this.refreshTarget.height),m(Ba,Ca,ta,V));if(U&&null!=L&&!mxEvent.isAltDown(Ja)&&null==O){Da=mxRectangle.fromRectangle(L);if(ma.model.isEdge(L.cell)){var La=L.absolutePoints;null!=ia.parentNode&&(ta=La[0],Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.roundDrop.width/2,ta.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ia)));null!=oa.parentNode&&(La=La[La.length-1],Da.add(m(Ba,Ca,new mxRectangle(La.x-this.roundDrop.width/2,La.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),oa)))}else ta=mxRectangle.fromRectangle(L),null!=L.shape&&null!=L.shape.boundingBox&&(ta=mxRectangle.fromRectangle(L.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(L.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Da.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleUp.width/2,ta.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Y)),Da.add(m(Ba,Ca,new mxRectangle(ta.x+ta.width,L.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),P)),Da.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleDown.width/2,ta.y+ta.height,this.triangleDown.width,-this.triangleDown.height),T)),Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.triangleLeft.width,L.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),J));null!=Da&&Da.grow(10)}sa=mxConstants.DIRECTION_NORTH;O==P?sa=mxConstants.DIRECTION_EAST:O==T||O==oa?sa=mxConstants.DIRECTION_SOUTH:O==J&&(sa=mxConstants.DIRECTION_WEST);null!=N&&O==V&&(Ga=N);ta=(null==w||ma.isCellConnectable(f[w]))&&(ma.model.isEdge(Ia)&&null!=w||ma.model.isVertex(Ia)&&ma.isCellConnectable(Ia));if(null!=-L&&5E3<=H||L!=Ga&&(null==Da||!mxUtils.contains(Da,Ba,Ca)||500<H&&null==O&&ta))if(U=!1,L=5E3>H&&H>this.dropTargetDelay||ma.model.isEdge(Ia)?Ga:null,null!=L&&ta){Da=[ia,oa,Y,P,T,J];for(ta=0;ta<Da.length;ta++)null!=Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);ma.model.isEdge(Ia)?(La=Ga.absolutePoints,null!=La&&(ta=La[0],La=La[La.length-1],ia.style.left=Math.floor(ta.x-this.roundDrop.width/2)+"px",ia.style.top=Math.floor(ta.y-this.roundDrop.height/2)+"px",oa.style.left=Math.floor(La.x-this.roundDrop.width/+this.triangleDown.height),T)),Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.triangleLeft.width,L.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),K));null!=Da&&Da.grow(10)}sa=mxConstants.DIRECTION_NORTH;O==P?sa=mxConstants.DIRECTION_EAST:O==T||O==oa?sa=mxConstants.DIRECTION_SOUTH:O==K&&(sa=mxConstants.DIRECTION_WEST);null!=N&&O==V&&(Ga=N);ta=(null==w||ma.isCellConnectable(f[w]))&&(ma.model.isEdge(Ia)&&null!=w||ma.model.isVertex(Ia)&&ma.isCellConnectable(Ia));if(null!=+L&&5E3<=H||L!=Ga&&(null==Da||!mxUtils.contains(Da,Ba,Ca)||500<H&&null==O&&ta))if(U=!1,L=5E3>H&&H>this.dropTargetDelay||ma.model.isEdge(Ia)?Ga:null,null!=L&&ta){Da=[ia,oa,Y,P,T,K];for(ta=0;ta<Da.length;ta++)null!=Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);ma.model.isEdge(Ia)?(La=Ga.absolutePoints,null!=La&&(ta=La[0],La=La[La.length-1],ia.style.left=Math.floor(ta.x-this.roundDrop.width/2)+"px",ia.style.top=Math.floor(ta.y-this.roundDrop.height/2)+"px",oa.style.left=Math.floor(La.x-this.roundDrop.width/2)+"px",oa.style.top=Math.floor(La.y-this.roundDrop.height/2)+"px",null==ma.model.getTerminal(Ia,!0)&&ma.container.appendChild(ia),null==ma.model.getTerminal(Ia,!1)&&ma.container.appendChild(oa))):(ta=mxRectangle.fromRectangle(Ga),null!=Ga.shape&&null!=Ga.shape.boundingBox&&(ta=mxRectangle.fromRectangle(Ga.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(Ga.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Y.style.left=Math.floor(Ga.getCenterX()-this.triangleUp.width/2)+"px",Y.style.top=Math.floor(ta.y-this.triangleUp.height)+"px",P.style.left=Math.floor(ta.x+ta.width)+"px",P.style.top=Math.floor(Ga.getCenterY()--this.triangleRight.height/2)+"px",T.style.left=Y.style.left,T.style.top=Math.floor(ta.y+ta.height)+"px",J.style.left=Math.floor(ta.x-this.triangleLeft.width)+"px",J.style.top=P.style.top,"eastwest"!=Ga.style.portConstraint&&(ma.container.appendChild(Y),ma.container.appendChild(T)),ma.container.appendChild(P),ma.container.appendChild(J));null!=Ga&&(Q=ma.selectionCellsHandler.getHandler(Ga.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));U=!0}else for(Da=[ia,oa,Y,P,T,J],ta=0;ta<Da.length;ta++)null!=-Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);U||null==Q||Q.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=N&&O==V?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Ia||null==O&&ma.isSplitTarget(Ia,f,Ja)||(Ia=ma.getDropTarget(f,Ja,Ia,!0));return Ia});var qa=G.startDrag;G.startDrag=function(ma){z.activeDragSource=this;qa.apply(this,arguments)};var Pa=G.stopDrag;G.stopDrag=function(){Pa.apply(this,arguments);for(var ma=[ia,oa,V,Y,P,T,J],+this.triangleRight.height/2)+"px",T.style.left=Y.style.left,T.style.top=Math.floor(ta.y+ta.height)+"px",K.style.left=Math.floor(ta.x-this.triangleLeft.width)+"px",K.style.top=P.style.top,"eastwest"!=Ga.style.portConstraint&&(ma.container.appendChild(Y),ma.container.appendChild(T)),ma.container.appendChild(P),ma.container.appendChild(K));null!=Ga&&(Q=ma.selectionCellsHandler.getHandler(Ga.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));U=!0}else for(Da=[ia,oa,Y,P,T,K],ta=0;ta<Da.length;ta++)null!=+Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);U||null==Q||Q.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=N&&O==V?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Ia||null==O&&ma.isSplitTarget(Ia,f,Ja)||(Ia=ma.getDropTarget(f,Ja,Ia,!0));return Ia});var qa=G.startDrag;G.startDrag=function(ma){z.activeDragSource=this;qa.apply(this,arguments)};var Pa=G.stopDrag;G.stopDrag=function(){Pa.apply(this,arguments);for(var ma=[ia,oa,V,Y,P,T,K],Ba=0;Ba<ma.length;Ba++)null!=ma[Ba].parentNode&&ma[Ba].parentNode.removeChild(ma[Ba]);null!=L&&null!=Q&&Q.reset();O=Z=N=L=Q=z.activeDragSource=null};return G};Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()&&f.model.isVertex(f.getSelectionCell())){b=null;for(var h=0;h<a.length&&null==b;h++)f.model.isVertex(a[h])&&(b=h);null!=b&&(f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,b,e)),f.scrollCellToVisible(f.getSelectionCell()))}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};@@ -2515,7 +2515,7 @@ null)}),200)}),0)):(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),wiSidebar.prototype.addImagePalette=function(a,b,e,f,h,d,g){for(var m=[],p=0;p<h.length;p++)mxUtils.bind(this,function(k,u,w){if(null==w&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){w=k.lastIndexOf("/");var z=k.lastIndexOf(".");w=k.substring(0<=w?w+1:0,0<=z?z:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(w)))})(h[p],null!=d?d[p]:null,null!=g?g[h[p]]:null);this.addPaletteFunctions(a,b,!1,m)};Sidebar.prototype.getTagsForStencil=function(a,b,e){a=a.split(".");for(var f=1;f<a.length;f++)a[f]=a[f].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=e&&a.push(e);return a.slice(1,a.length)};Sidebar.prototype.addStencilPalette=function(a,b,e,f,h,d,g,m,p,k){g=null!=g?g:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,z,C,E,D){if(null==h||0>mxUtils.indexOf(h,z)){C=this.getTagsForStencil(w,z);var G=null!=m?m[z]:null;null!=G&&C.push(G);u.push(this.createVertexTemplateEntry("shape="+w+z.toLowerCase()+f,Math.round(E*g),Math.round(D*g),"",z.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),-!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var z=0;z<p.length;z++)p[z](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(C,E,D,G,K){(null==h||0>mxUtils.indexOf(h,E))&&w.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+f,Math.round(G*g),Math.round(K*g),"",E.replace(/_/g," "),!0))}),!0)}))};+!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var z=0;z<p.length;z++)p[z](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(C,E,D,G,J){(null==h||0>mxUtils.indexOf(h,E))&&w.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+f,Math.round(G*g),Math.round(J*g),"",E.replace(/_/g," "),!0))}),!0)}))};Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.escapeListener&&(this.editorUi.editor.graph.removeListener(this.escapeListener),this.escapeListener=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var h=0;h<a.length;h++)f=f.replace(new RegExp("&"+a[h][0]+";","g"),"&#"+a[h][1]+";");return b(f)};var e=mxUtils.getSizeForString;mxUtils.getSizeForString=function(f,h,d,g){return e(Graph.sanitizeHtml(f),h,d,g)}})();Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});@@ -2524,7 +2524,7 @@ arguments[2])}var m=Number(h.length);m=isNaN(m)?0:0!==m&&isFinite(m)?(0<m?1:-1)*mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();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="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,e){return null};-mxImageShape.prototype.getImageDataUri=function(){var a=String(this.image);if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a,!0),this.clippedImage=a;a=this.clippedSvg}return a};+mxImageShape.prototype.getImageDataUri=function(){var a=String(this.image);if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a),this.clippedImage=a;a=this.clippedSvg}return a};(function(){var a=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(b,e,f,h,d){return"default"==h&&null!=d?"fillcolor"==f.nodeName?d.shapeBackgroundColor:d.shapeForegroundColor:a.apply(this,arguments)}})();(function(){var a=mxResources.get;mxResources.get=function(b,e,f){null==f&&(f=b);return a.apply(this,[b,e,f])}})();(function(){var a=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,e,f,h,d,g,m,p){var k=a.apply(this,arguments);if(null!=e){var u=k.getElementsByTagName("img");0<u.length&&(u[0].className="geToolbarButton geAdaptiveAsset",u[0].style.margin="4px",u[0].style.width="18px")}return k}})();Graph=function(a,b,e,f,h,d){mxGraph.call(this,a,b,e,f);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(O){O=this.getCurrentCellStyle(O);@@ -2548,11 +2548,11 @@ X&&(O.lastLabelValue=X,O.lastSanitizedLabelValue=Graph.sanitizeHtml(X),z.innerHTda;da=this.graph.view.translate;for(var H=this.graph.view.scale,ea=this.graph.getPageLayout(),ra=0;ra<ea.width;ra++)X.push(new mxRectangle(((ea.x+ra)*ca+da.x)*H,(ea.y*ba+da.y)*H,ca*H,ba*H));for(ra=1;ra<ea.height;ra++)X.push(new mxRectangle((ea.x*ca+da.x)*H,((ea.y+ra)*ba+da.y)*H,ca*H,ba*H));O=X.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,X){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(O){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var X=E.apply(this,arguments),ba=new mxDictionary,da=[],ca=0;ca<X.length;ca++){var H=this.graph.isTableCell(O)&&this.graph.isTableCell(X[ca])&&this.graph.isCellSelected(X[ca])?this.graph.model.getParent(X[ca]):this.graph.isTableRow(O)&&this.graph.isTableRow(X[ca])&&this.graph.isCellSelected(X[ca])?X[ca]:this.graph.getCompositeParent(X[ca]);null==H||ba.get(H)||(ba.put(H,!0),da.push(H))}return da};var D=this.graphHandler.start;this.graphHandler.start=function(O,X,ba,da){var ca=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?ca=!0:O=this.graph.model.getParent(O));ca||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,X){X=this.graph.getCompositeParent(X);-return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(O,X,ba,da,ca,H){var ea=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=da&&this.graph.applyNewEdgeStyle(da,[ea]);return ea};var G=new mxRubberband(this);this.getRubberband=function(){return G};var K=(new Date).getTime(),L=0,Q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;Q.apply(this,arguments);O!=this.currentState?-(K=(new Date).getTime(),L=0):L=(new Date).getTime()-K};var N=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=this.currentState&&O.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&N.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(O){return U.apply(this,+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(O,X,ba,da,ca,H){var ea=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=da&&this.graph.applyNewEdgeStyle(da,[ea]);return ea};var G=new mxRubberband(this);this.getRubberband=function(){return G};var J=(new Date).getTime(),L=0,Q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;Q.apply(this,arguments);O!=this.currentState?+(J=(new Date).getTime(),L=0):L=(new Date).getTime()-J};var N=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=this.currentState&&O.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&N.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(O){return U.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var Y=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(O){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==O.getState()&&mxEvent.isTouchEvent(O.getEvent())};var P=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(P=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=P)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(O){return mxEvent.isMouseEvent(O.getEvent())};var T=this.click;this.click=function(O){var X=null==O.state&&null!=O.sourceState&&this.isCellLocked(this.getLayerForCell(O.sourceState.cell));if(this.isEnabled()&&!X||O.isConsumed())return T.apply(this,arguments);var ba=X?O.sourceState.cell:-O.getCell();if(null!=ba){var da=this.getClickableLinkForCell(ba);null!=da?this.isCustomLink(da)?this.customLinkClicked(da,ba):this.openLink(da):X&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var J=this.tooltipHandler.show;this.tooltipHandler.show=function(){J.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),X=0;X<O.length;X++)null!=O[X].getAttribute("href")&&null==O[X].getAttribute("target")&&O[X].setAttribute("target",+O.getCell();if(null!=ba){var da=this.getClickableLinkForCell(ba);null!=da?this.isCustomLink(da)?this.customLinkClicked(da,ba):this.openLink(da):X&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var K=this.tooltipHandler.show;this.tooltipHandler.show=function(){K.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),X=0;X<O.length;X++)null!=O[X].getAttribute("href")&&null==O[X].getAttribute("target")&&O[X].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var X=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(X?O.sourceState.cell:O.getCell())};var V=this.getCursorForCell;this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return V.apply(this,arguments)};this.selectRegion=function(O,X){var ba=mxEvent.isAltDown(X)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,ba,null,!0);if(this.isToggleEvent(X))for(ba=0;ba<O.length;ba++)this.selectCellForEvent(O[ba],X);else this.selectCellsForEvent(O,X);return O};var Z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,X,ba){return this.graph.isCellSelected(O)?!1:Z.apply(this,arguments)};var ia=this.updateMouseEvent;this.updateMouseEvent=function(O){O=ia.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),O.getGraphY(),null,null,null,mxUtils.bind(this,function(X,ba,da){return O.state==X||this.isCellLocked(this.getLayerForCell(X.cell))&&null==this.getLinkForCell(X.cell)}))):O.state=null);return O};var oa=this.isCellSelectable;this.isCellSelectable=function(O){return oa.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};@@ -2584,24 +2584,24 @@ Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var e=a.bGraph.arrayBufferIndexOfString=function(a,b,e){var f=b.charCodeAt(0),h=1,d=-1;for(e=e||0;e<a.byteLength;e++)if(a[e]==f){d=e;break}for(e=d+1;-1<d&&e<a.byteLength&&e<d+b.length-1;e++){if(a[e]!=b.charCodeAt(h))return Graph.arrayBufferIndexOfString(a,b,d+1);h++}return h==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};Graph.fadeNodes=function(a,b,e,f,h){h=null!=h?h:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+h+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},h)},0)};-Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,h){function d(u,w){if(u.getModel().isVertex(w)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=w.referenceCell||w;u.getModel().beginUpdate();try{for(var E=w.referenceCell||w,D=f.model.getCell(E.sourceCellId),G=f.getEdges(D,null,!0,!0,!1,!0),K=[],L=0;L<G.length;L++)null!=G[L].getTerminal(!0)&&null!=G[L].getTerminal(!1)&&f.isCellVisible(G[L])&&-!f.isEdgeIgnored(G[L])&&f.isCellVisible(G[L].getTerminal(!0))&&f.isCellVisible(G[L].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[L]))&&K.push(G[L]);K=G=K;if(null!=w.startIndex||0<pageSize&&G.length>pageSize){var Q=w.startIndex||0;K=G.slice(Math.max(0,Q),Math.min(G.length,Q+pageSize))}K=f.getOpposites(K,D).concat(K);var N=u.cloneCells(K);for(L=0;L<K.length;L++)if(N[L].sourceCellId=K[L].id,u.model.isEdge(N[L]))for(N[L].geometry.x=0,N[L].geometry.y=0,N[L].geometry.points=null,N[L].setStyle(N[L].getStyle()++Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,h){function d(u,w){if(u.getModel().isVertex(w)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=w.referenceCell||w;u.getModel().beginUpdate();try{for(var E=w.referenceCell||w,D=f.model.getCell(E.sourceCellId),G=f.getEdges(D,null,!0,!0,!1,!0),J=[],L=0;L<G.length;L++)null!=G[L].getTerminal(!0)&&null!=G[L].getTerminal(!1)&&f.isCellVisible(G[L])&&+!f.isEdgeIgnored(G[L])&&f.isCellVisible(G[L].getTerminal(!0))&&f.isCellVisible(G[L].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[L]))&&J.push(G[L]);J=G=J;if(null!=w.startIndex||0<pageSize&&G.length>pageSize){var Q=w.startIndex||0;J=G.slice(Math.max(0,Q),Math.min(G.length,Q+pageSize))}J=f.getOpposites(J,D).concat(J);var N=u.cloneCells(J);for(L=0;L<J.length;L++)if(N[L].sourceCellId=J[L].id,u.model.isEdge(N[L]))for(N[L].geometry.x=0,N[L].geometry.y=0,N[L].geometry.points=null,N[L].setStyle(N[L].getStyle()+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),N[L].setTerminal(E,null==N[L].getTerminal(!0)),D=0;D<N[L].getChildCount();D++){var U=N[L].getChildAt(D);null!=U.geometry&&U.geometry.relative&&(U.setStyle(U.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),U.geometry.offset=new mxPoint(0,0),U.geometry.y=0,U.geometry.x=.5>U.geometry.x?-.8:.5<U.geometry.x?.8:0)}if(0<w.startIndex){var Y=u.createVertex(null,null,mxResources.get("previousPage")+" ("+Math.ceil((w.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Y.referenceCell=E;Y.startIndex=Math.max(0,(w.startIndex||0)-pageSize);N.splice(0,0,Y)}if(G.length>(w.startIndex||0)+pageSize){var P=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((w.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");P.referenceCell=-E;P.startIndex=(w.startIndex||0)+pageSize;N.splice(0,0,P)}for(var T in u.getModel().cells){var J=u.getModel().getCell(T);J!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,J)&&u.getModel().isVertex(J)&&u.removeCells([J])}u.addCells(N);var V=u.getModel().getGeometry(u.rootCell);null!=V&&(V=V.clone(),V.x=z-V.width/2,V.y=C-V.height/3,u.getModel().setGeometry(u.rootCell,V));w=[];for(T in u.getModel().cells)J=u.getModel().getCell(T),J!=u.rootCell&&u.getModel().isVertex(J)&&u.getModel().getParent(J)==u.getDefaultParent()&&-(w.push(J),V=u.getModel().getGeometry(J),null!=V&&(V.x=z-V.width/2,V.y=C-V.height/2));var Z=w.length,ia=2*Math.PI/Z,oa=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<Z;z++)V=u.getModel().getGeometry(w[z]),null!=V&&(V=V.clone(),V.x+=oa*Math.sin(z*ia),V.y+=oa*Math.cos(z*ia),u.getModel().setGeometry(w[z],V))}finally{u.getModel().endUpdate()}}}var g=document.createElement("div");g.style.position="absolute";g.style.display="block";g.style.background=+E;P.startIndex=(w.startIndex||0)+pageSize;N.splice(0,0,P)}for(var T in u.getModel().cells){var K=u.getModel().getCell(T);K!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,K)&&u.getModel().isVertex(K)&&u.removeCells([K])}u.addCells(N);var V=u.getModel().getGeometry(u.rootCell);null!=V&&(V=V.clone(),V.x=z-V.width/2,V.y=C-V.height/3,u.getModel().setGeometry(u.rootCell,V));w=[];for(T in u.getModel().cells)K=u.getModel().getCell(T),K!=u.rootCell&&u.getModel().isVertex(K)&&u.getModel().getParent(K)==u.getDefaultParent()&&+(w.push(K),V=u.getModel().getGeometry(K),null!=V&&(V.x=z-V.width/2,V.y=C-V.height/2));var Z=w.length,ia=2*Math.PI/Z,oa=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<Z;z++)V=u.getModel().getGeometry(w[z]),null!=V&&(V=V.clone(),V.x+=oa*Math.sin(z*ia),V.y+=oa*Math.cos(z*ia),u.getModel().setGeometry(w[z],V))}finally{u.getModel().endUpdate()}}}var g=document.createElement("div");g.style.position="absolute";g.style.display="block";g.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.style.width="100%";g.style.height="100%";g.style.left="0px";g.style.top="0px";g.style.zIndex=2;var m=document.createElement("img");m.setAttribute("src",Editor.closeBlackImage);m.style.position="absolute";m.style.cursor="pointer";m.style.right="10px";m.style.top="10px";g.appendChild(m);var p=document.createElement("div");p.style.position="absolute";p.style.cursor="pointer";p.style.right="38px";p.style.top="14px";p.style.textAlign="right";p.style.verticalAlign=-"top";mxUtils.write(p,mxResources.get("close"));g.appendChild(p);document.body.appendChild(g);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var w=new Graph(u);w.keepEdgesInBackground=!0;w.isCellResizable=function(){return!1};w.isCellRotatable=function(){return!1};w.getCursorForCell=function(K){return this.model.isVertex(K)?"pointer":null};w.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,-"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(h)};mxEvent.addListener(m,"click",z);mxEvent.addListener(p,"click",z);w.setEnabled(!1);var C=w.click;w.click=function(K){var L=K.getCell(),Q=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&w.rootCell!=L&&0<w.getEdges(Q).length?d(w,L):C.apply(this,arguments)};z=w.container.scrollWidth/2;var E=w.container.scrollHeight/3;w.model.beginUpdate();var D=w.importCells([h])[0];D.sourceCellId=h.id;D.geometry.x=z-D.geometry.width/2;-D.geometry.y=E-D.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(K,L){G||(K=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,K,function(){var Q=new mxParallelEdgeLayout(w);Q.spacing=60;var N=Q.layout;Q.layout=function(U){Q.spacing=Math.min(60,Math.max(30,60-5*U.length));N.apply(this,arguments)};Q.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;+"top";mxUtils.write(p,mxResources.get("close"));g.appendChild(p);document.body.appendChild(g);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var w=new Graph(u);w.keepEdgesInBackground=!0;w.isCellResizable=function(){return!1};w.isCellRotatable=function(){return!1};w.getCursorForCell=function(J){return this.model.isVertex(J)?"pointer":null};w.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,+"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(h)};mxEvent.addListener(m,"click",z);mxEvent.addListener(p,"click",z);w.setEnabled(!1);var C=w.click;w.click=function(J){var L=J.getCell(),Q=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&w.rootCell!=L&&0<w.getEdges(Q).length?d(w,L):C.apply(this,arguments)};z=w.container.scrollWidth/2;var E=w.container.scrollHeight/3;w.model.beginUpdate();var D=w.importCells([h])[0];D.sourceCellId=h.id;D.geometry.x=z-D.geometry.width/2;+D.geometry.y=E-D.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(J,L){G||(J=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,J,function(){var Q=new mxParallelEdgeLayout(w);Q.spacing=60;var N=Q.layout;Q.layout=function(U){Q.spacing=Math.min(60,Math.max(30,60-5*U.length));N.apply(this,arguments)};Q.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;w.tooltipHandler.hide();w.refresh();G=!1}))});d(w,D)}else mxUtils.error("Browser is not supported!",200,!1)})(g)})(a,b)};Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==e.className&&a.parentNode.insertBefore(a.ownerDocument.createElement("br"),a);a.parentNode.removeChild(a)}!b&&null!=a.innerHTML&&0<=a.innerHTML.indexOf("\t")&&(f=Graph.createTabNode(4),a.innerHTML=a.innerHTML.replace(/\t/g,f.outerHTML))}a=e}};Graph.createTabNode=function(a){var b="\t";if(null!=a)for(b="";0<a;)b+=" ",a--;a=document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(b));return a};Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){if(null==a)return null;var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};-Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var f=decodeURIComponent(escape(atob(a.substring(26)))),h=f.indexOf("<svg");if(0<=h){e.innerHTML=Graph.sanitizeHtml(f.substring(h));var d=e.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(e);try{f=b=-1;var g=d[0].getAttribute("width"),m=d[0].getAttribute("height");g=null!=g&&"%"!=g.charAt(g.length-1)?parseFloat(g):NaN;m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN;var p=d[0].getAttribute("viewBox");h=null;if(null!=p&&!isNaN(g)&&!isNaN(m)){var k=p.split(" ");4<=p.length&&(b=parseFloat(k[2])/g,f=parseFloat(k[3])/m,h=new mxRectangle(parseFloat(k[0]),parseFloat(k[1]),parseFloat(k[2]),parseFloat(k[3])))}var u=d[0].getBBox();0<u.width&&0<u.height&&(null==h||u.width*u.height<h.width*h.height*-.7)&&(e.getElementsByTagName("svg")[0].setAttribute("viewBox",u.x+" "+u.y+" "+u.width+" "+u.height),e.getElementsByTagName("svg")[0].setAttribute("width",u.width/b),e.getElementsByTagName("svg")[0].setAttribute("height",u.height/f))}catch(w){}finally{document.body.removeChild(e)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(w){}return a};+Graph.clipSvgDataUri=function(a){if(null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var b=document.createElement("div");b.style.position="absolute";b.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),f=e.indexOf("<svg");if(0<=f){b.innerHTML=Graph.sanitizeHtml(e.substring(f));var h=b.getElementsByTagName("svg");if(0<h.length){document.body.appendChild(b);try{f=e=1;var d=h[0].getAttribute("width"),g=h[0].getAttribute("height");d=null!=d&&"%"!=d.charAt(d.length-+1)?parseFloat(d):NaN;g=null!=g&&"%"!=g.charAt(g.length-1)?parseFloat(g):NaN;var m=h[0].getAttribute("viewBox");if(null!=m&&!isNaN(d)&&!isNaN(g)){var p=m.split(" ");4<=m.length&&(e=parseFloat(p[2])/d,f=parseFloat(p[3])/g,new mxRectangle(parseFloat(p[0]),parseFloat(p[1]),parseFloat(p[2]),parseFloat(p[3])))}var k=h[0].getBBox();if(0<k.width&&0<k.height){d=0;var u=h[0].querySelectorAll("[stroke-width]");for(g=0;g<u.length;g++)d=Math.max(d,parseFloat(u[g].getAttribute("stroke-width")));k=new mxRectangle(k.x,+k.y,k.width,k.height);k.grow(d/2);b.getElementsByTagName("svg")[0].setAttribute("viewBox",k.x+" "+k.y+" "+k.width+" "+k.height);b.getElementsByTagName("svg")[0].setAttribute("width",k.width/e);b.getElementsByTagName("svg")[0].setAttribute("height",k.height/f)}}catch(w){}finally{document.body.removeChild(b)}a=Editor.createSvgDataUri(mxUtils.getXml(h[0]))}}}catch(w){}return a};Graph.createRemoveIcon=function(a,b){var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",a);e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";mxEvent.addListener(e,"click",b);return e};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.rewritePageLinks=function(a,b){function e(h,d){var g=h.getAttribute(d);if(null!=g){Graph.isPageLink(g)&&(g="#"+g.substring(g.indexOf(":")+1));var m=d;b&&"xlink:href"==d&&(h.removeAttribute(d),m="href");h.setAttribute(m,g)}}a=a.getElementsByTagName("a");if(null!=a)for(var f=0;f<a.length;f++)e(a[f],"href"),e(a[f],"xlink:href")};Graph.isLink=function(a){return null!=a&&a.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;@@ -2622,8 +2622,8 @@ Graph.prototype.mergeStyle=function(g,m,p){if(null!=g){var k={},u;for(u in g){va0)));if(this.isTableRow(g)&&(!this.isSwimlane(g)||0==m)&&""==this.getLabel(g)&&0<this.model.getChildCount(g))for(m=0;m<this.model.getChildCount(g);m++){var p=this.model.getChildAt(g,m);if(this.isCellEditable(p)){g=p;break}}return g};Graph.prototype.copyStyle=function(g){return this.getCellStyle(g,!1)};Graph.prototype.pasteStyle=function(g,m,p,k){null!=g&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(g,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(g,m))};Graph.prototype.copyCellStyles=function(g,m,p,k,u,w,z){var C=!1,E=!1;if(0<g.length)for(var D=0;D<g.length&&(C=this.getModel().isVertex(g[D])||C,!(E=this.getModel().isEdge(g[D])||E)||!C);D++);else E=C=!0;C=C&&!w;E=E&&!z;for(D=0;D<m.length;D++)if(g=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(C||g)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||g)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=function(g){for(var m=[],p=0;p<g.length;p++)m=m.concat(this.model.getDescendants(g[p]));return m};Graph.prototype.pasteCellStyles=function(g,m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<g.length;w++){var z=g[w],C=this.model.getStyle(z),E=!1;null!=z.style&&(pairs=z.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var G=-null!=C?C.split(";"):[],K=0;K<G.length;K++){var L=G[K],Q=L.indexOf("=");if(0<=Q){var N=L.substring(0,Q),U=mxUtils.indexOf(D,N);0<=U&&D.splice(U,1);for(E=0;E<Graph.cellStyleGroups.length;E++){var Y=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(Y,N))for(var P=0;P<Y.length;P++){var T=mxUtils.indexOf(D,Y[P]);0<=T&&D.splice(T,1)}}}}var J=this.model.isEdge(z);E=J?p:m;for(K=0;K<D.length;K++){N=D[K];var V=E[N];null!=V&&("edgeStyle"!=N||u)&&(J||!J&&0>mxUtils.indexOf(Graph.edgeStyles,N))&&(C=mxUtils.setStyle(C,-N,V),"fontFamily"==N&&null==E.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),J&&"rounded"==N&&"1"==V&&null==E.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return g};Graph.prototype.updateCellStyles=function(g,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],+null!=C?C.split(";"):[],J=0;J<G.length;J++){var L=G[J],Q=L.indexOf("=");if(0<=Q){var N=L.substring(0,Q),U=mxUtils.indexOf(D,N);0<=U&&D.splice(U,1);for(E=0;E<Graph.cellStyleGroups.length;E++){var Y=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(Y,N))for(var P=0;P<Y.length;P++){var T=mxUtils.indexOf(D,Y[P]);0<=T&&D.splice(T,1)}}}}var K=this.model.isEdge(z);E=K?p:m;for(J=0;J<D.length;J++){N=D[J];var V=E[N];null!=V&&("edgeStyle"!=N||u)&&(K||!K&&0>mxUtils.indexOf(Graph.edgeStyles,N))&&(C=mxUtils.setStyle(C,+N,V),"fontFamily"==N&&null==E.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),K&&"rounded"==N&&"1"==V&&null==E.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return g};Graph.prototype.updateCellStyles=function(g,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],!1),u=k[mxConstants.STYLE_PERIMETER],w=!1;for(C in g){var z=g[C];if(k[C]!=z){if(C==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[C]&&"umlLifeline"!=z){w=!0;var C="participant"}this.setCellStyles(C,z,[m[p]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}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(g,m,p,k,u,w){this.useCssTransforms&&(g=g/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(g,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var z=this.model.getChildCount(p)-1;0<=z;z--){var C=this.model.getChildAt(p,z),E=this.getScaledCellAt(g,m,C,k,u,w);if(null!=E)return E;if(this.isCellVisible(C)&&(u&&this.model.isEdge(C)||k&&this.model.isVertex(C))&&(E=this.view.getState(C),null!=E&&(null==w||!w(E,g,m))&&this.intersects(E,g,m)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(g){return!this.isSwimlane(g.cell)&&0<this.model.getChildCount(g.cell)&&!this.isCellCollapsed(g.cell)&&"1"==mxUtils.getValue(g.style,"recursiveResize",@@ -2664,10 +2664,10 @@ Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mGraph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};Graph.prototype.formatDate=function(a,b,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 f=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,g=function(K,L){K=String(K);for(L=L||2;K.length<L;)K="0"+K;return K};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||+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 f=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,g=function(J,L){J=String(J);for(L=L||2;J.length<L;)J="0"+J;return J};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),z=a[m+"Hours"](),C=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),G={d:p,dd:g(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:g(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+-12],yy:String(w).slice(2),yyyy:w,h:z%12||12,hh:g(z%12||12),H:z,HH:g(z),M:C,MM:g(C),s:E,ss:g(E),l:g(m,3),L:g(99<m?Math.round(m/10):m),t:12>z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+g(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(K){return K in G?G[K]:K.slice(1,-K.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};+12],yy:String(w).slice(2),yyyy:w,h:z%12||12,hh:g(z%12||12),H:z,HH:g(z),M:C,MM:g(C),s:E,ss:g(E),l:g(m,3),L:g(99<m?Math.round(m/10):m),t:12>z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+g(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(J){return J in G?G[J]:J.slice(1,+J.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};Graph.prototype.createLayersDialog=function(a,b){var e=document.createElement("div");e.style.position="absolute";for(var f=this.getModel(),h=f.getChildCount(f.root),d=0;d<h;d++)mxUtils.bind(this,function(g){function m(){f.isVisible(g)?(u.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(u.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var p=this.convertValueToString(g)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(f.isVisible(g)?"hideIt":"show",[p]));var u=document.createElement("img");u.setAttribute("draggable","false");u.setAttribute("align","absmiddle");u.setAttribute("border","0");u.style.position="relative";u.style.width="16px";u.style.padding="0px 6px 0 4px";b&&(u.style.filter="invert(100%)",u.style.top="-2px");k.appendChild(u);mxUtils.write(k,p);e.appendChild(k);mxEvent.addListener(k,"click",function(){f.setVisible(g,!f.isVisible(g));m();null!=a&&a(g)});m()})(f.getChildAt(f.root,d));return e};@@ -2685,11 +2685,11 @@ Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.moGraph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=a.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==a.parent&&(b=e.parent.getIndex(e),this.model.add(e.parent,a,b))};Graph.prototype.connectVertex=function(a,b,e,f,h,d,g,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var p=this.isCloneConnectSource(a),k=p?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var z=this.view.translate;k=z.x*e;z=z.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,z=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,z+u.y*e)).grow(40*e);d=null!=d?-this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var C=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==C||d[D]==this.model.getParent(a)))C=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var G=this.view.getState(d[D]);null==w||null==G||mxUtils.intersects(w,G)||(E=d[D])}}var K=-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||h;K&&("1"!=urlParams.sketch||h)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var L=[],Q=E;E=C;h=mxUtils.bind(this,function(N){if(null==g||null!=N||null==E&&p){this.model.beginUpdate();try{if(null==Q&&K){var U=this.getAbsoluteParent(null!=N?N:a);U=p?a:this.getCompositeParent(U);Q=null!=N?N:this.duplicateCells([U],-!1)[0];null!=N&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var Y=this.getCellGeometry(Q);null!=Y&&(null!=N&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=Y.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=Y.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-Y.width/2:u.x+Y.width/2),Y.x=u.x-Y.width/2,Y.y=u.y-Y.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),E=null):K&&!p&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(f)&&-mxEvent.isShiftDown(f)&&K||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());null!=P&&(L.push(P),this.applyNewEdgeStyle(a,[P],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(P,a));if(null==E&&null!=Q&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var T=a.parent.getIndex(a);this.model.add(a.parent,Q,T)}null==E&&null!=Q&&L.push(Q);null==Q&&null!=P&&P.geometry.setTerminalPoint(u,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[P]))}finally{this.model.endUpdate()}}if(null!=m)m(L);else return L});if(null==g||null!=Q||!K||null==E&&p)return h(Q);g(k+u.x*e,z+u.y*e,h)};+this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var C=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==C||d[D]==this.model.getParent(a)))C=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var G=this.view.getState(d[D]);null==w||null==G||mxUtils.intersects(w,G)||(E=d[D])}}var J=+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||h;J&&("1"!=urlParams.sketch||h)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var L=[],Q=E;E=C;h=mxUtils.bind(this,function(N){if(null==g||null!=N||null==E&&p){this.model.beginUpdate();try{if(null==Q&&J){var U=this.getAbsoluteParent(null!=N?N:a);U=p?a:this.getCompositeParent(U);Q=null!=N?N:this.duplicateCells([U],+!1)[0];null!=N&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var Y=this.getCellGeometry(Q);null!=Y&&(null!=N&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=Y.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=Y.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-Y.width/2:u.x+Y.width/2),Y.x=u.x-Y.width/2,Y.y=u.y-Y.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),E=null):J&&!p&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(f)&&+mxEvent.isShiftDown(f)&&J||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());null!=P&&(L.push(P),this.applyNewEdgeStyle(a,[P],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(P,a));if(null==E&&null!=Q&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var T=a.parent.getIndex(a);this.model.add(a.parent,Q,T)}null==E&&null!=Q&&L.push(Q);null==Q&&null!=P&&P.geometry.setTerminalPoint(u,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[P]))}finally{this.model.endUpdate()}}if(null!=m)m(L);else return L});if(null==g||null!=Q||!J||null==E&&p)return h(Q);g(k+u.x*e,z+u.y*e,h)};Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,h=0;h<a.length;h++)if(f=a[h],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};@@ -2776,22 +2776,22 @@ TableLayout.prototype.layoutRow=function(a,b,e,f){var h=this.graph.getModel(),d=0,k.width,k.height),h.setGeometry(d[p],k))}return m};TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),h="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var g=this.graph.getModel(),m=0;g.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=g.getChildCells(a,!0),w=0;w<u.length;w++)g.setVisible(u[w],!0);var z=this.getSize(u,!1);if(0<p&&0<k&&0<u.length&&0<z){if(h){var C=this.graph.getCellGeometry(u[u.length-1]);null!=C&&(C=C.clone(),C.height=p-z+C.height,g.setGeometry(u[u.length-1],C))}var E=d?null:this.getRowLayout(u[0],k),D=[],G=b.y;for(w=0;w<u.length;w++)C=this.graph.getCellGeometry(u[w]),null!=C&&(C=C.clone(),C.x=b.x,C.width=k,C.y=Math.round(G),G=h||f?G+C.height:G+C.height/z*p,C.height=Math.round(G)-C.y,g.setGeometry(u[w],C)),m=Math.max(m,this.layoutRow(u[w],E,C.height,k,D));f&&p<z&&(e=e.clone(),e.height=G+b.height,g.setGeometry(a,-e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,g.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(K){g.setVisible(K.cell,K.actual.cell==K.cell);if(K.actual.cell!=K.cell){if(K.actual.row==K.row){var L=null!=K.geo.alternateBounds?K.geo.alternateBounds:K.geo;K.actual.geo.width+=L.width}K.actual.col==K.col&&(L=null!=K.geo.alternateBounds?K.geo.alternateBounds:K.geo,K.actual.geo.height+=L.height)}}))}else for(w=0;w<u.length;w++)g.setVisible(u[w],+e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,g.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(J){g.setVisible(J.cell,J.actual.cell==J.cell);if(J.actual.cell!=J.cell){if(J.actual.row==J.row){var L=null!=J.geo.alternateBounds?J.geo.alternateBounds:J.geo;J.actual.geo.width+=L.width}J.actual.col==J.col&&(L=null!=J.geo.alternateBounds?J.geo.alternateBounds:J.geo,J.actual.geo.height+=L.height)}}))}else for(w=0;w<u.length;w++)g.setVisible(u[w],!1)}finally{g.endUpdate()}}};(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(w,z){z=null!=z?z:!0;var C=this.getState(w);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&!C.invalid&&this.updateLineJumps(C)&&this.graph.cellRenderer.redraw(C,!1,this.isRendering());C=b.apply(this,arguments);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(C);return C};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var w=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=w)for(var z=0;z<w.length;z++)if("hidden"!=w[z].getAttribute("visibility"))return w[z];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var h=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,z){return h.apply(this,arguments)||null!=w.routedPoints&&null!=z.routedPoints&&!mxUtils.equalPoints(z.routedPoints,w.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var z=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,E=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var D=function(oa,sa,O){var X=new mxPoint(sa,O);X.type=oa;E.push(X);X=null!=w.routedPoints?w.routedPoints[E.length-1]:null;return null==X||X.type!=oa||X.x!=sa||X.y!=O},G=.5*this.scale;-C=!1;E=[];for(var K=0;K<z.length-1;K++){for(var L=z[K+1],Q=z[K],N=[],U=z[K+2];K<z.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,U.x,U.y,L.x,L.y)<1*this.scale*this.scale;)L=U,K++,U=z[K+2];C=D(0,Q.x,Q.y)||C;for(var Y=0;Y<this.validEdges.length;Y++){var P=this.validEdges[Y],T=P.absolutePoints;if(null!=T&&mxUtils.intersects(w,P)&&"1"!=P.style.noJump){var J=null;for(P=0;P<T.length-1;P++){var V=T[P+1],Z=T[P];for(U=T[P+2];P<T.length-2&&mxUtils.ptSegDistSq(Z.x,Z.y,U.x,U.y,V.x,V.y)<1*this.scale*this.scale;)V=U,P++,-U=T[P+2];var ia=mxUtils.intersection(Q.x,Q.y,L.x,L.y,Z.x,Z.y,V.x,V.y);if(null!=ia&&(Math.abs(ia.x-Q.x)>G||Math.abs(ia.y-Q.y)>G)&&(Math.abs(ia.x-L.x)>G||Math.abs(ia.y-L.y)>G)&&(null==J||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,J.x,J.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,Z.x,Z.y)>G)&&(null==U||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,U.x,U.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,V.x,V.y)>G)){U=ia.x-Q.x;J=ia.y-Q.y;ia={distSq:U*U+J*J,x:ia.x,y:ia.y};for(U=0;U<N.length;U++)if(N[U].distSq>ia.distSq){N.splice(U,-0,ia);ia=null;break}null==ia||0!=N.length&&N[N.length-1].x===ia.x&&N[N.length-1].y===ia.y||N.push(ia)}J=Z}}}for(P=0;P<N.length;P++)C=D(1,N[P].x,N[P].y)||C}ia=z[z.length-1];C=D(0,ia.x,ia.y)||C}w.routedPoints=E;return C}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){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)g.apply(this,-arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),K=!0,L=null,Q=null,N=[],U=null;w.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var P=this.state.routedPoints[Y],T=new mxPoint(P.x/this.scale,P.y/this.scale);0==Y?T=z[0]:Y==this.state.routedPoints.length-1&&(T=z[z.length-1]);var J=!1;if(null!=-L&&1==P.type){var V=this.state.routedPoints[Y+1];P=V.x/this.scale-T.x;V=V.y/this.scale-T.y;P=P*P+V*V;null==U&&(U=new mxPoint(T.x-L.x,T.y-L.y),Q=Math.sqrt(U.x*U.x+U.y*U.y),0<Q?(U.x=U.x*D/Q,U.y=U.y*D/Q):U=null);P>D*D&&0<Q&&(P=L.x-T.x,V=L.y-T.y,P=P*P+V*V,P>D*D&&(J=new mxPoint(T.x-U.x,T.y-U.y),P=new mxPoint(T.x+U.x,T.y+U.y),N.push(J),this.addPoints(w,N,C,E,!1,null,K),N=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,K=!1,"sharp"==G?(w.lineTo(J.x-U.y*N,J.y+U.x*N),w.lineTo(P.x-U.y*N,P.y+-U.x*N),w.lineTo(P.x,P.y)):"line"==G?(w.moveTo(J.x+U.y*N,J.y-U.x*N),w.lineTo(J.x-U.y*N,J.y+U.x*N),w.moveTo(P.x-U.y*N,P.y+U.x*N),w.lineTo(P.x+U.y*N,P.y-U.x*N),w.moveTo(P.x,P.y)):"arc"==G?(N*=1.3,w.curveTo(J.x-U.y*N,J.y+U.x*N,P.x-U.y*N,P.y+U.x*N,P.x,P.y)):(w.moveTo(P.x,P.y),K=!0),N=[P],J=!0))}else U=null;J||(N.push(T),L=T)}this.addPoints(w,N,C,E,!1,null,K);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,E){return null!=z&&"centerPerimeter"==-z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,z,C,E){if(null==z||null==w||"1"!=z.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{z=this.getTerminalPort(w,z,E);var D=this.getNextPoint(w,C,E),G=this.graph.isOrthogonal(w),K=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(z.getCenterX(),-z.getCenterY());if(0!=K){var Q=Math.cos(-K),N=Math.sin(-K);D=mxUtils.getRotatedPoint(D,Q,N,L)}Q=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);Q+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(z,D,0==K&&G,Q);0!=K&&(Q=Math.cos(K),N=Math.sin(K),D=mxUtils.getRotatedPoint(D,Q,N,L));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,z,C,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,z,-C,E,D){if(null!=z&&null!=w){w=this.graph.getAllConnectionConstraints(z);E=C=null;if(null!=w)for(var G=0;G<w.length;G++){var K=this.graph.getConnectionPoint(z,w[G]);if(null!=K){var L=(K.x-D.x)*(K.x-D.x)+(K.y-D.y)*(K.y-D.y);if(null==E||L<E)C=K,E=L}}null!=C&&(D=C)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,z,C){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&null!=C.state&&(E=C.state.view.graph.replacePlaceholders(C.state.cell,+C=!1;E=[];for(var J=0;J<z.length-1;J++){for(var L=z[J+1],Q=z[J],N=[],U=z[J+2];J<z.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,U.x,U.y,L.x,L.y)<1*this.scale*this.scale;)L=U,J++,U=z[J+2];C=D(0,Q.x,Q.y)||C;for(var Y=0;Y<this.validEdges.length;Y++){var P=this.validEdges[Y],T=P.absolutePoints;if(null!=T&&mxUtils.intersects(w,P)&&"1"!=P.style.noJump){var K=null;for(P=0;P<T.length-1;P++){var V=T[P+1],Z=T[P];for(U=T[P+2];P<T.length-2&&mxUtils.ptSegDistSq(Z.x,Z.y,U.x,U.y,V.x,V.y)<1*this.scale*this.scale;)V=U,P++,+U=T[P+2];var ia=mxUtils.intersection(Q.x,Q.y,L.x,L.y,Z.x,Z.y,V.x,V.y);if(null!=ia&&(Math.abs(ia.x-Q.x)>G||Math.abs(ia.y-Q.y)>G)&&(Math.abs(ia.x-L.x)>G||Math.abs(ia.y-L.y)>G)&&(null==K||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,K.x,K.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,Z.x,Z.y)>G)&&(null==U||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,U.x,U.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,V.x,V.y)>G)){U=ia.x-Q.x;K=ia.y-Q.y;ia={distSq:U*U+K*K,x:ia.x,y:ia.y};for(U=0;U<N.length;U++)if(N[U].distSq>ia.distSq){N.splice(U,+0,ia);ia=null;break}null==ia||0!=N.length&&N[N.length-1].x===ia.x&&N[N.length-1].y===ia.y||N.push(ia)}K=Z}}}for(P=0;P<N.length;P++)C=D(1,N[P].x,N[P].y)||C}ia=z[z.length-1];C=D(0,ia.x,ia.y)||C}w.routedPoints=E;return C}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){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)g.apply(this,+arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),J=!0,L=null,Q=null,N=[],U=null;w.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var P=this.state.routedPoints[Y],T=new mxPoint(P.x/this.scale,P.y/this.scale);0==Y?T=z[0]:Y==this.state.routedPoints.length-1&&(T=z[z.length-1]);var K=!1;if(null!=+L&&1==P.type){var V=this.state.routedPoints[Y+1];P=V.x/this.scale-T.x;V=V.y/this.scale-T.y;P=P*P+V*V;null==U&&(U=new mxPoint(T.x-L.x,T.y-L.y),Q=Math.sqrt(U.x*U.x+U.y*U.y),0<Q?(U.x=U.x*D/Q,U.y=U.y*D/Q):U=null);P>D*D&&0<Q&&(P=L.x-T.x,V=L.y-T.y,P=P*P+V*V,P>D*D&&(K=new mxPoint(T.x-U.x,T.y-U.y),P=new mxPoint(T.x+U.x,T.y+U.y),N.push(K),this.addPoints(w,N,C,E,!1,null,J),N=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,J=!1,"sharp"==G?(w.lineTo(K.x-U.y*N,K.y+U.x*N),w.lineTo(P.x-U.y*N,P.y++U.x*N),w.lineTo(P.x,P.y)):"line"==G?(w.moveTo(K.x+U.y*N,K.y-U.x*N),w.lineTo(K.x-U.y*N,K.y+U.x*N),w.moveTo(P.x-U.y*N,P.y+U.x*N),w.lineTo(P.x+U.y*N,P.y-U.x*N),w.moveTo(P.x,P.y)):"arc"==G?(N*=1.3,w.curveTo(K.x-U.y*N,K.y+U.x*N,P.x-U.y*N,P.y+U.x*N,P.x,P.y)):(w.moveTo(P.x,P.y),J=!0),N=[P],K=!0))}else U=null;K||(N.push(T),L=T)}this.addPoints(w,N,C,E,!1,null,J);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,E){return null!=z&&"centerPerimeter"==+z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,z,C,E){if(null==z||null==w||"1"!=z.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{z=this.getTerminalPort(w,z,E);var D=this.getNextPoint(w,C,E),G=this.graph.isOrthogonal(w),J=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(z.getCenterX(),+z.getCenterY());if(0!=J){var Q=Math.cos(-J),N=Math.sin(-J);D=mxUtils.getRotatedPoint(D,Q,N,L)}Q=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);Q+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(z,D,0==J&&G,Q);0!=J&&(Q=Math.cos(J),N=Math.sin(J),D=mxUtils.getRotatedPoint(D,Q,N,L));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,z,C,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,z,+C,E,D){if(null!=z&&null!=w){w=this.graph.getAllConnectionConstraints(z);E=C=null;if(null!=w)for(var G=0;G<w.length;G++){var J=this.graph.getConnectionPoint(z,w[G]);if(null!=J){var L=(J.x-D.x)*(J.x-D.x)+(J.y-D.y)*(J.y-D.y);if(null==E||L<E)C=J,E=L}}null!=C&&(D=C)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,z,C){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&null!=C.state&&(E=C.state.view.graph.replacePlaceholders(C.state.cell,E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var z=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=z&&"string"===typeof z&&"stencil("==z.substring(0,8))try{var C=z.substring(8,z.length-1),E=mxUtils.parseXml(Graph.decompress(C));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var f=0;f<b.length;f++){var h=b[f];if(!mxStencilRegistry.isFileLoaded(h))if(mxStencilRegistry.setFileLoaded(h),".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,@@ -2903,7 +2903,7 @@ this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!return""!=q};mxCellEditor.prototype.insertTab=function(q){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);q=Graph.createTabNode(q);B.insertNode(q);B.setStartAfter(q);B.setEndAfter(q);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(q,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),M=null!=A&&mxEvent.isShiftDown(A);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(W){M||F||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(q)}F||document.execCommand("justify"+q.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var q=window.getSelection();if(q.getRangeAt&&q.rangeCount){for(var A=[],B=0,F=q.rangeCount;B<F;++B)A.push(q.getRangeAt(B));return A}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(q){try{if(q)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var A=0,B=q.length;A<B;++A)sel.addRange(q[A])}else document.selection&&q.select&&q.select()}catch(F){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=-function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var K=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?K.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;+function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?J.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(q,A){q=this.graph.getStartEditingCell(q,A);L.apply(this,arguments);var B=this.graph.view.getState(q);this.textarea.className=null!=B&&1==B.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(q)};mxCellEditor.prototype.toggleViewMode=function(){var q=this.graph.view.getState(this.editingCell);if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);A=mxUtils.getValue(q.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),M=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");@@ -2923,7 +2923,7 @@ function(q,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEthis.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(q,B)+", "+b(A,B);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&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Y=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(q,A){Y.apply(this,arguments);var B=this.graph.getCellStyle(q);if(null==B.childLayout){var F=this.graph.model.getParent(q),M=null!=F?this.graph.getCellGeometry(F):null;if(null!=M&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var R=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(F);M=M.clone();B?M.height=A.height+W.y+W.height+2*R:M.width=A.width+W.x+W.width+2*R;this.graph.model.setGeometry(F,M)}}};var P=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function q(ha){B.get(ha)||(B.put(ha,!0),M.push(ha))}for(var A=P.apply(this,arguments),B=new mxDictionary,F=this.graph.model,M=[],R=0;R<A.length;R++){var W=A[R];this.graph.isTableCell(W)?q(F.getParent(F.getParent(W))):this.graph.isTableRow(W)&&q(F.getParent(W));q(W)}return M};var T=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=-function(q){return T.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.getEvent())};var J=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return J.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=+function(q){return T.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.getEvent())};var K=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return K.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(q){var A=V.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var Z=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(q){var A=Z.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var q=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+q.x/2,this.bounds.y+this.rotationHandleVSpacing-q.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(q,A){return this.graph.isRecursiveVertexResize(q)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(q,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var ia=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ia.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 oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};@@ -3020,8 +3020,8 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.lenFormat.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,h){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",this.update);a.addListener("lockedChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.cursor="default";var f=document.createElement("div");f.className="geFormatSection";f.style.textAlign="center";f.style.fontWeight="bold";f.style.paddingTop="8px";f.style.fontSize="13px";f.style.borderWidth="0px 0px 1px 1px";f.style.borderStyle="solid";f.style.display="inline-block";-f.style.height="25px";f.style.overflow="hidden";f.style.width="100%";this.container.appendChild(e);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var h=a.getSelectionState(),d=h.containsLabel,g=null,m=null,p=mxUtils.bind(this,function(C,E,D,G){var K=mxUtils.bind(this,function(L){g!=C&&(d?this.labelIndex=D:b.isSelectionEmpty()?this.diagramIndex=D:this.currentIndex=D,null!=g&&(g.style.backgroundColor=Format.inactiveTabBackgroundColor,-g.style.borderBottomWidth="1px"),g=C,g.style.backgroundColor="",g.style.borderBottomWidth="0px",m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(C,"click",K);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(L){L.preventDefault()}));(G&&null==g||D==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&K()}),k=0;if(b.isSelectionEmpty()){mxUtils.write(f,mxResources.get("diagram"));f.style.borderLeftWidth=+f.style.height="25px";f.style.overflow="hidden";f.style.width="100%";this.container.appendChild(e);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var h=a.getSelectionState(),d=h.containsLabel,g=null,m=null,p=mxUtils.bind(this,function(C,E,D,G){var J=mxUtils.bind(this,function(L){g!=C&&(d?this.labelIndex=D:b.isSelectionEmpty()?this.diagramIndex=D:this.currentIndex=D,null!=g&&(g.style.backgroundColor=Format.inactiveTabBackgroundColor,+g.style.borderBottomWidth="1px"),g=C,g.style.backgroundColor="",g.style.borderBottomWidth="0px",m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(C,"click",J);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(L){L.preventDefault()}));(G&&null==g||D==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&J()}),k=0;if(b.isSelectionEmpty()){mxUtils.write(f,mxResources.get("diagram"));f.style.borderLeftWidth="0px";e.appendChild(f);h=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,h));this.container.appendChild(h);if(null!=Editor.styles){h.style.display="none";f.style.width=this.showCloseButton?"106px":"50%";f.style.cursor="pointer";f.style.backgroundColor=Format.inactiveTabBackgroundColor;var u=f.cloneNode(!1);u.style.borderLeftWidth="1px";u.style.borderRightWidth="1px";u.style.backgroundColor=Format.inactiveTabBackgroundColor;p(f,h,k++);var w=e.cloneNode(!1);w.style.display="none";mxUtils.write(u,mxResources.get("style"));e.appendChild(u);this.panels.push(new DiagramStylePanel(this,a,w));this.container.appendChild(w);p(u,w,k++)}this.showCloseButton&&(u=f.cloneNode(!1),u.style.borderLeftWidth="1px",u.style.borderRightWidth="1px",u.style.borderBottomWidth="1px",u.style.backgroundColor=Format.inactiveTabBackgroundColor,u.style.position="absolute",u.style.display="flex",u.style.right="0px",u.style.top="0px",u.style.width="25px",u.style.padding="0px",u.style.height="33px",u.style.alignItems="center",u.style.justifyContent="center",p=document.createElement("img"),p.className="geAdaptiveAsset",p.setAttribute("border","0"),p.setAttribute("src",Editor.crossImage),p.setAttribute("title",mxResources.get("hide")),p.style.width="16px",p.style.height="16px",p.style.opacity=.5,u.appendChild(p),mxEvent.addListener(p,"click",function(){a.actions.get("format").funct()}),e.appendChild(u))}else if(b.isEditing())mxUtils.write(f,mxResources.get("text")),e.appendChild(f),f.style.borderLeftStyle="none",this.panels.push(new TextFormatPanel(this,@@ -3029,8 +3029,8 @@ a,e));else{f.style.backgroundColor=Format.inactiveTabBackgroundColor;f.style.bor"none",this.panels.push(new StyleFormatPanel(this,a,w)),this.container.appendChild(w),p(f,w,k++));mxUtils.write(u,mxResources.get("text"));e.appendChild(u);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new TextFormatPanel(this,a,f));this.container.appendChild(f);mxUtils.write(z,mxResources.get("arrange"));e.appendChild(z);e=e.cloneNode(!1);e.style.display="none";this.panels.push(new ArrangePanel(this,a,e));this.container.appendChild(e);0<h.cells.length?p(u,f,k+1):u.style.display="none";p(z,e,k++,!0)}}};BaseFormatPanel=function(a,b,e){this.format=a;this.editorUi=b;this.container=e;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="transparent";BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,h,d,g,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;h=null!=h?h:999;var w=null,z=!1,C=null,E=mxUtils.bind(this,function(D){var G=m?parseFloat(a.value):parseInt(a.value);p&&(G=this.fromUnit(G));if(G!=C){C=G;isNaN(G)||b!=mxConstants.STYLE_ROTATION||(G=mxUtils.mod(Math.round(100*G),36E3)/100);G=Math.min(h,Math.max(f,isNaN(G)?e:G));if(u.cellEditor.isContentEditing()&&g)z||(z=!0,null!=w&&(u.cellEditor.restoreSelection(w),-w=null),g(G),a.value=(p?this.inUnit(G):G)+d,z=!1);else if(G!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var K=k.getSelectionState().cells;u.setCellStyles(b,G,K);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(K,function(Q){Q.removeAttribute("size");Q.style.fontSize="";""==Q.getAttribute("style")&&Q.removeAttribute("style")});for(var L=0;L<K.length;L++)0==u.model.getChildCount(K[L])&&u.autoSizeCell(K[L],!1);k.fireEvent(new mxEventObject("styleChanged",-"keys",[b],"values",[G],"cells",K))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(G):G)+d}mxEvent.consume(D)});g&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};+w=null),g(G),a.value=(p?this.inUnit(G):G)+d,z=!1);else if(G!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var J=k.getSelectionState().cells;u.setCellStyles(b,G,J);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(J,function(Q){Q.removeAttribute("size");Q.style.fontSize="";""==Q.getAttribute("style")&&Q.removeAttribute("style")});for(var L=0;L<J.length;L++)0==u.model.getChildCount(J[L])&&u.autoSizeCell(J[L],!1);k.fireEvent(new mxEventObject("styleChanged",+"keys",[b],"values",[G],"cells",J))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(G):G)+d}mxEvent.consume(D)});g&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 8px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b};BaseFormatPanel.prototype.addAction=function(a,b){var e=this.editorUi.actions.get(b);b=null;null!=e&&e.isEnabled()&&(b=mxUtils.button(e.label,mxUtils.bind(this,function(f){try{e.funct(f,f)}catch(h){this.editorUi.handleError(h)}})),b.setAttribute("title",e.label+(null!=e.shortcut?" ("+e.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b));return b};BaseFormatPanel.prototype.addActions=function(a,b){for(var e=null,f=null,h=0,d=0;d<b.length;d++){var g=this.addAction(a,b[d]);null!=g&&(h++,0==mxUtils.mod(h,2)&&(f.style.marginRight="2px",f.style.width="104px",g.style.width="104px",e.parentNode.removeChild(e)),e=mxUtils.br(a),f=g)}return h};@@ -3043,11 +3043,11 @@ m.style.overflow="hidden";m.style.maxWidth="75%";m.style.userSelect="none";mxUtiBaseFormatPanel.prototype.createCellOption=function(a,b,e,f,h,d,g,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;h=null!=h?"null"==h?null:h:0;var w=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=h},function(z){m&&u.stopEditing();if(null!=g)g.funct();else{u.getModel().beginUpdate();try{var C=null!=p?p:k.getSelectionState().cells;z=z?f:h;u.setCellStyles(b,z,C);null!=d&&d(C,z);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[z],"cells",C))}finally{u.getModel().endUpdate()}}},{install:function(z){this.listener=function(){z(mxUtils.getValue(w,b,e)!=h)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,h,d,g,m,p,k){function u(P,T){"default"!=P||T||(P=m);"default"!=P&&p&&(P=mxUtils.getLightDarkColor(P),P=k()?P.dark:P.light);return P}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.style.padding="3px 0px 3px 0px";C.style.whiteSpace="nowrap";C.style.overflow="hidden";C.style.width="200px";C.style.height="18px";var E=document.createElement("input");E.setAttribute("type","checkbox");-E.style.margin="1px 6px 0px 0px";E.style.verticalAlign="top";g||C.appendChild(E);var D=document.createElement("span");D.style.verticalAlign="top";mxUtils.write(D,a);C.appendChild(D);var G=b(),K=!1,L=null,Q=null,N=document.createElement("input");N.setAttribute("type","color");N.style.position="relative";N.style.visibility="hidden";N.style.top="10px";N.style.width="0px";N.style.height="0px";N.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(L=document.createElement("img"),L.src=-Editor.colorDropperImage,L.className="geColorDropper geAdaptiveAsset",L.style.position="relative",L.style.right="-20px",L.style.top="-1px",L.style.width="auto",L.style.height="14px",mxEvent.addListener(L,"click",function(P){N.value=u(G);N.click();mxEvent.consume(P)}));var U=null,Y=function(P,T){K||(K=!0,null!=d&&d(P),T||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(P)),G=b(),P=mxUtils.getLightDarkColor("default"!=G?G:m),T=document.createElement("div"),T.style.width="21px",T.style.height="12px",+E.style.margin="1px 6px 0px 0px";E.style.verticalAlign="top";g||C.appendChild(E);var D=document.createElement("span");D.style.verticalAlign="top";mxUtils.write(D,a);C.appendChild(D);var G=b(),J=!1,L=null,Q=null,N=document.createElement("input");N.setAttribute("type","color");N.style.position="relative";N.style.visibility="hidden";N.style.top="10px";N.style.width="0px";N.style.height="0px";N.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(L=document.createElement("img"),L.src=+Editor.colorDropperImage,L.className="geColorDropper geAdaptiveAsset",L.style.position="relative",L.style.right="-20px",L.style.top="-1px",L.style.width="auto",L.style.height="14px",mxEvent.addListener(L,"click",function(P){N.value=u(G);N.click();mxEvent.consume(P)}));var U=null,Y=function(P,T){J||(J=!0,null!=d&&d(P),T||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(P)),G=b(),P=mxUtils.getLightDarkColor("default"!=G?G:m),T=document.createElement("div"),T.style.width="21px",T.style.height="12px",T.style.margin="2px 18px 2px 3px",T.style.borderWidth="1px",T.style.borderStyle="solid",T.style.backgroundColor=P.cssText,Q.innerText="",Q.appendChild(T),!p&&mxUtils.isLightDarkColor(G)&&P.light!=P.dark?T.style.background="linear-gradient(to right bottom, "+P.cssText+" 50%, "+mxUtils.invertLightDarkColor(P).cssText+" 50.3%)":p&&w&&(T.style.backgroundColor=k()?P.dark:P.light),null!=L?(T.style.width="21px",T.style.margin="2px 18px 2px 3px",T.appendChild(L)):(T.style.width="36px",T.style.margin="3px"),null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(P="#"==G.charAt(0)?G.substring(1).toUpperCase():G,P=ColorDialog.prototype.colorNames[P],null!=P?Q.setAttribute("title",P):"default"==G?Q.setAttribute("title",mxResources.get("useBlackAndWhite")):Q.setAttribute("title",G)),null==G||G==mxConstants.NONE||z.isSpecialColor(G)?(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1):(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0),Q.style.display=E.checked||g?"":-"none",K=!1)};C.appendChild(N);mxEvent.addListener(N,"change",function(){var P=N.value;if(!p){var T=mxUtils.getLightDarkColor(G);k()?T.dark=P:T.light=P;P="light-dark("+T.light+", "+T.dark+")"}Y(P)});Q=mxUtils.button("",mxUtils.bind(this,function(P){var T=m;p&&k()&&mxUtils.isLightDarkColor(T)&&(T=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(G,!0),function(J){Y(J)},"default"==f?"default":null,T,p);mxEvent.consume(P)}));Q.style.position="absolute";Q.style.marginTop="-3px";Q.style.left=+"none",J=!1)};C.appendChild(N);mxEvent.addListener(N,"change",function(){var P=N.value;if(!p){var T=mxUtils.getLightDarkColor(G);k()?T.dark=P:T.light=P;P="light-dark("+T.light+", "+T.dark+")"}Y(P)});Q=mxUtils.button("",mxUtils.bind(this,function(P){var T=m;p&&k()&&mxUtils.isLightDarkColor(T)&&(T=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(G,!0),function(K){Y(K)},"default"==f?"default":null,T,p);mxEvent.consume(P)}));Q.style.position="absolute";Q.style.marginTop="-3px";Q.style.left="178px";Q.style.height="22px";Q.className="geColorBtn";Q.style.display=E.checked||g?"":"none";C.appendChild(Q);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&Q.setAttribute("title",a);g||(mxEvent.addListener(C,"click",function(P){P=mxEvent.getSource(P);if(P==E||"INPUT"!=P.nodeName)P!=E&&(E.checked=!E.checked),E.checked||null==G||G==mxConstants.NONE||f==mxConstants.NONE||(f=u(G)),Y(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,mxUtils.bind(this,function(P){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(P){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})));Y(G,!0);null!=h&&h.install(function(){Y(G,!0)},this.listeners.push(h));return C};BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,h,d){var g=this.editorUi,m=g.editor.graph;return this.createColorOption(a,function(){var p=m.getCellStyle(m.getSelectionCell(),!1);return null!=p?p[b]:null},function(p){m.getModel().beginUpdate();try{var k=g.getSelectionState().cells;m.setCellStyles(b,p,k);null!=h&&h(p);g.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[p],"cells",k))}finally{m.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(p){this.listener=@@ -3092,14 +3092,14 @@ ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.edk=this.addUnitInput(g,this.getUnit(),16,52,function(){E.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),u=document.createElement("div");u.className="geAdaptiveAsset";u.style.backgroundImage="url("+Editor.autosizeImage+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="18px 18px";u.style.width="21px";u.style.height="21px";u.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");u.style.position="relative";u.style.cursor="pointer";u.style.marginTop="-3px";u.style.border="0px";u.style.left="42px";mxUtils.setOpacity(u,50);mxEvent.addListener(u,"mouseenter",function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){mxUtils.setOpacity(u,50)});mxEvent.addListener(u,"click",function(){e.actions.get("autosize").funct()});g.appendChild(u);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(g,mxResources.get("width"),87,64);this.addLabel(g,mxResources.get("height"),16,64);mxUtils.br(g);m=document.createElement("div");m.style.paddingTop="8px";m.style.paddingRight="20px";m.style.whiteSpace="nowrap";m.style.textAlign="right";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.style.width="210px";m.appendChild(w);d.cell||d.row?u.style.visibility="hidden":g.appendChild(m);var z=w.getElementsByTagName("input")[0];this.addKeyHandler(p,Y);this.addKeyHandler(k,-Y);var C=this.addGeometryHandler(p,function(J,V,Z){V=Math.max(1,b.fromUnit(V));if(f.isTableCell(Z))return f.setTableColumnWidth(Z,V-J.width,!0),!0;0<J.width&&(z.checked&&(J.height=Math.round(J.height*V*100/J.width)/100),J.width=V)});var E=this.addGeometryHandler(k,function(J,V,Z){V=Math.max(1,b.fromUnit(V));f.isTableCell(Z)&&(Z=h.getParent(Z));if(f.isTableRow(Z))return f.setTableRowHeight(Z,V-J.height),!0;0<J.height&&(z.checked&&(J.width=Math.round(J.width*V*100/J.height)/100),J.height=V)});(d.resizable||-d.row||d.cell)&&a.appendChild(g);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var G=this.addUnitInput(D,this.getUnit(),87,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),K=this.addUnitInput(D,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),-null,null,this.isFloatUnit());mxUtils.br(D);w=!0;var L=null,Q=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var N=f.getCellGeometry(d.vertices[0]);if(null!=N&&N.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);L=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*N.x)/10},function(J){J=parseFloat(J);if(!isNaN(J)){h.beginUpdate();-try{N=N.clone(),N.x=parseFloat(J)/100,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}}});if(h.isEdge(h.getParent(d.vertices[0]))){w=!1;var U=null;Q=this.addUnitInput(D,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(Q,function(J,V){J.y=b.fromUnit(V)})}else Q=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*N.y)/10},function(J){J=parseFloat(J);if(!isNaN(J)){h.beginUpdate();try{N=N.clone(),N.y=parseFloat(J)/100,h.setGeometry(d.vertices[0],-N)}finally{h.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(w?"left":"line"),87,64).style.marginTop="8px";this.addLabel(D,mxResources.get(w?"top":"orthogonal"),16,64).style.marginTop="8px";var Y=mxUtils.bind(this,function(J,V,Z){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)g.style.display="none";else{g.style.display="";if(Z||document.activeElement!=p)p.value=this.inUnit(d.width)+" "+this.getUnit();-if(Z||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){J=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Z||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(Z||document.activeElement!=K)K.value=this.inUnit(d.y)+" "+this.getUnit();null!=J&&J.relative&&(null==L||!Z&&document.activeElement==L||(L.value=Math.round(1E3*J.x)/10+" %"),null==Q||!Z&&document.activeElement==-Q||(h.isEdge(h.getParent(d.vertices[0]))?Q.value=this.inUnit(J.y)+" "+this.getUnit():Q.value=Math.round(1E3*J.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){h.removeListener(Y)}});h.addListener(mxEvent.CHANGE,Y);this.addKeyHandler(G,Y);this.addKeyHandler(K,Y);Y();var P=this.addGeometryHandler(G,function(J,V){V=b.fromUnit(V);J.relative?(J.offset=null!=J.offset?J.offset:new mxPoint,J.offset.x=V):J.x=V});var T=this.addGeometryHandler(K,function(J,V){V=b.fromUnit(V);-J.relative?(J.offset=null!=J.offset?J.offset:new mxPoint,J.offset.y=V):J.y=V});d.movable&&(0==d.edges.length&&1==d.vertices.length&&h.isEdge(h.getParent(d.vertices[0]))&&(N=f.getCellGeometry(d.vertices[0]),null!=N&&N.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(J){h.beginUpdate();try{N=N.clone(),N.x=0,N.y=0,N.offset=new mxPoint,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),m.style.width="134px",m.style.left=+Y);var C=this.addGeometryHandler(p,function(K,V,Z){V=Math.max(1,b.fromUnit(V));if(f.isTableCell(Z))return f.setTableColumnWidth(Z,V-K.width,!0),!0;0<K.width&&(z.checked&&(K.height=Math.round(K.height*V*100/K.width)/100),K.width=V)});var E=this.addGeometryHandler(k,function(K,V,Z){V=Math.max(1,b.fromUnit(V));f.isTableCell(Z)&&(Z=h.getParent(Z));if(f.isTableRow(Z))return f.setTableRowHeight(Z,V-K.height),!0;0<K.height&&(z.checked&&(K.width=Math.round(K.width*V*100/K.height)/100),K.height=V)});(d.resizable||+d.row||d.cell)&&a.appendChild(g);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var G=this.addUnitInput(D,this.getUnit(),87,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),J=this.addUnitInput(D,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),+null,null,this.isFloatUnit());mxUtils.br(D);w=!0;var L=null,Q=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var N=f.getCellGeometry(d.vertices[0]);if(null!=N&&N.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);L=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*N.x)/10},function(K){K=parseFloat(K);if(!isNaN(K)){h.beginUpdate();+try{N=N.clone(),N.x=parseFloat(K)/100,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}}});if(h.isEdge(h.getParent(d.vertices[0]))){w=!1;var U=null;Q=this.addUnitInput(D,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(Q,function(K,V){K.y=b.fromUnit(V)})}else Q=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*N.y)/10},function(K){K=parseFloat(K);if(!isNaN(K)){h.beginUpdate();try{N=N.clone(),N.y=parseFloat(K)/100,h.setGeometry(d.vertices[0],+N)}finally{h.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(w?"left":"line"),87,64).style.marginTop="8px";this.addLabel(D,mxResources.get(w?"top":"orthogonal"),16,64).style.marginTop="8px";var Y=mxUtils.bind(this,function(K,V,Z){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)g.style.display="none";else{g.style.display="";if(Z||document.activeElement!=p)p.value=this.inUnit(d.width)+" "+this.getUnit();+if(Z||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){K=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Z||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(Z||document.activeElement!=J)J.value=this.inUnit(d.y)+" "+this.getUnit();null!=K&&K.relative&&(null==L||!Z&&document.activeElement==L||(L.value=Math.round(1E3*K.x)/10+" %"),null==Q||!Z&&document.activeElement==+Q||(h.isEdge(h.getParent(d.vertices[0]))?Q.value=this.inUnit(K.y)+" "+this.getUnit():Q.value=Math.round(1E3*K.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){h.removeListener(Y)}});h.addListener(mxEvent.CHANGE,Y);this.addKeyHandler(G,Y);this.addKeyHandler(J,Y);Y();var P=this.addGeometryHandler(G,function(K,V){V=b.fromUnit(V);K.relative?(K.offset=null!=K.offset?K.offset:new mxPoint,K.offset.x=V):K.x=V});var T=this.addGeometryHandler(J,function(K,V){V=b.fromUnit(V);+K.relative?(K.offset=null!=K.offset?K.offset:new mxPoint,K.offset.y=V):K.y=V});d.movable&&(0==d.edges.length&&1==d.vertices.length&&h.isEdge(h.getParent(d.vertices[0]))&&(N=f.getCellGeometry(d.vertices[0]),null!=N&&N.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(K){h.beginUpdate();try{N=N.clone(),N.x=0,N.y=0,N.offset=new mxPoint,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),m.style.width="134px",m.style.left="89px",m.style.position="absolute",mxUtils.br(D),mxUtils.br(D),D.appendChild(m))),a.appendChild(D))};ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+g.getUnit();else if(p!=d){h.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(h.getModel().isVertex(k[u])){var w=h.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,p,k[u]))){var z=h.view.getState(k[u]);null!=z&&h.isRecursiveVertexResize(z)&&h.resizeChildCells(k[u],w);h.getModel().setGeometry(k[u],w);h.constrainChildCells(k[u])}}}finally{h.getModel().endUpdate()}d=p;a.value=p+" "+g.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,h=f.editor.graph,d=null,g=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};@@ -3107,11 +3107,11 @@ ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(g){if(""!"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,h=e.getSelectionState(),d=this.createPanel(),g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("width"));d.appendChild(g);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(N){var U=parseInt(m.value);U=Math.min(999,Math.max(1,isNaN(U)?1:U));if(U!=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Y=e.getSelectionState().cells;f.setCellStyles("width",U,Y);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[U],"cells",Y))}m.value=U+" pt";mxEvent.consume(N)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";g=document.createElement("div");g.style.position=-"absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("linestart"));k.appendChild(g);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){K.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);+"absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("linestart"));k.appendChild(g);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){J.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);this.addKeyHandler(u,D);this.addKeyHandler(w,D);var z=this.createPanel();z.style.paddingBottom="30px";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("lineend"));z.appendChild(g);var C=this.addUnitInput(z,this.getUnit(),87,52,function(){L.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(z,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(N,U,Y){h=e.getSelectionState();N=h.cells[0];if("link"==h.style.shape||"flexArrow"==h.style.shape){if(d.style.display="",Y||document.activeElement!=m)Y=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=Y+" pt"}else d.style.display="none";1==h.cells.length&&f.model.isEdge(N)?(Y=f.model.getGeometry(N),null!=Y&&null!=Y.sourcePoint&&null==f.model.getTerminal(N,!0)?(u.value=this.inUnit(Y.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(Y.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=Y&&null!=Y.targetPoint&&null==f.model.getTerminal(N,!1)?(C.value=this.inUnit(Y.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(Y.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=-"none")});var G=this.addEdgeGeometryHandler(u,function(N,U){N.sourcePoint.x=b.fromUnit(U)});var K=this.addEdgeGeometryHandler(w,function(N,U){N.sourcePoint.y=b.fromUnit(U)});var L=this.addEdgeGeometryHandler(C,function(N,U){N.targetPoint.x=b.fromUnit(U)});var Q=this.addEdgeGeometryHandler(E,function(N,U){N.targetPoint.y=b.fromUnit(U)});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D()};+"none")});var G=this.addEdgeGeometryHandler(u,function(N,U){N.sourcePoint.x=b.fromUnit(U)});var J=this.addEdgeGeometryHandler(w,function(N,U){N.sourcePoint.y=b.fromUnit(U)});var L=this.addEdgeGeometryHandler(C,function(N,U){N.targetPoint.x=b.fromUnit(U)});var Q=this.addEdgeGeometryHandler(E,function(N,U){N.targetPoint.y=b.fromUnit(U)});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D()};TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container);this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){a.style.paddingTop="8px";a.style.paddingBottom="6px";0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};TextFormatPanel.prototype.addFont=function(a){function b(q){q=null!=q?q.fontSize:null;return null!=q&&"px"==q.substring(q.length-2)?parseFloat(q):mxConstants.DEFAULT_FONTSIZE}function e(q,A){if(null!=q&&""!=q.textContent){q.style.lineHeight="";var B=mxUtils.getCurrentStyle(q);parseFloat(B.fontSize)*A/100!=parseFloat(B.lineHeight)?q.style.lineHeight=A+"%":""==q.getAttribute("style")&&q.removeAttribute("style")}}function f(q,A){A?q.classList.add("geActiveItem"):q.classList.remove("geActiveItem")}var h=this.editorUi,d=h.editor.graph,g=h.getSelectionState(),m=this.createTitle(mxResources.get("font"));m.style.paddingLeft="14px";m.style.paddingTop="10px";m.style.paddingBottom="6px";a.appendChild(m);m=this.createPanel();m.style.paddingTop="2px";m.style.paddingBottom="2px";m.style.position="relative";m.style.marginLeft="-2px";m.style.borderWidth="0px";m.className="geToolbarContainer";if(d.cellEditor.isContentEditing()){var p=m.cloneNode(),k=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),@@ -3120,12 +3120,12 @@ this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"font"underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");w[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var z=this.editorUi.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);this.styleButtons(w);this.styleButtons([z]);var C=m.cloneNode(!1);C.style.height="31px";C.style.paddingTop="2px";C.style.marginLeft="-3px";C.style.paddingBottom="0px";var E=function(q){return function(){return q()}},D=this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),C),G=this.editorUi.toolbar.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],-[mxConstants.ALIGN_CENTER])),C),K=this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);this.styleButtons([D,G,K]);if(d.cellEditor.isContentEditing()){var L=+[mxConstants.ALIGN_CENTER])),C),J=this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);this.styleButtons([D,G,J]);if(d.cellEditor.isContentEditing()){var L=this.editorUi.toolbar.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([L])}var Q=this.editorUi.toolbar.addButton(Editor.alignTopImage,mxResources.get("top"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),N=this.editorUi.toolbar.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],-[mxConstants.ALIGN_MIDDLE])),C),U=this.editorUi.toolbar.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);this.styleButtons([Q,N,U]);a.appendChild(C);var Y,P,T,J,V;if(d.cellEditor.isContentEditing()){Q.style.display="none";N.style.display="none";U.style.display="none";z.style.display="none";var Z=this.editorUi.toolbar.addButton(Editor.alignJustifyImage,mxResources.get("block"),+[mxConstants.ALIGN_MIDDLE])),C),U=this.editorUi.toolbar.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);this.styleButtons([Q,N,U]);a.appendChild(C);var Y,P,T,K,V;if(d.cellEditor.isContentEditing()){Q.style.display="none";N.style.display="none";U.style.display="none";z.style.display="none";var Z=this.editorUi.toolbar.addButton(Editor.alignJustifyImage,mxResources.get("block"),function(){1==Z.style.opacity&&document.execCommand("justifyfull",!1,null)},C);Z.style.marginRight="9px";this.styleButtons([Z,Y=this.editorUi.toolbar.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C),P=this.editorUi.toolbar.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C)]);Y.style.marginLeft="10px";E=C.cloneNode(!1);E.style.paddingTop="4px";C=[this.editorUi.toolbar.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.outdentImage,-mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),this.editorUi.toolbar.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];this.styleButtons(C);C[C.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",K.style.marginRight="12px";C=m.cloneNode(!1);+mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),this.editorUi.toolbar.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];this.styleButtons(C);C[C.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",J.style.marginRight="12px";C=m.cloneNode(!1);C.removeAttribute("class");C.style.marginLeft="0px";C.style.paddingTop="8px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("position"));var ia=document.createElement("select");ia.style.position="absolute";ia.style.left="126px";ia.style.width="98px";ia.style.borderWidth="1px";ia.style.borderStyle="solid";ia.style.marginTop="-3px";var oa="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),sa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<oa.length;E++){var O=document.createElement("option");O.setAttribute("value",oa[E]);mxUtils.write(O,@@ -3140,44 +3140,44 @@ d.shapeBackgroundColor||ea==Pa?"default":ea},function(q){null!=d.cellEditor.textfunction(){return qa},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",g.cells)))},"default",{install:function(q){ra=q},destroy:function(){ra=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(q){ma.style.display=q==mxConstants.NONE?"none":"";Ba.style.display=ma.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,g.cells);d.updateLabelElements(g.cells,function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";p.appendChild(k);p.appendChild(ma);k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(Ba),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";k=d.filterSelectionCells(mxUtils.bind(this,function(q){var A=d.view.getState(q);return null==-A||d.isAutoSizeState(A)||d.getModel().isEdge(q)||!d.isTableRow(q)&&!d.isTableCell(q)&&!d.isCellResizable(q)}));C=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);C.style.fontWeight="bold";0<k.length&&p.appendChild(C);k=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,h.actions.get("formattedText"));k.style.fontWeight="bold";p.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom=-"28px";k.style.fontWeight="normal";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var Ca=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);-this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Ia=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Da=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ga=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());-mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ta=null,La=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(q){var A=""==q.value?120:parseInt(q.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ta&&(d.cellEditor.restoreSelection(ta),ta=null);var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&-B==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&d.cellEditor.textarea.firstChild.nodeType!=mxConstants.NODETYPE_ELEMENT&&1==d.cellEditor.textarea.children.length){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var M=F.getRangeAt(0);B=document.createElement("div");B.appendChild(M.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();M=new Range;M.selectNodeContents(B);F.addRange(M)}}if(null!=B)for(B!=d.cellEditor.textarea&&-e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),M=0;M<B.length;M++)F.containsNode(B[M],!0)&&e(B[M],A)}q.value=A+" %"},function(q){La=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);p.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link",-"image"],p,!0,[Editor.linkImage,Editor.imageImage]);C=[this.editorUi.toolbar.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},p),this.editorUi.toolbar.addMenuFunctionInContainer(p,Editor.tableImage,mxResources.get("table"),!1,mxUtils.bind(this,function(q){this.editorUi.menus.addInsertTableItem(q,null,null,!1)}))];this.styleButtons(k);this.styleButtons(C);k=this.createPanel();k.style.height="57px";k.style.paddingTop=-"10px";k.style.paddingBottom="8px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(p);a.appendChild(k);k=m.cloneNode(!1);k.style.height="33px";k.style.paddingLeft="0px";C=[this.editorUi.toolbar.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=J?J.cellIndex:0)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),-mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=J?J.cellIndex+1:-1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=T&&null!=J&&d.deleteColumn(T,J.cellIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),-k),this.editorUi.toolbar.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex+1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.deleteRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k)];this.styleButtons(C);C[2].style.marginRight="10px";p=this.createPanel();-p.style.paddingTop="10px";p.style.paddingBottom="10px";p.appendChild(this.createTitle(mxResources.get("table")));p.appendChild(k);m=m.cloneNode(!1);m.style.height="33px";m.style.padding="0";C=[this.editorUi.toolbar.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(q){if(null!=T){var A=T.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+-("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==J||null!=q&&mxEvent.isShiftDown(q)?T:J;d.processElements(F,function(M){M.style.border=null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),this.editorUi.toolbar.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=-T){var A=T.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==J||null!=q&&mxEvent.isShiftDown(q)?T:J;d.processElements(F,function(M){M.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),this.editorUi.toolbar.addButton(Editor.spacingImage,-mxResources.get("spacing"),function(){if(null!=T){var q=T.getAttribute("cellPadding")||0;q=new FilenameDialog(h,q,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?T.setAttribute("cellPadding",A):T.removeAttribute("cellPadding")}),mxResources.get("spacing"));h.showDialog(q.container,300,80,!0,!0);q.init()}},m),this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},m),this.editorUi.toolbar.addButton(Editor.alignCenterImage,-mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},m),this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},m)];this.styleButtons(C);C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Xa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],-"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Ya=mxUtils.bind(this,function(q,A,B){g=h.getSelectionState();q=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);f(z,"0"==mxUtils.getValue(g.style,-mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ca.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(G,q==mxConstants.ALIGN_CENTER);f(K,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(Q,q==mxConstants.ALIGN_TOP);-f(N,q==mxConstants.ALIGN_MIDDLE);f(U,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ia.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":-q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?-X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ja.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ca.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ga)q=parseFloat(mxUtils.getValue(g.style,-mxConstants.STYLE_SPACING_RIGHT,0)),Ga.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Da)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Da.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var cb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),-null,this.isFloatUnit(),!0);var fb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ga,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Da,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),-!0);this.addKeyHandler(ca,Ya);this.addKeyHandler(Ja,Ya);this.addKeyHandler(Ca,Ya);this.addKeyHandler(Ga,Ya);this.addKeyHandler(Da,Ya);this.addKeyHandler(Ia,Ya);d.getModel().addListener(mxEvent.CHANGE,Ya);this.listeners.push({destroy:function(){d.getModel().removeListener(Ya)}});Ya();if(d.cellEditor.isContentEditing()){var ib=null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=-function(ya,Ha){if(null!=ya&&null!=Ha){if(ya==Ha)return!0;if(ya.length>Ha.length+1)return ya.substring(ya.length-Ha.length-1,ya.length)=="-"+Ha}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Ha=q;null!=Ha&&1==Ha.childNodes.length;)if(Ha=Ha.childNodes[0],Ha.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},M=mxUtils.getCurrentStyle(q),-R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,W=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(M);if(window.getSelection)for(var ha=q.getElementsByTagName("*"),fa=window.getSelection(),ja=0;ja<ha.length&&(!fa.containsNode(ha[ja],!0)||(null==W&&""!=ha[ja].style.fontSize&&(W=parseFloat(ha[ja].style.fontSize)),null==R&&""!=ha[ja].style.lineHeight&&(R=ha[ja].style.lineHeight),null==W||null==R));ja++);null==W&&(W=b(M));if(null==R)for(ha=q;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=-ha.style&&""!=ha.style.lineHeight){R=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=M){f(w[0],"bold"==M.fontWeight||400<M.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==M.fontStyle||B("I")||B("EM"));f(w[2],"underline"==M.textDecorationLine||B("U"));f(L,"line-through"==M.textDecorationLine||B("STRIKE"));f(P,B("SUP"));f(Y,B("SUB"));var va=F(q);if(null!=va){B=function(ya,Ha){Na.push({name:ya,dispName:Ha,type:"string",getValue:function(){return Ma[ya]},valueChanged:function(wa,ua){var Va=va.style,-Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Va[ya]=Qa;""==wa&&null!=ua&&(ua.value=Ma[ya])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,g,!0);null!=ib?ib.parentNode.replaceChild(B,ib):a.appendChild(B);-ib=B}d.cellEditor.isTableSelected()?(f(Z,A(M.textAlign,"justify")),f(D,A(M.textAlign,"left")),f(G,A(M.textAlign,"center")),f(K,A(M.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(M.textAlign,"justify")?(f(Z,A(M.textAlign,"justify")),f(D,!1),f(G,!1),f(K,!1)):(f(Z,!1),f(D,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(K,B==mxConstants.ALIGN_RIGHT)));T=d.getParentByName(q,"TABLE",d.cellEditor.textarea);V=null==T?-null:d.getParentByName(q,"TR",T);J=null==T?null:d.getParentByNames(q,["TD","TH"],T);Xa.style.display=null!=T?"":"none";document.activeElement!=ca&&(ca.value=isNaN(W)?"":W+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?La.value=R.replace("%"," %"):(A=parseFloat(R),isNaN(A)?La.value="120 %":La.value=Math.round(100*A)+" %"));null!=ra&&(qa=d.getTextColor(q,!0),ra(qa,!0));null!=H&&(ea=d.getTextColor(q,!1),H(ea,!0));null!=u.firstChild&&(u.firstChild.nodeValue=mxUtils.getCssFontFamily(M.fontFamily))}}eb=-!1}),0))});(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",m);mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};-mxUtils.extend(StyleFormatPanel,BaseFormatPanel);+A||d.getModel().isEdge(q)||d.isAutoSizeState(A)}));C=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);C.style.fontWeight="bold";0<k.length&&p.appendChild(C);k=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,h.actions.get("formattedText"));k.style.fontWeight="bold";p.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";C=document.createElement("div");+C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var Ca=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),+16,64);mxUtils.br(k);mxUtils.br(k);var Ia=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Da=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ga=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,+mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ta=null,La=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(q){var A=""==q.value?120:parseInt(q.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ta&&(d.cellEditor.restoreSelection(ta),ta=null);var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&B==d.cellEditor.textarea){var F=window.getSelection();if(F.getRangeAt&&+0<F.rangeCount){var M=F.getRangeAt(0);B=document.createElement("div");B.appendChild(M.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();M=new Range;M.selectNodeContents(B);F.addRange(M)}}if(null!=B)for(B!=d.cellEditor.textarea&&e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),M=0;M<B.length;M++)F.containsNode(B[M],!0)&&e(B[M],A)}q.value=A+" %"},function(q){La=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==+d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);p.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link","image"],p,!0,[Editor.linkImage,Editor.imageImage]);C=[this.editorUi.toolbar.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",+!1)},p),this.editorUi.toolbar.addMenuFunctionInContainer(p,Editor.tableImage,mxResources.get("table"),!1,mxUtils.bind(this,function(q){this.editorUi.menus.addInsertTableItem(q,null,null,!1)}))];this.styleButtons(k);this.styleButtons(C);k=this.createPanel();k.style.height="57px";k.style.paddingTop="10px";k.style.paddingBottom="8px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(p);a.appendChild(k);k=m.cloneNode(!1);k.style.height="33px";k.style.paddingLeft="0px";C=[this.editorUi.toolbar.addButton(Editor.addColumnLeftImage,+mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=K?K.cellIndex:0)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=K?K.cellIndex+1:-1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=+T&&null!=K&&d.deleteColumn(T,K.cellIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex+1)}catch(q){this.editorUi.handleError(q)}}),+k),this.editorUi.toolbar.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.deleteRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k)];this.styleButtons(C);C[2].style.marginRight="10px";p=this.createPanel();p.style.paddingTop="10px";p.style.paddingBottom="10px";p.appendChild(this.createTitle(mxResources.get("table")));p.appendChild(k);m=m.cloneNode(!1);m.style.height="33px";m.style.padding="0";C=[this.editorUi.toolbar.addButton(Editor.strokeColorImage,+mxResources.get("borderColor"),mxUtils.bind(this,function(q){if(null!=T){var A=T.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==K||null!=q&&mxEvent.isShiftDown(q)?T:K;d.processElements(F,function(M){M.style.border=null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),+F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),this.editorUi.toolbar.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=T){var A=T.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});+this.editorUi.pickColor(A,function(B){var F=null==K||null!=q&&mxEvent.isShiftDown(q)?T:K;d.processElements(F,function(M){M.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),this.editorUi.toolbar.addButton(Editor.spacingImage,mxResources.get("spacing"),function(){if(null!=T){var q=T.getAttribute("cellPadding")||0;q=new FilenameDialog(h,q,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?T.setAttribute("cellPadding",A):T.removeAttribute("cellPadding")}),+mxResources.get("spacing"));h.showDialog(q.container,300,80,!0,!0);q.init()}},m),this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},m),this.editorUi.toolbar.addButton(Editor.alignCenterImage,mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},m),this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},m)];this.styleButtons(C);+C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Xa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Ya=mxUtils.bind(this,function(q,A,B){g=h.getSelectionState();q=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);+f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);f(z,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ca.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(g.style,+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(G,q==mxConstants.ALIGN_CENTER);f(J,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(Q,q==mxConstants.ALIGN_TOP);f(N,q==mxConstants.ALIGN_MIDDLE);f(U,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);+ia.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(g.style,+mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ja.value=+isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ca.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ga)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),Ga.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Da)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Da.value=isNaN(q)?"":this.inUnit(q)++" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var cb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var fb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ga,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),+null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Da,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(ca,Ya);this.addKeyHandler(Ja,Ya);this.addKeyHandler(Ca,Ya);this.addKeyHandler(Ga,Ya);this.addKeyHandler(Da,Ya);this.addKeyHandler(Ia,Ya);d.getModel().addListener(mxEvent.CHANGE,Ya);this.listeners.push({destroy:function(){d.getModel().removeListener(Ya)}});+Ya();if(d.cellEditor.isContentEditing()){var ib=null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=function(ya,Ha){if(null!=ya&&null!=Ha){if(ya==Ha)return!0;if(ya.length>Ha.length+1)return ya.substring(ya.length-Ha.length-1,ya.length)=="-"+Ha}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Ha=q;null!=Ha&&1==Ha.childNodes.length;)if(Ha=+Ha.childNodes[0],Ha.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},M=mxUtils.getCurrentStyle(q),R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,W=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(M);if(window.getSelection)for(var ha=q.getElementsByTagName("*"),fa=window.getSelection(),ja=0;ja<ha.length&&(!fa.containsNode(ha[ja],!0)||(null==+W&&""!=ha[ja].style.fontSize&&(W=parseFloat(ha[ja].style.fontSize)),null==R&&""!=ha[ja].style.lineHeight&&(R=ha[ja].style.lineHeight),null==W||null==R));ja++);null==W&&(W=b(M));if(null==R)for(ha=q;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=ha.style&&""!=ha.style.lineHeight){R=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=M){f(w[0],"bold"==M.fontWeight||400<M.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==M.fontStyle||B("I")||B("EM"));f(w[2],"underline"==M.textDecorationLine||+B("U"));f(L,"line-through"==M.textDecorationLine||B("STRIKE"));f(P,B("SUP"));f(Y,B("SUB"));var va=F(q);if(null!=va){B=function(ya,Ha){Na.push({name:ya,dispName:Ha,type:"string",getValue:function(){return Ma[ya]},valueChanged:function(wa,ua){var Va=va.style,Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Va[ya]=Qa;""==wa&&null!=ua&&(ua.value=Ma[ya])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");+B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,g,!0);null!=ib?ib.parentNode.replaceChild(B,ib):a.appendChild(B);ib=B}d.cellEditor.isTableSelected()?(f(Z,A(M.textAlign,"justify")),f(D,A(M.textAlign,"left")),f(G,A(M.textAlign,"center")),f(J,A(M.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),+A(M.textAlign,"justify")?(f(Z,A(M.textAlign,"justify")),f(D,!1),f(G,!1),f(J,!1)):(f(Z,!1),f(D,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(J,B==mxConstants.ALIGN_RIGHT)));T=d.getParentByName(q,"TABLE",d.cellEditor.textarea);V=null==T?null:d.getParentByName(q,"TR",T);K=null==T?null:d.getParentByNames(q,["TD","TH"],T);Xa.style.display=null!=T?"":"none";document.activeElement!=ca&&(ca.value=isNaN(W)?"":W+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?La.value=R.replace("%",+" %"):(A=parseFloat(R),isNaN(A)?La.value="120 %":La.value=Math.round(100*A)+" %"));null!=ra&&(qa=d.getTextColor(q,!0),ra(qa,!0));null!=H&&(ea=d.getTextColor(q,!1),H(ea,!0));null!=u.firstChild&&(u.firstChild.nodeValue=mxUtils.getCssFontFamily(M.fontFamily))}}eb=!1}),0))});(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",m);mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,+"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY);b.style.paddingTop="8px";b.style.paddingBottom="10px";this.container.appendChild(b);this.container.appendChild(this.addEffects(this.createPanel()))}b=this.createPanel();b.style.paddingTop="8px";1==a.cells.length&&(this.addEditOps(b),null!=b.firstChild&&mxUtils.br(b));1<=a.cells.length&&this.addStyleOps(b);null!=b.firstChild&&this.container.appendChild(b)};StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};-StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),h=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(h))):Base64.decode(h,!0),g=mxUtils.parseXml(d);if(null!=g){var m="light dark"!=g.documentElement.style.colorScheme,p=g.getElementsByTagName("style");-for(b=0;b<p.length;b++){var k=this.getCssRules(mxUtils.getTextContent(p[b]));if(e=m)for(var u=0;u<k.length;u++)if(0<=k[b].cssText.indexOf("color-scheme: light dark")){e=!1;break}for(u=0;u<k.length;u++)this.addSvgRule(a,k[u],g,p[b],k,u,f,e)}}}}catch(w){}return a};-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m){var p=this.editorUi,k=p.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(u,w,z){var C=mxUtils.trim(u.style[w]);if(""!=C&&"url("!=C.substring(0,4)){var E=C;"transparent"==E?E=mxConstants.NONE:mxUtils.isLightDarkColor(E)&&m&&(m=!1);u=this.createColorOption(z+" "+u.selectorText,function(){return E},mxUtils.bind(this,function(D){h[d].style[w]=D==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(D).cssText;D="";for(var G=-0;G<h.length;G++)D+=h[G].cssText+" ";f.textContent=D;D=mxUtils.getXml(e.documentElement);k.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(D))):Base64.encode(D,!0)),p.getSelectionState().cells)}),"#ffffff",{install:function(D){},destroy:function(){}},null,null,null,m);a.appendChild(u);a.style.display=""}}),g(b,"fill",mxResources.get("fill")),g(b,"stroke",mxResources.get("line")),g(b,"stop-color",mxResources.get("gradient")))};+StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),h=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(h))):Base64.decode(h,!0),g=mxUtils.parseXml(d);if(null!=g){var m="light"==g.documentElement.style.colorScheme||"0"==mxUtils.getValue(b.style,+"darkMode",null),p=""==g.documentElement.style.colorScheme,k=g.getElementsByTagName("style");for(b=0;b<k.length;b++){var u=this.getCssRules(mxUtils.getTextContent(k[b]));for(e=0;e<u.length;e++)this.addSvgRule(a,u[e],g,k[b],u,e,f,m,p)}}}}catch(w){}return a};StyleFormatPanel.prototype.getColorSchemeFromCss=function(a){return(a=a.match(/color-scheme\s*:\s*([^;]+)/i))?a[1].trim():null};+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m,p){var k=this.editorUi,u=k.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(w,z,C,E){var D=mxUtils.trim(w.style[z]);if(""!=D&&"url("!=D.substring(0,4)){var G=D;"transparent"==G?G=mxConstants.NONE:(D=mxUtils.isLightDarkColor(G))&&E?E=!1:D||E||(G="light-dark("+G+", "+G+")");w=this.createColorOption(C+" "+w.selectorText,function(){return G},mxUtils.bind(this,function(J){h[d].style[z]=J==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(J).cssText;+J="";p&&mxUtils.isLightDarkColor(h[d].style[z])&&(e.documentElement.style.colorScheme="light dark");for(var L=0;L<h.length;L++)J+=h[L].cssText+" ";f.textContent=J;J=mxUtils.getXml(e.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(J))):Base64.encode(J,!0)),k.getSelectionState().cells)}),"#ffffff",{install:function(J){},destroy:function(){}},null,null,null,E);a.appendChild(w);a.style.display=""}}),g(b,"fill",mxResources.get("fill"),+m),g(b,"stroke",mxResources.get("line"),m),g(b,"stop-color",mxResources.get("gradient"),m))};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.width="210px";e.style.textAlign="center";e.style.marginBottom="2px";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),h=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);h=this.editorUi.sidebar.getLibsForStyle(d);null!=h||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(h=[])}null!=h&&f.push("openLibrary");for(d=0;d<f.length;d++){var g=this.editorUi.actions.get(f[d]);if(null==g||g.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var p=mxResources.get(f[d]);mxUtils.write(m,p+("edit"==f[d]?"":"..."));null!=g&&null!=g.shortcut&&(p+=" ("+g.shortcut+")");m.setAttribute("title",p);e.appendChild(m)}}1<e.children.length&&(a.appendChild(e),mxEvent.addListener(e,"change",mxUtils.bind(this,function(k){"openLibrary"==e.value?(null!=h&&0==h.length&&(this.editorUi.sidebar.updateSearchIndex(),k=this.editorUi.sidebar.getKeyStyle(b.cells[0].style),h=this.editorUi.sidebar.getLibsForStyle(k)),null!=h&&0<h.length?this.editorUi.sidebar.openLibraries(h):this.editorUi.handleError({message:mxResources.get("objectNotFound")}),e.value="edit"):(k=this.editorUi.actions.get(e.value),e.value="edit",null!=k&&k.funct())})),b.image&&(f=this.editorUi.editor.graph,@@ -3186,11 +3186,11 @@ StyleFormatPanel.prototype.addFill=function(a){function b(){g.innerHTML="";C=1;f"22px";d.style.marginTop="-3px";d.style.borderWidth="1px";d.style.borderStyle="solid";d.style.boxSizing="border-box";var g=d.cloneNode(!1);mxEvent.addListener(d,"click",function(D){mxEvent.consume(D)});mxEvent.addListener(g,"click",function(D){mxEvent.consume(D)});var m=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(D){d.style.display=null==D||D==mxConstants.NONE?"none":""},function(D){f.updateCellStyles({gradientColor:D},f.getSelectionCells())},f.getDefaultColor(h.style,mxConstants.STYLE_GRADIENTCOLOR,f.shapeForegroundColor,f.shapeBackgroundColor));m.style.fontWeight="bold";var p="image"==h.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),p,"default",null,mxUtils.bind(this,function(D){f.setCellStyles(p,D,h.cells)}),f.getDefaultColor(h.style,p,f.shapeBackgroundColor,f.shapeForegroundColor));k.style.fontWeight="bold";var u=mxUtils.getValue(h.style,p,null);m.style.display=null!=u&&u!=mxConstants.NONE&&h.fill&&"image"!=h.style.shape?"":"none";var w=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var z=document.createElement("option");z.setAttribute("value",w[u]);mxUtils.write(z,mxResources.get(w[u]));d.appendChild(z)}m.appendChild(d);var C;b();h.gradient&&k.appendChild(g);var E=mxUtils.bind(this,function(){h=e.getSelectionState();var D=mxUtils.getValue(h.style,-mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(h.style,"fillStyle","auto");""==D&&(D=mxConstants.DIRECTION_SOUTH);d.value=D;a.style.display=h.fill?"":"none";D=mxUtils.getValue(h.style,p,null);if(h.fill&&null!=D&&D!=mxConstants.NONE&&"filledEdge"!=h.style.shape){if("1"==h.style.sketch){if(2!=C){g.innerHTML="";C=2;for(D=0;D<Editor.roughFillStyles.length;D++){var K=document.createElement("option");K.setAttribute("value",Editor.roughFillStyles[D].val);mxUtils.write(K,-Editor.roughFillStyles[D].dispName);g.appendChild(K)}g.value="auto"}}else 1!=C&&b();g.value=G;g.value||(G="auto",g.value=G);g.style.display="1"==h.style.sketch||"none"==d.style.display?"":"none";m.style.display=!h.gradient||h.containsImage||"1"==h.style.sketch&&"solid"!=G&&"auto"!=G?"none":""}else g.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(D){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,+mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(h.style,"fillStyle","auto");""==D&&(D=mxConstants.DIRECTION_SOUTH);d.value=D;a.style.display=h.fill?"":"none";D=mxUtils.getValue(h.style,p,null);if(h.fill&&null!=D&&D!=mxConstants.NONE&&"filledEdge"!=h.style.shape){if("1"==h.style.sketch){if(2!=C){g.innerHTML="";C=2;for(D=0;D<Editor.roughFillStyles.length;D++){var J=document.createElement("option");J.setAttribute("value",Editor.roughFillStyles[D].val);mxUtils.write(J,+Editor.roughFillStyles[D].dispName);g.appendChild(J)}g.value="auto"}}else 1!=C&&b();g.value=G;g.value||(G="auto",g.value=G);g.style.display="1"==h.style.sketch||"none"==d.style.display?"":"none";m.style.display=!h.gradient||h.containsImage||"1"==h.style.sketch&&"solid"!=G&&"auto"!=G?"none":""}else g.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(D){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,d.value,h.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",h.cells));mxEvent.consume(D)});mxEvent.addListener(g,"change",function(D){f.setCellStyles("fillStyle",g.value,h.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[g.value],"cells",h.cells));mxEvent.consume(D)});a.appendChild(k);a.appendChild(m);k=this.getCustomColors();for(u=0;u<k.length;u++)a.appendChild(this.createCellColorOption(k[u].title,k[u].key,k[u].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a};-StyleFormatPanel.prototype.addStroke=function(a){function b(H){var ea=f.fromUnit(parseFloat(K.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));K.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}function e(H){var ea=f.fromUnit(parseFloat(L.value));ea=Math.min(999,+StyleFormatPanel.prototype.addStroke=function(a){function b(H){var ea=f.fromUnit(parseFloat(J.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));J.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}function e(H){var ea=f.fromUnit(parseFloat(L.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));L.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}var f=this,h=this.editorUi,d=h.editor.graph,g=h.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var m=document.createElement("div");m.style.fontWeight="bold";g.stroke||(m.style.display="none");var p=document.createElement("select");p.style.position="absolute";p.style.height="22px";p.style.marginTop="-3px";p.style.textAlign="center";p.style.boxSizing="border-box";p.style.left="90px";p.style.width="83px";p.style.borderWidth="1px";p.style.borderStyle="solid";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,"change",function(H){d.getModel().beginUpdate();try{var ea=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ra=["0","0"];"rounded"==p.value?ra=["1","0"]:"curved"==p.value&&(ra=["0","1"]);for(var qa=0;qa<ea.length;qa++)d.setCellStyles(ea[qa],ra[qa],g.cells);h.fireEvent(new mxEventObject("styleChanged","keys",ea,"values",ra,"cells",g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(H)});mxEvent.addListener(p,"click",function(H){mxEvent.consume(H)});var z="image"==g.style.shape?mxConstants.STYLE_IMAGE_BORDER:@@ -3203,9 +3203,9 @@ mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))}));w=this.editorUi.toolbar.addMenuFunctionInContainer(D,null,mxResources.get("pattern"),!1,mxUtils.bind(this,function(H){E(H,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(H,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(H,33,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(H,33,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(H,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+-" (1)");E(H,33,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,33,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));k=C.cloneNode(!1);var K=document.createElement("input");K.style.position="absolute";K.style.textAlign="right";K.style.marginTop="2px";K.style.width="52px";K.style.height="22px";K.style.left="146px";K.style.borderWidth=-"1px";K.style.borderStyle="solid";K.style.boxSizing="border-box";K.setAttribute("title",mxResources.get("linewidth"));C.appendChild(K);var L=K.cloneNode(!0);D.appendChild(L);var Q=this.createStepper(K,b,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=K.style.display;Q.style.top="2px";Q.style.left="198px";C.appendChild(Q);Q=this.createStepper(L,e,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=L.style.display;L.style.position="absolute";Q.style.top="2px";Q.style.left=-"198px";D.appendChild(Q);mxEvent.addListener(K,"blur",b);mxEvent.addListener(K,"change",b);mxEvent.addListener(L,"blur",e);mxEvent.addListener(L,"change",e);var N=this.editorUi.toolbar.addMenuFunctionInContainer(k,null,mxResources.get("waypoints"),!1,mxUtils.bind(this,function(H){"arrow"!=g.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",+" (1)");E(H,33,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,33,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));k=C.cloneNode(!1);var J=document.createElement("input");J.style.position="absolute";J.style.textAlign="right";J.style.marginTop="2px";J.style.width="52px";J.style.height="22px";J.style.left="146px";J.style.borderWidth=+"1px";J.style.borderStyle="solid";J.style.boxSizing="border-box";J.setAttribute("title",mxResources.get("linewidth"));C.appendChild(J);var L=J.cloneNode(!0);D.appendChild(L);var Q=this.createStepper(J,b,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=J.style.display;Q.style.top="2px";Q.style.left="198px";C.appendChild(Q);Q=this.createStepper(L,e,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=L.style.display;L.style.position="absolute";Q.style.top="2px";Q.style.left=+"198px";D.appendChild(Q);mxEvent.addListener(J,"blur",b);mxEvent.addListener(J,"change",b);mxEvent.addListener(L,"blur",e);mxEvent.addListener(L,"change",e);var N=this.editorUi.toolbar.addMenuFunctionInContainer(k,null,mxResources.get("waypoints"),!1,mxUtils.bind(this,function(H){"arrow"!=g.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",mxResources.get("straight")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],null,null,!0,Format.verticalElbowImage.src)).setAttribute("title",mxResources.get("horizontal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],null,null,!0,Format.horizontalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],null,null,!0,Format.verticalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),@@ -3239,10 +3239,10 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STY"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",mxResources.get("block")),H.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=H.div&&mxUtils.fit(H.div)}),0)}));this.addArrow(G);this.addArrow(N).style.marginTop="-1px";this.addArrow(U);this.addArrow(Y);Q=this.addArrow(u);Q.className="geIcon";u.style.width="134px";u=this.addArrow(w);u.className="geIcon";u.style.width="22px";var P=document.createElement("div");P.style.width="102px";P.style.height="10px";P.style.borderBottom="1px solid currentcolor";P.style.marginLeft="10px";Q.appendChild(P);var T=document.createElement("div");T.style.width="30px";T.style.height="10px";T.style.borderBottom="1px solid currentcolor";T.style.marginLeft="10px";u.appendChild(T);a.appendChild(m);a.appendChild(D);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.padding="5px 4px 6px 0px";u.style.fontWeight="normal";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginLeft=-"0px";w.style.marginBottom="12px";w.style.marginTop="2px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("lineend"));u.appendChild(w);var J=this.addUnitInput(u,this.getUnit(),98,52,function(){da.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),V=this.addUnitInput(u,this.getUnit(),30,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);Q=document.createElement("div");Q.style.height="8px";u.appendChild(Q);w=w.cloneNode(!1);+"0px";w.style.marginBottom="12px";w.style.marginTop="2px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("lineend"));u.appendChild(w);var K=this.addUnitInput(u,this.getUnit(),98,52,function(){da.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),V=this.addUnitInput(u,this.getUnit(),30,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);Q=document.createElement("div");Q.style.height="8px";u.appendChild(Q);w=w.cloneNode(!1);mxUtils.write(w,mxResources.get("linestart"));u.appendChild(w);var Z=this.addUnitInput(u,this.getUnit(),98,52,function(){X.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ia=this.addUnitInput(u,this.getUnit(),30,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),98,64).style.fontSize="11px";this.addLabel(u,mxResources.get("size"),30,64).style.fontSize="11px";mxUtils.br(u);m=m.cloneNode(!1);m.style.fontWeight="normal";m.style.position="relative";m.style.paddingLeft="16px";m.style.marginBottom="2px";m.style.marginTop="6px";m.style.borderWidth="0px";m.style.paddingBottom="18px";w=document.createElement("div");w.style.position="absolute";w.style.marginLeft="3px";w.style.marginBottom="12px";w.style.marginTop="1px";w.style.fontWeight="normal";w.style.width="120px";mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var oa=this.addUnitInput(m,this.getUnit(),30,52,function(){ca.apply(this,-arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var sa=mxUtils.bind(this,function(H,ea,ra){function qa(Pa,ma,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,ma);return Ba}g=h.getSelectionState();if(ra||document.activeElement!=K)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),K.value=isNaN(H)?"":+arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var sa=mxUtils.bind(this,function(H,ea,ra){function qa(Pa,ma,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,ma);return Ba}g=h.getSelectionState();if(ra||document.activeElement!=J)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),J.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");P.style.borderBottom="1px solid currentcolor";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,null)&&(H=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,""),ea=String(H).split(" "),2<=ea.length?(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,P.style.borderBottom="1px solid transparent",P.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",P.style.backgroundPosition="bottom left",P.style.backgroundSize=H+"px 1px",P.style.backgroundRepeat="repeat-x"):P.style.borderBottom="1px dashed currentcolor");T.style.backgroundImage=P.style.backgroundImage;T.style.backgroundPosition=P.style.backgroundPosition;T.style.backgroundSize=P.style.backgroundSize;T.style.backgroundRepeat=P.style.backgroundRepeat;T.style.borderBottom=P.style.borderBottom;H=N.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,@@ -3251,9 +3251,9 @@ H.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgH.style.height="",H.style.backgroundImage="link"==g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");qa(mxUtils.getValue(g.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(g.style,"startFill","1"),U,"start");qa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(N,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(ra||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=Z)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Z.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=Z)H=-parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),J.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=oa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),oa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var X=this.installInputHandler(Z,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,-0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ba=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var da=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(oa,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(K,sa);this.addKeyHandler(ia,-sa);this.addKeyHandler(Z,sa);this.addKeyHandler(V,sa);this.addKeyHandler(J,sa);this.addKeyHandler(oa,sa);d.getModel().addListener(mxEvent.CHANGE,sa);this.listeners.push({destroy:function(){d.getModel().removeListener(sa)}});sa();return a};+parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),K.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=oa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),oa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var X=this.installInputHandler(Z,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,+0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ba=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var da=this.installInputHandler(K,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(oa,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(J,sa);this.addKeyHandler(ia,+sa);this.addKeyHandler(Z,sa);this.addKeyHandler(V,sa);this.addKeyHandler(K,sa);this.addKeyHandler(oa,sa);d.getModel().addListener(mxEvent.CHANGE,sa);this.listeners.push({destroy:function(){d.getModel().removeListener(sa)}});sa();return a};StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps){a.style.padding="2px 0px 24px 14px";var h=document.createElement("div");h.style.position="absolute";h.style.maxWidth="78px";h.style.overflow="hidden";h.style.textOverflow="ellipsis";mxUtils.write(h,mxResources.get("lineJumps"));a.appendChild(h);var d=document.createElement("select");d.style.position="absolute";d.style.height="21px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.textAlign="center";d.style.right="84px";d.style.width="64px";d.style.borderWidth="1px";d.style.borderStyle="solid";h=["none","arc","gap","sharp","line"];for(var g=0;g<h.length;g++){var m=document.createElement("option");m.setAttribute("value",h[g]);mxUtils.write(m,mxResources.get(h[g]));d.appendChild(m)}mxEvent.addListener(d,"change",function(w){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(w)});mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=@@ -3271,21 +3271,21 @@ DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.gd.setAttribute("value","simple");m.appendChild(d);d=document.createElement("option");d.setAttribute("title",mxResources.get("none"));mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));d.setAttribute("value","none");m.appendChild(d);m.value=null==e.adaptiveColors?"default":e.adaptiveColors;mxEvent.addListener(m,"change",function(){var C=new ChangePageSetup(b);C.ignoreColor=!0;C.ignoreImage=!0;C.adaptiveColors=m.value;e.model.execute(C)});h.appendChild(m);if(!b.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)d=b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"),d.style.position="absolute",d.style.left="196px",h.appendChild(d);a.appendChild(h)}h=document.createElement("table");h.style.width="204px";d=document.createElement("tbody");g=document.createElement("tr");g.style.padding="0px";var p=document.createElement("td");p.style.textAlign="center";p.style.padding="2px";p.style.width="50%";for(var k=p.cloneNode(!0),u=this.getGlobalStyleButtons(),w=0;w<u.length;w+=2){var z=u[w];z.style.height="22px";z.style.width="88px";p.appendChild(z);g.appendChild(p);z=u[w+1];null!=z&&(z.style.height="22px",z.style.width="88px",k.appendChild(z));g.appendChild(k);d.appendChild(g);p=p.cloneNode(!1);k=k.cloneNode(!1);g=g.cloneNode(!1)}h.appendChild(d);f.appendChild(h);a.appendChild(f);e.isEnabled()&&this.addGraphStyles(a);return a};-DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),h=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";a.style.paddingLeft="18px";a.style.paddingTop="6px";var g=mxUtils.bind(this,function(Y,P){var T=e.getVerticesAndEdges();f.beginUpdate();try{for(var J=0;J<T.length;J++){var V=e.getCellStyle(T[J]);p||null==V.labelBackgroundColor?p&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},-[T[J]]):e.updateCellStyles({labelBackgroundColor:null!=P?P.background:null},[T[J]]);for(var Z=f.isEdge(T[J]),ia=f.getStyle(T[J]),oa=Z?e.currentEdgeStyle:e.currentVertexStyle,sa=0;sa<Y.length;sa++)if(null!=V[Y[sa]]&&V[Y[sa]]!=mxConstants.NONE||Y[sa]!=mxConstants.STYLE_FILLCOLOR&&Y[sa]!=mxConstants.STYLE_STROKECOLOR)ia=p&&Z&&Y[sa]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(ia,Y[sa],"default"):mxUtils.setStyle(ia,Y[sa],oa[Y[sa]]);f.setStyle(T[J],ia)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(Y,-P,T){if(null!=Y)for(var J=0;J<P.length;J++)if(null!=Y[P[J]]&&Y[P[J]]!=mxConstants.NONE||P[J]!=mxConstants.STYLE_FILLCOLOR&&P[J]!=mxConstants.STYLE_STROKECOLOR)Y[P[J]]=T[P[J]]}),p=!0,k=mxUtils.bind(this,function(Y,P,T,J,V){if(null!=Y){null!=T&&(p||null==P.labelBackgroundColor?p&&(P.labelBackgroundColor=mxConstants.NONE):(J=null!=J?J.background:null,V=null!=V?V:e,null==J&&(J=V.background),null==J&&(J=V.defaultPageBackgroundColor),P.labelBackgroundColor=J));for(var Z in Y)if(null==T||null!=P[Z]&&P[Z]!=-mxConstants.NONE||Z!=mxConstants.STYLE_FILLCOLOR&&Z!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&Z==mxConstants.STYLE_FONTCOLOR?P[Z]="default":P[Z]=Y[Z]}}),u=mxUtils.bind(this,function(Y,P,T,J,V){var Z=document.createElement("div");Z.style.position="absolute";Z.style.display="inline-block";Z.style.overflow="hidden";Z.style.pointerEvents="none";Z.style.width="100%";Z.style.height="100%";V.appendChild(Z);var ia=new Graph(Z,null,null,e.getStylesheet());ia.shapeBackgroundColor="light-dark(#f1f3f4, "+-Editor.darkColor+")";ia.resetViewOnRootChange=!1;ia.foldingEnabled=!1;ia.gridEnabled=!1;ia.autoScroll=!1;ia.setTooltips(!1);ia.setConnectable(!1);ia.setPanning(!1);ia.setEnabled(!1);ia.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(e.getCellStyle.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,J,ia);k(ca,ba,O,J,ia);X&&(ba=e.postProcessCellStyle(O,ba));return ba};ia.model.beginUpdate();+DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),h=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";a.style.paddingLeft="18px";a.style.paddingTop="6px";var g=mxUtils.bind(this,function(Y,P){var T=e.getVerticesAndEdges();f.beginUpdate();try{for(var K=0;K<T.length;K++){var V=e.getCellStyle(T[K]);p||null==V.labelBackgroundColor?p&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},+[T[K]]):e.updateCellStyles({labelBackgroundColor:null!=P?P.background:null},[T[K]]);for(var Z=f.isEdge(T[K]),ia=f.getStyle(T[K]),oa=Z?e.currentEdgeStyle:e.currentVertexStyle,sa=0;sa<Y.length;sa++)if(null!=V[Y[sa]]&&V[Y[sa]]!=mxConstants.NONE||Y[sa]!=mxConstants.STYLE_FILLCOLOR&&Y[sa]!=mxConstants.STYLE_STROKECOLOR)ia=p&&Z&&Y[sa]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(ia,Y[sa],"default"):mxUtils.setStyle(ia,Y[sa],oa[Y[sa]]);f.setStyle(T[K],ia)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(Y,+P,T){if(null!=Y)for(var K=0;K<P.length;K++)if(null!=Y[P[K]]&&Y[P[K]]!=mxConstants.NONE||P[K]!=mxConstants.STYLE_FILLCOLOR&&P[K]!=mxConstants.STYLE_STROKECOLOR)Y[P[K]]=T[P[K]]}),p=!0,k=mxUtils.bind(this,function(Y,P,T,K,V){if(null!=Y){null!=T&&(p||null==P.labelBackgroundColor?p&&(P.labelBackgroundColor=mxConstants.NONE):(K=null!=K?K.background:null,V=null!=V?V:e,null==K&&(K=V.background),null==K&&(K=V.defaultPageBackgroundColor),P.labelBackgroundColor=K));for(var Z in Y)if(null==T||null!=P[Z]&&P[Z]!=+mxConstants.NONE||Z!=mxConstants.STYLE_FILLCOLOR&&Z!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&Z==mxConstants.STYLE_FONTCOLOR?P[Z]="default":P[Z]=Y[Z]}}),u=mxUtils.bind(this,function(Y,P,T,K,V){var Z=document.createElement("div");Z.style.position="absolute";Z.style.display="inline-block";Z.style.overflow="hidden";Z.style.pointerEvents="none";Z.style.width="100%";Z.style.height="100%";V.appendChild(Z);var ia=new Graph(Z,null,null,e.getStylesheet());ia.shapeBackgroundColor="light-dark(#f1f3f4, "++Editor.darkColor+")";ia.resetViewOnRootChange=!1;ia.foldingEnabled=!1;ia.gridEnabled=!1;ia.autoScroll=!1;ia.setTooltips(!1);ia.setConnectable(!1);ia.setPanning(!1);ia.setEnabled(!1);ia.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(e.getCellStyle.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,K,ia);k(ca,ba,O,K,ia);X&&(ba=e.postProcessCellStyle(O,ba));return ba};ia.model.beginUpdate();try{var oa=ia.insertVertex(ia.getDefaultParent(),null,"Shape",14,8,70,36,"strokeWidth=2;"),sa=ia.insertEdge(ia.getDefaultParent(),null,"Connector",oa,oa,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");sa.geometry.points=[new mxPoint(32,66)];sa.geometry.offset=new mxPoint(0,8)}finally{ia.model.endUpdate()}V=ia.view.getDrawPane().ownerSVGElement;null!=V&&(Z=V.cloneNode(!0),Z.style.position="absolute",Z.style.clipPath="rect(0 52% 100% 0)",V.style.clipPath=-"rect(0 100% 100% 51%)",V.style.colorScheme="light",V.parentNode.appendChild(Z))}),w=document.createElement("div");w.style.position="relative";w.style.width="210px";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(Y,P,T,J,V){var Z=this.format.cachedStyleEntries[V];null==Z&&(Z=document.createElement("div"),Z.className="geItem",Z.style.position="relative",Z.style.width="96px",Z.style.height="86px",Z.style.cursor="pointer",Z.style.border=-"1px solid gray",Z.style.borderRadius="8px",Z.style.margin="1px 2px",Z.style.overflow="hidden",p||null==J||null==J.background||(Z.style.backgroundColor=J.background),u(Y,P,T,J,Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ia){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(Y,e.currentVertexStyle);k(Y,e.currentEdgeStyle);k(P,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var oa=d.slice(),sa;for(sa in Y)oa.push(sa);-g(oa,J);if(!p){var O=new ChangePageSetup(b,null!=J?J.background:null);O.ignoreImage=!0;f.execute(O);f.execute(new ChangeGridColor(b,null!=J&&null!=J.gridColor?J.gridColor:h))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(Z,mxUtils.bind(this,function(ia){Z.style.opacity=.5}),null,mxUtils.bind(this,function(ia){Z.style.opacity=1})),mxEvent.addListener(Z,"mouseenter",mxUtils.bind(this,function(ia){var oa=e.getCellStyle;ia=e.background;var sa=e.view.gridColor;p||(e.background=null!=J?J.background:-null,e.view.gridColor=null!=J&&null!=J.gridColor?J.gridColor:h);e.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(oa.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,J);k(ca,ba,O,J);X&&(ba=this.postProcessCellStyle(O,ba));return ba};e.refresh();e.getCellStyle=oa;e.background=ia;e.view.gridColor=sa;Z.style.border="2px solid blue";Z.style.margin="0px 1px"})),mxEvent.addListener(Z,"mouseleave",+"rect(0 100% 100% 51%)",V.style.colorScheme="light",V.parentNode.appendChild(Z))}),w=document.createElement("div");w.style.position="relative";w.style.width="210px";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(Y,P,T,K,V){var Z=this.format.cachedStyleEntries[V];null==Z&&(Z=document.createElement("div"),Z.className="geItem",Z.style.position="relative",Z.style.width="96px",Z.style.height="86px",Z.style.cursor="pointer",Z.style.border=+"1px solid gray",Z.style.borderRadius="8px",Z.style.margin="1px 2px",Z.style.overflow="hidden",p||null==K||null==K.background||(Z.style.backgroundColor=K.background),u(Y,P,T,K,Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ia){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(Y,e.currentVertexStyle);k(Y,e.currentEdgeStyle);k(P,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var oa=d.slice(),sa;for(sa in Y)oa.push(sa);+g(oa,K);if(!p){var O=new ChangePageSetup(b,null!=K?K.background:null);O.ignoreImage=!0;f.execute(O);f.execute(new ChangeGridColor(b,null!=K&&null!=K.gridColor?K.gridColor:h))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(Z,mxUtils.bind(this,function(ia){Z.style.opacity=.5}),null,mxUtils.bind(this,function(ia){Z.style.opacity=1})),mxEvent.addListener(Z,"mouseenter",mxUtils.bind(this,function(ia){var oa=e.getCellStyle;ia=e.background;var sa=e.view.gridColor;p||(e.background=null!=K?K.background:+null,e.view.gridColor=null!=K&&null!=K.gridColor?K.gridColor:h);e.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(oa.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,K);k(ca,ba,O,K);X&&(ba=this.postProcessCellStyle(O,ba));return ba};e.refresh();e.getCellStyle=oa;e.background=ia;e.view.gridColor=sa;Z.style.border="2px solid blue";Z.style.margin="0px 1px"})),mxEvent.addListener(Z,"mouseleave",mxUtils.bind(this,function(ia){Z.style.border="1px solid gray";Z.style.margin="1px 2px";e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[V]=Z));w.appendChild(Z)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");for(var Y=10*this.format.currentStylePage;Y<Math.min(10*(this.format.currentStylePage+-1),Editor.styles.length);Y++){var P=Editor.styles[Y];z(P.commonStyle,P.vertexStyle,P.edgeStyle,P.graph,Y)}}),G=mxUtils.bind(this,function(Y){0<=Y&&Y<C&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=Y,D())});if(1<C){var K=document.createElement("div");K.style.whiteSpace="nowrap";K.style.position="relative";K.style.textAlign="center";K.style.paddingTop="4px";K.style.width="210px";for(var L=0;L<C;L++){var Q=document.createElement("div");Q.style.display=-"inline-block";Q.style.width="6px";Q.style.height="6px";Q.style.marginLeft="4px";Q.style.marginRight="3px";Q.style.borderRadius="3px";Q.style.cursor="pointer";Q.style.background="transparent";Q.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Y,P){mxEvent.addListener(Q,"click",mxUtils.bind(this,function(){G(Y)}))})(L,Q);K.appendChild(Q);E.push(Q)}a.appendChild(K);D();if(15>C){L=function(Y){mxEvent.addListener(Y,"mouseenter",function(){Y.style.opacity="1"});mxEvent.addListener(Y,"mouseleave",+1),Editor.styles.length);Y++){var P=Editor.styles[Y];z(P.commonStyle,P.vertexStyle,P.edgeStyle,P.graph,Y)}}),G=mxUtils.bind(this,function(Y){0<=Y&&Y<C&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=Y,D())});if(1<C){var J=document.createElement("div");J.style.whiteSpace="nowrap";J.style.position="relative";J.style.textAlign="center";J.style.paddingTop="4px";J.style.width="210px";for(var L=0;L<C;L++){var Q=document.createElement("div");Q.style.display=+"inline-block";Q.style.width="6px";Q.style.height="6px";Q.style.marginLeft="4px";Q.style.marginRight="3px";Q.style.borderRadius="3px";Q.style.cursor="pointer";Q.style.background="transparent";Q.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Y,P){mxEvent.addListener(Q,"click",mxUtils.bind(this,function(){G(Y)}))})(L,Q);J.appendChild(Q);E.push(Q)}a.appendChild(J);D();if(15>C){L=function(Y){mxEvent.addListener(Y,"mouseenter",function(){Y.style.opacity="1"});mxEvent.addListener(Y,"mouseleave",function(){Y.style.opacity="0.5"})};var N=document.createElement("div");N.className="geAdaptiveAsset";N.style.position="absolute";N.style.left="0px";N.style.top="0px";N.style.bottom="0px";N.style.width="24px";N.style.height="24px";N.style.margin="0px";N.style.cursor="pointer";N.style.opacity="0.5";N.style.backgroundRepeat="no-repeat";N.style.backgroundPosition="center center";N.style.backgroundSize="24px 24px";N.style.backgroundImage="url("+Editor.previousImage+")";var U=N.cloneNode(!1);U.style.backgroundImage=-"url("+Editor.nextImage+")";U.style.left="";U.style.right="2px";K.appendChild(N);K.appendChild(U);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(U,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}));L(N);L(U)}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);+"url("+Editor.nextImage+")";U.style.left="";U.style.right="2px";J.appendChild(N);J.appendChild(U);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(U,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}));L(N);L(U)}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),h=f.getElementsByTagName("input")[0];null!=h&&(h.style.visibility=null!=e.backgroundImage?@@ -3303,9 +3303,9 @@ null,null,p,!0,m);p.style.padding="6px 0 0 0";p.appendChild(d);p.appendChild(g);DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var f=PageSetupDialog.addPageFormatPanel(a,"formatpanel",e.pageFormat,function(d){if(null==e.pageFormat||e.pageFormat.width!=d.width||e.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,e.model.execute(d)});this.addKeyHandler(f.widthInput,function(){f.set(e.pageFormat)});this.addKeyHandler(f.heightInput,function(){f.set(e.pageFormat)});var h=function(){f.set(e.pageFormat)};b.addListener("pageFormatChanged",h);this.listeners.push({destroy:function(){b.removeListener(h)}});e.getModel().addListener(mxEvent.CHANGE,h);this.listeners.push({destroy:function(){e.getModel().removeListener(h)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function h(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function g(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}-function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function K(){mxActor.call(this)}function L(){mxActor.call(this)}function Q(){mxActor.call(this)}function N(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function P(){mxActor.call(this)}function T(c,l){this.canvas=c;this.canvas.setLineJoin("round");+function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function J(){mxActor.call(this)}function L(){mxActor.call(this)}function Q(){mxActor.call(this)}function N(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function P(){mxActor.call(this)}function T(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,T.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,T.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,T.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,T.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,-T.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,T.prototype.arcTo)}function J(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function ia(){mxActor.call(this)}function oa(){mxActor.call(this)}function sa(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function da(){mxShape.call(this)}function ca(){mxEllipse.call(this)}+T.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,T.prototype.arcTo)}function K(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function ia(){mxActor.call(this)}function oa(){mxActor.call(this)}function sa(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function da(){mxShape.call(this)}function ca(){mxEllipse.call(this)}function H(){mxShape.call(this)}function ea(){mxShape.call(this)}function ra(){mxRectangleShape.call(this)}function qa(){mxShape.call(this)}function Pa(){mxShape.call(this)}function ma(){mxShape.call(this)}function Ba(){mxShape.call(this)}function Ca(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Ia(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function La(){mxArrowConnector.call(this);this.spacing=0}function Xa(){mxArrowConnector.call(this);this.spacing=0}function Ya(){mxActor.call(this)}function cb(){mxRectangleShape.call(this)}function fb(){mxActor.call(this)}function pb(){mxActor.call(this)}function gb(){mxActor.call(this)}function ab(){mxActor.call(this)}function ib(){mxActor.call(this)}function eb(){mxActor.call(this)}function q(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function M(){mxEllipse.call(this)}function R(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}function ha(){mxRhombus.call(this)}function fa(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function ya(){mxActor.call(this)}function Ha(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=@@ -3334,8 +3334,8 @@ r),c.arcTo(y,y,0,0,1,0,r-y)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection",null);x||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,r-15),c.lineTo(n-20,r-15),-c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*r-5),c.lineTo(15,.5*r+5),c.moveTo(15,.5*r-5),c.lineTo(5,.5*r+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(K,-mxActor);K.prototype.size=30;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",K);mxUtils.extend(L,mxActor);L.prototype.size=+c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*r-5),c.lineTo(15,.5*r+5),c.moveTo(15,.5*r-5),c.lineTo(5,.5*r+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(J,+mxActor);J.prototype.size=30;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",J);mxUtils.extend(L,mxActor);L.prototype.size=.4;L.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};L.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),t=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",L);mxUtils.extend(Q,mxActor);Q.prototype.size=.3;Q.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};Q.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",Q);var Ua=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ua.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=@@ -3353,10 +3353,10 @@ arguments);this.lastX=c;this.lastY=l};T.prototype.destroy=function(){this.canvasmxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new T(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};var ub=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=T)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(n/2,Math.min(r/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(n*v,r*v)),c.moveTo(l+-v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(J,mxRectangleShape);J.prototype.size=.1;J.prototype.fixedSize=!1;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};J.prototype.paintForeground=+v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(K,mxRectangleShape);K.prototype.size=.1;K.prototype.fixedSize=!1;K.prototype.isHtmlAllowed=function(){return!1};K.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};K.prototype.paintForeground=function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,-arguments)};mxCellRenderer.registerShape("process",J);mxCellRenderer.registerShape("process2",J);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};V.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(Z,mxHexagon);Z.prototype.size=30;Z.prototype.position=.5;Z.prototype.position2=.5;Z.prototype.base=20;Z.prototype.getLabelMargins=function(){return new mxRectangle(0,+arguments)};mxCellRenderer.registerShape("process",K);mxCellRenderer.registerShape("process2",K);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};V.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(Z,mxHexagon);Z.prototype.size=30;Z.prototype.position=.5;Z.prototype.position2=.5;Z.prototype.base=20;Z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),I=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+I),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",Z);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",@@ -3497,7 +3497,7 @@ mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(hb(c,t/2))}l.mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var x=[],I=0;I<v.length;I++)v[I]!=c.cell&&r.isSwimlane(v[I])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[I]))==n&&x.push(v[I]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:lb(),ext:lb(),rectangle:lb(),triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,["width","height"],function(l){var t=Math.max(qa.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",qa.prototype.width))),n=Math.max(1.5*qa.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",qa.prototype.height)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(qa.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*qa.prototype.corner,Math.min(l.height,t.y-l.y)))},-!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,+!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l},cross:function(c){return[Ta(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ya.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-t)},function(l,t){var n=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},note2:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[Ta(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));@@ -3514,7 +3514,7 @@ folder:function(c){return[Ta(c,["tabWidth","tabHeight"],function(l){var t=Math.m!1)]},tape:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Ta(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(z.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,-n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:tb(oa.prototype.size,!0,.5,!0,oa.prototype.fixedSize),curlyBracket:tb(Y.prototype.size,!1),display:tb(Ha.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,K.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:yb(1,N.prototype.size,+n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:tb(oa.prototype.size,!0,.5,!0,oa.prototype.fixedSize),curlyBracket:tb(Y.prototype.size,!1),display:tb(Ha.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,J.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:yb(1,N.prototype.size,N.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=Sa[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=Sa[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=Sa[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var $a=new mxPoint(1,0),kb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);$a=mxUtils.getRotatedPoint($a,Math.cos(ob),Math.sin(ob));var Za=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(Za),Math.sin(Za));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,I=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==I&&null!=l&&(I=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var y=$a.x,aa=$a.y,S=kb.x,Fa=kb.y,Ra="horizontal"==@@ -3529,7 +3529,7 @@ t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));l>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))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,-0),!1));return c};K.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,+0),!1));return c};J.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};f.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};C.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,@@ -3577,8 +3577,8 @@ d.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1null})}).isEnabled=g;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=g;this.addAction("saveAs...",function(){f.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(f);f.showDialog(k.container,620,420,!0,!1);k.init()}).isEnabled=g;this.addAction("pageSetup...",function(){f.showDialog((new PageSetupDialog(f)).container,320,240,!0,!0)}).isEnabled=g;this.addAction("print...",function(){f.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){f.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){f.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var k=null;try{k=f.copyXml(),null!=k&&d.removeCells(k,!1)}catch(u){}try{null==k&&mxClipboard.cut(d)}catch(u){f.handleError(u)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){f.handleError(k)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(u){if(null!=u){d.getModel().beginUpdate();try{f.pasteXml(u,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),-k=!0)}catch(u){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function u(z){if(null!=z){for(var C=!0,E=0;E<z.length&&C;E++)C=C&&d.model.isEdge(z[E]);var D=d.view.translate;E=d.view.scale;var G=D.x,K=D.y;D=null;if(1==z.length&&C){var L=d.getCellGeometry(z[0]);null!=L&&(D=L.getTerminalPoint(!0))}D=null!=D?D:d.getBoundingBoxFromGeometry(z,C);null!=D&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/E-G)),E=Math.round(d.snap(d.popupMenuHandler.triggerY/-E-K)),d.cellsMoved(z,C-D.x,E-D.y))}}function w(){d.getModel().beginUpdate();try{u(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(z){if(null!=z){d.getModel().beginUpdate();try{u(f.pasteXml(z,!0))}finally{d.getModel().endUpdate()}}else w()}),k=!0)}catch(z){}k||w()}});this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],+k=!0)}catch(u){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function u(z){if(null!=z){for(var C=!0,E=0;E<z.length&&C;E++)C=C&&d.model.isEdge(z[E]);var D=d.view.translate;E=d.view.scale;var G=D.x,J=D.y;D=null;if(1==z.length&&C){var L=d.getCellGeometry(z[0]);null!=L&&(D=L.getTerminalPoint(!0))}D=null!=D?D:d.getBoundingBoxFromGeometry(z,C);null!=D&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/E-G)),E=Math.round(d.snap(d.popupMenuHandler.triggerY/+E-J)),d.cellsMoved(z,C-D.x,E-D.y))}}function w(){d.getModel().beginUpdate();try{u(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(z){if(null!=z){d.getModel().beginUpdate();try{u(f.pasteXml(z,!0))}finally{d.getModel().endUpdate()}}else w()}),k=!0)}catch(z){}k||w()}});this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var w=d.getCellGeometry(k[u]);null!=w&&(w=w.clone(),w.width=f.copiedSize.width,w.height=f.copiedSize.height,d.getModel().setGeometry(k[u],w))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(E,D){var G=z.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||D.setAttribute("placeholders",G.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));z.setValue(E,D)}k=null!=u?u:k;var z=@@ -3628,9 +3628,9 @@ k[u];d.getModel().isEdge(w)&&(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[w])null!=z&&(z=z.clone(),z.points=null,z.x=0,z.y=0,z.offset=null,d.getModel().setGeometry(w,z))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",z=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,z=u.style[mxConstants.STYLE_CLIP_PATH]||z);var C=d.cellEditor.saveSelection();-f.showImageDialog(k,w,function(E,D,G,K,L,Q){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(E,D,G);else{var N=d.getSelectionCells();if(null!=E&&(0<E.length||0<N.length)){var U=null;d.getModel().beginUpdate();try{if(0==N.length){N=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var Y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=Y.x;N[0].geometry.y=-Y.y;null!=K&&e(N[0],K,L,Q,d);U=N;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,N);var P=d.getCurrentCellStyle(N[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==K&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,N);if(null!=D&&null!=G)for(E=0;E<N.length;E++){var T=N[E];if("0"!=d.getCurrentCellStyle(T).expand){var J=-d.getModel().getGeometry(T);null!=J&&(J=J.clone(),J.width=D,J.height=G,d.getModel().setGeometry(T,J))}null!=K&&e(T,K,L,Q,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=g;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];+f.showImageDialog(k,w,function(E,D,G,J,L,Q){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(E,D,G);else{var N=d.getSelectionCells();if(null!=E&&(0<E.length||0<N.length)){var U=null;d.getModel().beginUpdate();try{if(0==N.length){N=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var Y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=Y.x;N[0].geometry.y=+Y.y;null!=J&&e(N[0],J,L,Q,d);U=N;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,N);var P=d.getCurrentCellStyle(N[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==J&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,N);if(null!=D&&null!=G)for(E=0;E<N.length;E++){var T=N[E];if("0"!=d.getCurrentCellStyle(T).expand){var K=+d.getModel().getGeometry(T);null!=K&&(K=K.clone(),K.width=D,K.height=G,d.getModel().setGeometry(T,K))}null!=J&&e(T,J,L,Q,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=g;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];w&&"image"==z&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(C,E,D){e(k,C,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=g;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),@@ -3673,13 +3673,13 @@ w&&0<w.length&&(e.scrollCellToVisible(w[0]),e.setSelectionCells(w))}),b):(m&&(b=b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=f)try{g?e.deleteLane(f):e.deleteTableColumn(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteColumn"))),p&&(b=a.addItem(mxResources.get("insertRowBefore"),Editor.addRowAboveImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!0):e.insertTableRow(f,!0)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),Editor.addRowBelowImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!1):e.insertTableRow(f,!1)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),Editor.removeRowImage,mxUtils.bind(this,function(){try{g?e.deleteLane(f):e.deleteTableRow(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteRow")),p=this.editorUi.getSelectionState(),null!=p.mergeCell?this.addMenuItem(a,"mergeCells"):(1<p.style.colspan||1<p.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};-Menus.prototype.addInsertTableItem=function(a,b,e,f){function h(C){m=d.getParentByName(mxEvent.getSource(C),"TD");var E=!1;if(null!=m){g=d.getParentByName(m,"TR");var D=mxEvent.isMouseEvent(C)?2:4,G=w,K=Math.min(20,g.sectionRowIndex+D);D=Math.min(20,m.cellIndex+D);for(var L=G.rows.length;L<K;L++)for(var Q=G.insertRow(L),N=0;N<G.rows[0].cells.length;N++)Q.insertCell(-1);for(L=0;L<G.rows.length;L++)for(Q=G.rows[L],N=Q.cells.length;N<D;N++)Q.insertCell(-1);z.innerHTML=m.cellIndex+1+"x"+(g.sectionRowIndex+-1);for(G=0;G<w.rows.length;G++)for(K=w.rows[G],D=0;D<K.cells.length;D++)L=K.cells[D],G==g.sectionRowIndex&&D==m.cellIndex&&(E="blue"==L.style.backgroundColor),L.style.backgroundColor=G<=g.sectionRowIndex&&D<=m.cellIndex?"blue":"transparent"}mxEvent.consume(C);return E}f=null!=f?f:!0;b=null!=b?b:mxUtils.bind(this,function(C,E,D){var G=this.editorUi.editor.graph;if(null!=G.getParentByName(mxEvent.getSource(C),"TD")&&null!=G.cellEditor.textarea){var K=G.cellEditor.textarea.getElementsByTagName("table");-C=[];for(var L=0;L<K.length;L++)C.push(K[L]);G.container.focus();L=G.pasteHtmlAtCaret;K=["<table>"];for(var Q=0;Q<E;Q++){K.push("<tr>");for(var N=0;N<D;N++)K.push("<td><br></td>");K.push("</tr>")}K.push("</table>");E=K.join("");L.call(G,E);E=G.cellEditor.textarea.getElementsByTagName("table");if(E.length==C.length+1)for(L=E.length-1;0<=L;L--)if(0==L||E[L]!=C[L-1]){G.selectNode(E[L].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,g=null,m=null;null==e&&(a.div.className+=" geToolbarMenu",+Menus.prototype.addInsertTableItem=function(a,b,e,f){function h(C){m=d.getParentByName(mxEvent.getSource(C),"TD");var E=!1;if(null!=m){g=d.getParentByName(m,"TR");var D=mxEvent.isMouseEvent(C)?2:4,G=w,J=Math.min(20,g.sectionRowIndex+D);D=Math.min(20,m.cellIndex+D);for(var L=G.rows.length;L<J;L++)for(var Q=G.insertRow(L),N=0;N<G.rows[0].cells.length;N++)Q.insertCell(-1);for(L=0;L<G.rows.length;L++)for(Q=G.rows[L],N=Q.cells.length;N<D;N++)Q.insertCell(-1);z.innerHTML=m.cellIndex+1+"x"+(g.sectionRowIndex++1);for(G=0;G<w.rows.length;G++)for(J=w.rows[G],D=0;D<J.cells.length;D++)L=J.cells[D],G==g.sectionRowIndex&&D==m.cellIndex&&(E="blue"==L.style.backgroundColor),L.style.backgroundColor=G<=g.sectionRowIndex&&D<=m.cellIndex?"blue":"transparent"}mxEvent.consume(C);return E}f=null!=f?f:!0;b=null!=b?b:mxUtils.bind(this,function(C,E,D){var G=this.editorUi.editor.graph;if(null!=G.getParentByName(mxEvent.getSource(C),"TD")&&null!=G.cellEditor.textarea){var J=G.cellEditor.textarea.getElementsByTagName("table");+C=[];for(var L=0;L<J.length;L++)C.push(J[L]);G.container.focus();L=G.pasteHtmlAtCaret;J=["<table>"];for(var Q=0;Q<E;Q++){J.push("<tr>");for(var N=0;N<D;N++)J.push("<td><br></td>");J.push("</tr>")}J.push("</table>");E=J.join("");L.call(G,E);E=G.cellEditor.textarea.getElementsByTagName("table");if(E.length==C.length+1)for(L=E.length-1;0<=L;L--)if(0==L||E[L]!=C[L-1]){G.selectNode(E[L].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,g=null,m=null;null==e&&(a.div.className+=" geToolbarMenu",a.labels=!1);a=a.addItem("",null,null,e,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";e=a.getElementsByTagName("td");1<e.length&&(e[1].style.display="none",e[2].style.display="none");a.firstChild.innerText="";var p=document.createElement("input");p.setAttribute("id","geTitleOption");p.setAttribute("type","checkbox");p.style.verticalAlign="middle";e=document.createElement("label");mxUtils.write(e,mxResources.get("title"));e.setAttribute("for","geTitleOption");e.style.verticalAlign="middle";mxEvent.addGestureListeners(e,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));var k=document.createElement("input");k.setAttribute("id","geContainerOption");k.setAttribute("type","checkbox");k.style.verticalAlign="middle";var u=document.createElement("label");mxUtils.write(u,mxResources.get("container"));u.setAttribute("for","geContainerOption");u.style.verticalAlign="middle";mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));f&&(a.firstChild.appendChild(p),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(k),a.firstChild.appendChild(u),mxUtils.br(a.firstChild));var w=function(C,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse=-"collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var G=0;G<C;G++)for(var K=D.insertRow(G),L=0;L<E;L++)K.insertCell(-1);return D}(5,5);a.firstChild.appendChild(w);var z=document.createElement("div");z.style.textAlign="center";z.style.padding="4px";z.style.width="100%";z.innerHTML="1x1";a.firstChild.appendChild(z);mxEvent.addGestureListeners(w,null,null,mxUtils.bind(this,function(C){var E=h(C);null!=m&&null!=g&&E&&(b(C,g.sectionRowIndex++"collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var G=0;G<C;G++)for(var J=D.insertRow(G),L=0;L<E;L++)J.insertCell(-1);return D}(5,5);a.firstChild.appendChild(w);var z=document.createElement("div");z.style.textAlign="center";z.style.padding="4px";z.style.width="100%";z.innerHTML="1x1";a.firstChild.appendChild(z);mxEvent.addGestureListeners(w,null,null,mxUtils.bind(this,function(C){var E=h(C);null!=m&&null!=g&&E&&(b(C,g.sectionRowIndex+1,m.cellIndex+1,p.checked,k.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(w,"mouseover",h)};Menus.prototype.edgeStyleChange=function(a,b,e,f,h,d,g,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var z=k[w];if(p.getModel().isEdge(z)){if(g){var C=p.getCellGeometry(z);null!=C&&(C=C.clone(),C.points=null,p.getModel().setGeometry(z,C))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[z]);u.push(z)}}this.editorUi.fireEvent(new mxEventObject("styleChanged","cells",u,"keys",e,"values",f,"force",0==k.length))}finally{p.getModel().endUpdate()}}),d,h))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};@@ -3752,15 +3752,15 @@ Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var e=document.createElement("div");null!=a&&"data:"==a.substring(0,5)&&(e.className="geAdaptiveAsset",e.style.backgroundImage="url("+a+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="18px",e.style.width="22px",e.style.height="20px");b.appendChild(e);return b};Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b};Toolbar.prototype.addMenuHandler=function(a,b,e,f){if(null!=e){var h=this.editorUi.editor.graph,d=null,g=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(m){if(g&&(null==a.enabled||a.enabled)){h.popupMenuHandler.hideMenu();d=new mxPopupMenu(e);d.smartSeparators=!0;d.div.className+=" geToolbarMenu";d.showDisabled=f;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,-arguments);this.editorUi.resetCurrentMenu();d.destroy()});var p=mxUtils.getOffset(a);d.popup(p.x,p.y+a.offsetHeight,null,m);this.editorUi.setCurrentMenu(d,a)}g=!0;mxEvent.consume(m)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){g=null==d||null==d.div||null==d.div.parentNode;m.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,D,G){if(null==E)return[G,G,G];var K=Math.floor(E),-L=G*(1-D);E=G*(1-D*(K%2?E-K:1-(E-K)));switch(K){case 6:case 0:return[G,E,L];case 1:return[E,G,L];case 2:return[L,G,E];case 3:return[L,E,G];case 4:return[E,L,G];case 5:return[G,L,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage++arguments);this.editorUi.resetCurrentMenu();d.destroy()});var p=mxUtils.getOffset(a);d.popup(p.x,p.y+a.offsetHeight,null,m);this.editorUi.setCurrentMenu(d,a)}g=!0;mxEvent.consume(m)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){g=null==d||null==d.div||null==d.div.parentNode;m.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,D,G){if(null==E)return[G,G,G];var J=Math.floor(E),+L=G*(1-D);E=G*(1-D*(J%2?E-J:1-(E-J)));switch(J){case 6:case 0:return[G,E,L];case 1:return[E,G,L];case 2:return[L,G,E];case 3:return[L,E,G];case 4:return[E,L,G];case 5:return[G,L,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+")";e.style.position="absolute";e.style.overflow="hidden";e.style.cursor="crosshair";e.style.width="181px";e.style.height="101px";e.style.left="6px";e.style.top="4px";var f=document.createElement("div");f.style.background="url("+this.crossImage+")";f.style.pointerEvents="none";f.style.position="absolute";f.style.width="15px";f.style.height="15px";f.style.left="-8px";f.style.top="-8px";var h=[0,0,1];e.appendChild(f);b.appendChild(e);sliderBox=document.createElement("div");sliderBox.style.position="absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var d=document.createElement("div");d.style.border="1px solid light-dark(black, white)";d.style.pointerEvents="none";d.style.overflow="hidden";d.style.position="absolute";d.style.width="16px";d.style.height="101px";d.style.left="9px";d.style.top="0px";var g=!1,m=!1,p=mxUtils.bind(this,function(E){var D=Math.round(100*(1-h[1]));f.style.left=-Math.round(h[0]/6*180)-8+"px";f.style.top=D-8+"px";D=d.childNodes;for(var G=a(h[0],h[1],1),K=0;K<D.length;K++)D[K].style.backgroundColor="rgb("+G[0]*(1-K/D.length)*255+", "+G[1]*(1-K/D.length)*255+", "+G[2]*(1-K/D.length)*255+")";C.style.top=Math.round(100*(1-h[2]))-4+"px";D=a(h[0],h[1],h[2]);D="#"+("0"+Math.round(255*D[0]).toString(16)).slice(-2)+("0"+Math.round(255*D[1]).toString(16)).slice(-2)+("0"+Math.round(255*D[2]).toString(16)).slice(-2);1!=E&&this.fireEvent(new mxEventObject("change","color",+Math.round(h[0]/6*180)-8+"px";f.style.top=D-8+"px";D=d.childNodes;for(var G=a(h[0],h[1],1),J=0;J<D.length;J++)D[J].style.backgroundColor="rgb("+G[0]*(1-J/D.length)*255+", "+G[1]*(1-J/D.length)*255+", "+G[2]*(1-J/D.length)*255+")";C.style.top=Math.round(100*(1-h[2]))-4+"px";D=a(h[0],h[1],h[2]);D="#"+("0"+Math.round(255*D[0]).toString(16)).slice(-2)+("0"+Math.round(255*D[1]).toString(16)).slice(-2)+("0"+Math.round(255*D[2]).toString(16)).slice(-2);1!=E&&this.fireEvent(new mxEventObject("change","color",mxUtils.rgba2hex(D)))}),k=mxUtils.bind(this,function(E){0==h[2]&&(h[2]=1);g=!0;w(E)}),u=mxUtils.bind(this,function(E){m=!0;w(E)}),w=mxUtils.bind(this,function(E){if(g){var D=e.getBoundingClientRect(),G=mxEvent.getClientX(E)-D.left;E=mxEvent.getClientY(E)-D.top;f.style.left=G-8+"px";f.style.top=E-8+"px";G*=6/180;E=1-E/100;D=void 0;0>G&&(G=0);6<G&&(G=6);0>E&&(E=0);1<E&&(E=1);0>D&&(D=0);1<D&&(D=1);G=a(null==G?h[0]:h[0]=G,null==E?h[1]:h[1]=E,null==D?h[2]:h[2]=D);this.fromString("#"+("0"+Math.floor(255*G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+("0"+Math.floor(255*G[2]).toString(16)).slice(-2))}else m&&(D=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-D.top,h[2]=Math.max(Math.min(1,1-E/100),0),p())}),z=mxUtils.bind(this,function(){g=m=!1});mxEvent.addGestureListeners(e,k);mxEvent.addGestureListeners(sliderBox,u);mxEvent.addGestureListeners(b,null,w,z);mxEvent.addListener(b,"mouseleave",z);for(k=0;101>k;k+=4)u=document.createElement("div"),u.style.height="4px",u.style.pointerEvents="none",d.appendChild(u);b.appendChild(d);var C=document.createElement("div");C.style.background="url("+this.arrowImage+")";C.style.position="absolute";C.style.pointerEvents="none";C.style.width="7px";C.style.height="11px";C.style.left="2px";C.style.top="-3px";sliderBox.appendChild(C);sliderBox.appendChild(d);b.appendChild(sliderBox);this.fromString=function(E,D){D=null!=D?D:!1;if(null==E||""==E||mxUtils.isVarColor(E)||E==mxConstants.NONE)E="#ffffff",D=!0;var G=mxUtils.parseColor(E);-E=G.r/255;var K=G.g/255,L=G.b/255,Q=Math.min(Math.min(E,K),L);G=Math.max(Math.max(E,K),L);var N=G-Q;0===N?E=[null,0,G]:(E=E===Q?3+(L-K)/N:K===Q?5+(E-L)/N:1+(K-E)/N,E=[6===E?0:E,N/G,G]);null!=E[0]&&(h[0]=E[0]);0!=E[2]&&(h[1]=E[1]);h[2]=E[2];p(D)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";+E=G.r/255;var J=G.g/255,L=G.b/255,Q=Math.min(Math.min(E,J),L);G=Math.max(Math.max(E,J),L);var N=G-Q;0===N?E=[null,0,G]:(E=E===Q?3+(L-J)/N:J===Q?5+(E-L)/N:1+(J-E)/N,E=[6===E?0:E,N/G,G]);null!=E[0]&&(h[0]=E[0]);0!=E[2]&&(h[1]=E[1]);h[2]=E[2];p(D)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";var ColorDialog=function(a,b,e,f,h,d,g){function m(ca){return mxUtils.color2hex("#"+ca).substring(1).toUpperCase()}function p(){Z.src="none"==V.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ca){V.style.display=ca||"none"==V.style.display?"flex":"none";p()}function u(ca){""==ca.value&&null!=L&&N?ca.style.background=ca==P?L.dark:L.light:""==ca.value||ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)?ca.style.background="transparent":ca.style.background="#"+ca.value;ca.style.color="transparent"==ca.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ca.style.background)?"#ffffff":"#000000"}function w(){u(U);u(P)}function z(ca){ca?g&&null!=L?(U.value=L.light.substring(1).toUpperCase(),ca=!1):(U.value="",P.value="",T.value="automatic",U.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),P.setAttribute("title",mxResources.get("useBlackAndWhite")),U.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==U.value&&null!=L&&(U.value=L.light.substring(1).toUpperCase()),@@ -3768,33 +3768,33 @@ U.removeAttribute("placeholder"),U.removeAttribute("title"),""==P.value&&null!=Lz(!1),ca!=P||U.value==mxConstants.NONE&&P.value==mxConstants.NONE||(T.value="custom"),ca==U&&"automatic"==T.value&&(U.value==mxConstants.NONE?P.value=mxConstants.NONE:mxUtils.isVarColor(U.value)?P.value=U.value:P.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ca.value)).substring(1).toUpperCase()),w()):ia.click()}function E(){var ca=U.value,H=P.value;if(N&&null!=L||(/(^#?[a-zA-Z0-9]*$)/.test(ca)||mxUtils.isVarColor(ca))&&(/(^#?[a-zA-Z0-9]*$)/.test(H)||mxUtils.isVarColor(H))){if(N)ca="default";else if(""==ca&&(ca=mxConstants.NONE),""==H&&(H=mxConstants.NONE),ca==mxConstants.NONE||mxUtils.isVarColor(ca)||"#"==ca.charAt(0)||(ca="#"+m(ca)),H==mxConstants.NONE||mxUtils.isVarColor(H)||"#"==H.charAt(0)||(H="#"+m(H)),ca!=mxConstants.NONE&&H!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=T.value&&H!=mxConstants.NONE?ca==mxConstants.NONE?ColorDialog.addRecentColor(H.substring(1),12):ColorDialog.addRecentColor("light-dark("+ca+","+H+")",12):ca!=mxConstants.NONE&&ColorDialog.addRecentColor(ca.substring(1),12),"none"!=ca||"none"!=H)ca=ca==mxConstants.NONE?"transparent":ca,H=H==mxConstants.NONE?"transparent":H,g||"automatic"==T.value||(ca="light-dark("+ca+","+H+")");oa(ca);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function D(){mxClient.IS_TOUCH||(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null))}function G(){var ca=ba(0==ColorDialog.recentColors.length?-["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ca.style.marginBottom="8px";return ca}function K(ca){13==ca.keyCode&&(C(mxEvent.getSource(ca)),E())}var L=null!=d?mxUtils.getLightDarkColor(d,null,null,g):null,Q=a.editor.graph;this.editorUi=a;var N=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var U=document.createElement("input");U.style.textOverflow="ellipsis";U.style.margin=-"0 0 0 4px";U.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var Y=document.createElement("div");Y.style.display="flex";Y.style.alignItems="center";d.appendChild(Y);var P=document.createElement("input");P.style.textOverflow="ellipsis";P.style.margin="0 4px";P.style.maxWidth="60px";P.style.width="100%";var T=document.createElement("select");T.style.textOverflow="ellipsis";T.style.width="100%";var J=document.createElement("option");J.setAttribute("value","automatic");mxUtils.write(J,-mxResources.get("automatic"));T.appendChild(J);J=document.createElement("option");J.setAttribute("value","custom");mxUtils.write(J,mxResources.get("userDefined"));T.appendChild(J);T.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var V=document.createElement("div");V.style.padding="0 6px 0 6px";J=document.createElement("img");J.setAttribute("title",mxResources.get("dark"));J.className="geAdaptiveAsset";J.src=Editor.thinDarkImage;J.style.width="20px";V.appendChild(J);mxEvent.addListener(J,"click",-function(){P.focus()});V.appendChild(P);V.appendChild(T);V.style.display="flex";V.style.alignItems="center";J=document.createElement("div");J.style.display="flex";J.style.alignItems="center";J.style.userSelect="none";J.style.cursor="pointer";J.style.padding="2px 0 2px 0";var Z=document.createElement("img");Z.setAttribute("title",mxResources.get("dark"));Z.className="geAdaptiveAsset";Z.style.marginLeft="-2px";J.appendChild(Z);mxUtils.write(J,mxResources.get("advanced"));p();mxEvent.addListener(J,"click",+["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ca.style.marginBottom="8px";return ca}function J(ca){13==ca.keyCode&&(C(mxEvent.getSource(ca)),E())}var L=null!=d?mxUtils.getLightDarkColor(d,null,null,g):null,Q=a.editor.graph;this.editorUi=a;var N=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var U=document.createElement("input");U.style.textOverflow="ellipsis";U.style.margin=+"0 0 0 4px";U.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var Y=document.createElement("div");Y.style.display="flex";Y.style.alignItems="center";d.appendChild(Y);var P=document.createElement("input");P.style.textOverflow="ellipsis";P.style.margin="0 4px";P.style.maxWidth="60px";P.style.width="100%";var T=document.createElement("select");T.style.textOverflow="ellipsis";T.style.width="100%";var K=document.createElement("option");K.setAttribute("value","automatic");mxUtils.write(K,+mxResources.get("automatic"));T.appendChild(K);K=document.createElement("option");K.setAttribute("value","custom");mxUtils.write(K,mxResources.get("userDefined"));T.appendChild(K);T.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var V=document.createElement("div");V.style.padding="0 6px 0 6px";K=document.createElement("img");K.setAttribute("title",mxResources.get("dark"));K.className="geAdaptiveAsset";K.src=Editor.thinDarkImage;K.style.width="20px";V.appendChild(K);mxEvent.addListener(K,"click",+function(){P.focus()});V.appendChild(P);V.appendChild(T);V.style.display="flex";V.style.alignItems="center";K=document.createElement("div");K.style.display="flex";K.style.alignItems="center";K.style.userSelect="none";K.style.cursor="pointer";K.style.padding="2px 0 2px 0";var Z=document.createElement("img");Z.setAttribute("title",mxResources.get("dark"));Z.className="geAdaptiveAsset";Z.style.marginLeft="-2px";K.appendChild(Z);mxUtils.write(K,mxResources.get("advanced"));p();mxEvent.addListener(K,"click",function(){k();p();ColorDialog.collapsed="none"==V.style.display});var ia=mxUtils.button("",function(){z(!0);w();O.focus();""==O.value&&null!=L&&N&&sa.fromString(O==P?L.dark:L.light,!0)});mxEvent.addListener(T,"change",function(){"automatic"==T.value?(U.focus(),C(U)):(z(!1),mxUtils.isVarColor(P.value)||(P.value=N&&null!=L?L.dark.substring(1).toUpperCase():P.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+U.value)).substring(1).toUpperCase()),P.focus(),D());w()});mxEvent.addListener(U,"change",function(){C(U)});mxEvent.addListener(P,"change",function(){C(P)});var oa=null!=e?e:this.createApplyFunction();this.init=function(){D()};var sa=new ColorPicker,O=Editor.isDarkMode()&&("auto"==Q.getAdaptiveColors()||"simple"==Q.getAdaptiveColors()&&"custom"==T.value)&&!g?P:U;mxEvent.addListener(U,"focus",function(){O=U});mxEvent.addListener(P,"focus",function(){O=P});sa.addListener("change",function(ca,H){ca=H.getProperty("color").substring(1).toUpperCase();O.value.toUpperCase()!=ca&&(O.value=ca,C(O),window.setTimeout(function(){O.focus()},0))});e=document.createElement("div");e.appendChild(sa.div);var X=document.createElement("div");X.style.display="flex";X.style.flexFlow="row wrap";X.style.justifyContent="center";X.style.paddingTop="10px";var ba=mxUtils.bind(this,function(ca,H,ea,ra){H=null!=H?H:12;var qa=document.createElement("table");qa.style.borderCollapse="collapse";qa.setAttribute("cellspacing","0");qa.style.marginBottom="20px";qa.style.cellSpacing="0px";qa.style.marginLeft="1px";var Pa=document.createElement("tbody");qa.appendChild(Pa);for(var ma=ca.length/H,Ba=0;Ba<ma;Ba++){for(var Ca=document.createElement("tr"),Ja=0;Ja<H;Ja++)mxUtils.bind(this,function(Ia){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==Ia&&(Ia=ea);if(null!=Ia){Da.style.borderWidth="1px";if(Ia==mxConstants.NONE||null==Ia)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(Ia)){var Ga=mxUtils.getLightDarkColor(Ia);Da.style.background="linear-gradient(to right bottom, "+Ga.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ga).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+Ia;Ga=this.colorNames[String(Ia).toUpperCase()];null!=Ga&&Da.setAttribute("title",Ga)}Ca.appendChild(Da);null!=Ia&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(Ia==mxConstants.NONE){O==P&&P.value==mxConstants.NONE?U.value=mxConstants.NONE:O.value=mxConstants.NONE;if(O==U||O==P&&U.value==mxConstants.NONE)T.value="automatic";C(O);window.setTimeout(function(){O.focus()},0)}else if(mxUtils.isLightDarkColor(Ia)){k(!0);T.value="custom";var ta=mxUtils.getLightDarkColor(Ia);U.value=ta.light.substring(1).toUpperCase();P.value=ta.dark.substring(1).toUpperCase();C(U);C(P);O==U?sa.fromString(ta.light):sa.fromString(ta.dark)}else sa.fromString("#"+Ia)}),mxEvent.addListener(Da,"dblclick",E))})(ca[Ba*H+Ja]);Pa.appendChild(Ca)}ra&&(ca=document.createElement("td"),ca.setAttribute("title",mxResources.get("reset")),-ca.className="geAdaptiveAsset",ca.style.border="1px solid black",ca.style.padding="0px",ca.style.width="16px",ca.style.height="16px",ca.style.backgroundImage="url('"+Editor.crossImage+"')",ca.style.backgroundPosition="center center",ca.style.backgroundSize="14px 14px",ca.style.backgroundRepeat="no-repeat",ca.style.cursor="pointer",Ca.appendChild(ca),mxEvent.addListener(ca,"click",function(){ColorDialog.resetRecentColors();qa.parentNode.replaceChild(G(),qa)}));X.appendChild(qa);return qa});g||(d.appendChild(J),-!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==Q.getAdaptiveColors()||"automatic"!=T.value||(V.style.display="none",p()),J=document.createElement("img"),J.setAttribute("title",mxResources.get("light")),J.className="geAdaptiveAsset",J.src=Editor.thinLightImage,J.style.width="20px",Y.appendChild(J),mxEvent.addListener(J,"click",function(){U.focus()}));Y.appendChild(U);null!=L&&(ia.setAttribute("title",mxResources.get(g?"default":"useBlackAndWhite")),ia.style.cursor="pointer",ia.style.position=+ca.className="geAdaptiveAsset",ca.style.border="1px solid black",ca.style.padding="0px",ca.style.width="16px",ca.style.height="16px",ca.style.backgroundImage="url('"+Editor.crossImage+"')",ca.style.backgroundPosition="center center",ca.style.backgroundSize="14px 14px",ca.style.backgroundRepeat="no-repeat",ca.style.cursor="pointer",Ca.appendChild(ca),mxEvent.addListener(ca,"click",function(){ColorDialog.resetRecentColors();qa.parentNode.replaceChild(G(),qa)}));X.appendChild(qa);return qa});g||(d.appendChild(K),+!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==Q.getAdaptiveColors()||"automatic"!=T.value||(V.style.display="none",p()),K=document.createElement("img"),K.setAttribute("title",mxResources.get("light")),K.className="geAdaptiveAsset",K.src=Editor.thinLightImage,K.style.width="20px",Y.appendChild(K),mxEvent.addListener(K,"click",function(){U.focus()}));Y.appendChild(U);null!=L&&(ia.setAttribute("title",mxResources.get(g?"default":"useBlackAndWhite")),ia.style.cursor="pointer",ia.style.position="relative",ia.style.marginLeft="4px",ia.innerText="",Q=document.createElement("div"),Q.style.display="inline-block",Q.style.verticalAlign="middle",Q.style.borderStyle="solid",Q.style.borderWidth="1px",Q.style.marginTop="-2px",Q.style.width="12px",Q.style.height="12px",g?Q.style.backgroundColor=L.light:Q.style.backgroundImage="linear-gradient(to right bottom, "+L.cssText+" 50%, "+mxUtils.invertLightDarkColor(L).cssText+" 50.3%)",ia.appendChild(Q),Y.appendChild(ia),mxEvent.addListener(ia,"dblclick",-E));var da=document.createElement("input");da.setAttribute("type","color");da.style.position="relative";da.style.visibility="hidden";da.style.top="10px";da.style.width="0px";da.style.height="0px";da.style.border="none";e.style.whiteSpace="nowrap";Y.appendChild(da);Q=mxUtils.button("",function(){document.activeElement==da?U.focus():(da.value="#"+U.value,da.click())});Q.style.cursor="pointer";J=document.createElement("img");J.src=Editor.colorDropperImage;J.className="geAdaptiveAsset";J.style.position=-"relative";J.style.verticalAlign="middle";J.style.marginTop="-2px";J.style.width="auto";J.style.height="14px";Q.appendChild(J);Y.appendChild(Q);e.appendChild(d);mxEvent.addListener(da,"change",function(){sa.fromString(da.value)});g||e.appendChild(V);G();d=ba(this.presetColors);d.style.marginBottom="8px";d=ba(this.defaultColors);d.style.marginBottom="16px";e.appendChild(X);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=+E));var da=document.createElement("input");da.setAttribute("type","color");da.style.position="relative";da.style.visibility="hidden";da.style.top="10px";da.style.width="0px";da.style.height="0px";da.style.border="none";e.style.whiteSpace="nowrap";Y.appendChild(da);Q=mxUtils.button("",function(){document.activeElement==da?U.focus():(da.value="#"+U.value,da.click())});Q.style.cursor="pointer";K=document.createElement("img");K.src=Editor.colorDropperImage;K.className="geAdaptiveAsset";K.style.position=+"relative";K.style.verticalAlign="middle";K.style.marginTop="-2px";K.style.width="auto";K.style.height="14px";Q.appendChild(K);Y.appendChild(Q);e.appendChild(d);mxEvent.addListener(da,"change",function(){sa.fromString(da.value)});g||e.appendChild(V);G();d=ba(this.presetColors);d.style.marginBottom="8px";d=ba(this.defaultColors);d.style.marginBottom="16px";e.appendChild(X);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent="end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});Y.className="geBtn";a.editor.cancelFirst&&d.appendChild(Y);Q=mxUtils.button(mxResources.get("apply"),E);Q.className="geBtn gePrimaryBtn";d.appendChild(Q);a.editor.cancelFirst||d.appendChild(Y);null!=b&&("default"==b?ia.click():(Y=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==Y.light?U.value=mxConstants.NONE:mxUtils.isVarColor(Y.light)?U.value=Y.light:(mxUtils.isRgbColor(Y.light)?Y.light=mxUtils.rgba2hex(Y.light):mxUtils.isHexColor(Y.light)||(Y.light="#"+m(Y.light)),U.value=Y.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==Y.dark?P.value=mxConstants.NONE:mxUtils.isVarColor(Y.dark)?P.value=Y.dark:(mxUtils.isRgbColor(Y.dark)?Y.dark=mxUtils.rgba2hex(Y.dark):mxUtils.isHexColor(Y.dark)||(Y.dark="#"+m(Y.dark)),P.value=Y.dark.substring(1).toUpperCase()),sa.fromString(O.value,-!0),w()));g||!ColorDialog.collapsed||"automatic"!=T.value||Editor.isDarkMode()||(V.style.display="none",p());e.appendChild(d);this.picker=sa;this.colorInput=U;mxEvent.addListener(U,"keypress",K);mxEvent.addListener(P,"keypress",K);mxEvent.addListener(e,"keydown",function(ca){27==ca.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ca))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");+!0),w()));g||!ColorDialog.collapsed||"automatic"!=T.value||Editor.isDarkMode()||(V.style.display="none",p());e.appendChild(d);this.picker=sa;this.colorInput=U;mxEvent.addListener(U,"keypress",J);mxEvent.addListener(P,"keypress",J);mxEvent.addListener(e,"keydown",function(ca){27==ca.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ca))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");ColorDialog.prototype.createApplyFunction=function(){return ColorDialog.createApplyFunction(this.editorUi,this.currentColorKey)};ColorDialog.createApplyFunction=function(a,b){return function(e){var f=a.editor.graph;f.getModel().beginUpdate();try{f.setCellStyles(b,e),a.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[e],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}};ColorDialog.recentColors=[];ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};ColorDialog.collapsed=!0;var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var e=document.createElement("h3");mxUtils.write(e,mxResources.get("about")+" GraphEditor");b.appendChild(e);e=document.createElement("img");e.style.border="0px";e.setAttribute("width","176");e.setAttribute("width","151");e.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(e);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);e=document.createElement("a");e.setAttribute("href","http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C,E){k=null!=k?k:!1;g=document.createElement("div");g.style.position="absolute";g.style.top="20px";g.style.bottom="20px";g.style.left="20px";g.style.right="20px";m=document.createElement("div");-m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);g.appendChild(m);g.appendChild(D);g.appendChild(G);null!=E&&m.appendChild(E);var K=document.createElement("textarea");u?K.setAttribute("wrap","off"):K.style.wordBreak="break-all";-K.setAttribute("spellcheck","false");K.setAttribute("autocorrect","off");K.setAttribute("autocomplete","off");K.setAttribute("autocapitalize","off");mxUtils.write(K,e||"");K.style.resize="none";K.style.outline="none";K.style.position="absolute";K.style.boxSizing="border-box";K.style.top="0px";K.style.left="0px";K.style.height="100%";K.style.width="100%";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};D.appendChild(K);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=-C)for(b=0;b<C.length;b++)(function(Q,N,U){Q=mxUtils.button(Q,function(Y){N(Y,K)});null!=U&&Q.setAttribute("title",U);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=h&&h()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,K);if(null!=f){var L=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(K.value)});L.setAttribute("title",-"Ctrl+Enter");L.className="geBtn gePrimaryBtn";G.appendChild(L);mxEvent.addListener(K,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&L.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=g},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize",+m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);g.appendChild(m);g.appendChild(D);g.appendChild(G);null!=E&&m.appendChild(E);var J=document.createElement("textarea");u?J.setAttribute("wrap","off"):J.style.wordBreak="break-all";+J.setAttribute("spellcheck","false");J.setAttribute("autocorrect","off");J.setAttribute("autocomplete","off");J.setAttribute("autocapitalize","off");mxUtils.write(J,e||"");J.style.resize="none";J.style.outline="none";J.style.position="absolute";J.style.boxSizing="border-box";J.style.top="0px";J.style.left="0px";J.style.height="100%";J.style.width="100%";this.textarea=J;this.init=function(){J.focus();J.scrollTop=0};D.appendChild(J);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=+C)for(b=0;b<C.length;b++)(function(Q,N,U){Q=mxUtils.button(Q,function(Y){N(Y,J)});null!=U&&Q.setAttribute("title",U);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=h&&h()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,J);if(null!=f){var L=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(J.value)});L.setAttribute("title",+"Ctrl+Enter");L.className="geBtn gePrimaryBtn";G.appendChild(L);mxEvent.addListener(J,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&L.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=g},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.overflow="auto";e.style.resize="none";e.style.width="600px";e.style.height="360px";e.style.marginBottom="16px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),e.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var p=new FileReader;p.onload=function(k){e.value=k.target.result};p.readAsText(m)}else e.value=a.extractGraphModelFromEvent(m)},!1));var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&b.appendChild(h);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var g=document.createElement("option");g.setAttribute("value","apply");mxUtils.write(g,mxResources.get("apply",null,"Update Existing Drawing"));d.appendChild(g)}a.editor.graph.isEnabled()&&(g=document.createElement("option"),g.setAttribute("value","insert"),mxUtils.write(g,mxResources.get("insert")),d.appendChild(g));g=document.createElement("option");g.setAttribute("value","new");mxUtils.write(g,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&d.appendChild(g);b.appendChild(d);g=mxUtils.button(mxResources.get("ok"),function(){var m=Graph.zapGremlins(mxUtils.trim(e.value)),p=null;@@ -3808,30 +3808,30 @@ k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(kk=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");h.appendChild(k);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("value","100");z.style.width="180px";k=document.createElement("td");k.appendChild(z);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");h.appendChild(k);var C=document.createElement("input");C.setAttribute("value",g);C.style.width="180px";k=document.createElement("td");k.appendChild(C);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");h.appendChild(k);var E=document.createElement("input");E.setAttribute("value",m);E.style.width="180px";k=document.createElement("td");k.appendChild(E);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");h.appendChild(k);var D=document.createElement("select");D.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");D.appendChild(k);k=document.createElement("option");-k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var K=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=-"",G.focus()):(G.value=this.value,K||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var P=parseInt(G.value);isNaN(P)||0>=P?G.style.backgroundColor="red":(G.style.backgroundColor="",K||(z.value=P))});k=document.createElement("td");k.appendChild(D);k.appendChild(G);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");h.appendChild(k);var L=document.createElement("input");+k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var J=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=+"",G.focus()):(G.value=this.value,J||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var P=parseInt(G.value);isNaN(P)||0>=P?G.style.backgroundColor="red":(G.style.backgroundColor="",J||(z.value=P))});k=document.createElement("td");k.appendChild(D);k.appendChild(G);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");h.appendChild(k);var L=document.createElement("input");L.setAttribute("type","checkbox");L.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(L);mxUtils.write(k,mxResources.get("transparent"));h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");h.appendChild(k);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=!1;k=document.createElement("td");k.appendChild(Q);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");h.appendChild(k);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("value",ExportDialog.lastBorderValue);N.style.width="180px";k=document.createElement("td");k.appendChild(N);h.appendChild(k);p.appendChild(h);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(z,"change",-function(){K=!0;var P=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*P).toFixed(2));0<g?(C.value=Math.floor(g*P),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value)/g;0<P?(z.value=parseFloat((100*P).toFixed(2)),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(E,"change",function(){var P=parseInt(E.value)/m;0<P?(z.value=parseFloat((100*P).toFixed(2)),C.value=Math.floor(g*-P)):(z.value="100",C.value=g,E.value=m);e()});h=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=u.value,T=w.value,J=Math.max(0,parseFloat(z.value)||100)/100,V=Math.max(0,parseInt(N.value)),Z=f.background,ia=Math.max(1,parseInt(G.value));if(("svg"==T||"png"==T||-"pdf"==T)&&L.checked)Z=null;else if(null==Z||Z==mxConstants.NONE)Z="#ffffff";ExportDialog.lastBorderValue=V;ExportDialog.exportFile(a,P,T,Z,J,V,ia,Q.checked)}}));U.className="geBtn gePrimaryBtn";var Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});Y.className="geBtn";a.editor.cancelFirst?(k.appendChild(Y),k.appendChild(U)):(k.appendChild(U),k.appendChild(Y));h.appendChild(k);p.appendChild(h);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;+function(){J=!0;var P=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*P).toFixed(2));0<g?(C.value=Math.floor(g*P),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value)/g;0<P?(z.value=parseFloat((100*P).toFixed(2)),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(E,"change",function(){var P=parseInt(E.value)/m;0<P?(z.value=parseFloat((100*P).toFixed(2)),C.value=Math.floor(g*+P)):(z.value="100",C.value=g,E.value=m);e()});h=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=u.value,T=w.value,K=Math.max(0,parseFloat(z.value)||100)/100,V=Math.max(0,parseInt(N.value)),Z=f.background,ia=Math.max(1,parseInt(G.value));if(("svg"==T||"png"==T||+"pdf"==T)&&L.checked)Z=null;else if(null==Z||Z==mxConstants.NONE)Z="#ffffff";ExportDialog.lastBorderValue=V;ExportDialog.exportFile(a,P,T,Z,K,V,ia,Q.checked)}}));U.className="geBtn gePrimaryBtn";var Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});Y.className="geBtn";a.editor.cancelFirst?(k.appendChild(Y),k.appendChild(U)):(k.appendChild(U),k.appendChild(Y));h.appendChild(k);p.appendChild(h);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;ExportDialog.exportFile=function(a,b,e,f,h,d,g,m){m=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(f,h,d)),b,e);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/h-p.x)/m.view.scale),Math.floor((d/h-p.y)/m.view.scale));k.scale(h/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*h/m.view.scale+2*d);h=Math.ceil(p.height*h/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*h<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+h+"&"+u+"&dpi="+g)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};var EditDataDialog=function(a,b){function e(){0<N.value.length?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")}var f=document.createElement("div"),h=a.editor.graph,d=h.getModel().getValue(b);if(!mxUtils.isNode(d)){var g=mxUtils.createXmlDocument().createElement("object");g.setAttribute("label",d||"");d=g}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(P){}var k=new mxForm("properties");k.table.style.width=-"100%";var u=d.attributes,w=[],z=[],C=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(P,T){var J=document.createElement("div");J.style.position="relative";J.style.paddingRight="20px";J.style.boxSizing="border-box";J.style.width="100%";var V=document.createElement("a"),Z=mxUtils.createImage(Dialog.prototype.closeImage);Z.style.height="9px";Z.style.fontSize="9px";Z.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";V.className="geButton";V.setAttribute("title",-mxResources.get("delete"));V.style.position="absolute";V.style.top="4px";V.style.right="0px";V.style.margin="0px";V.style.width="9px";V.style.height="9px";V.style.cursor="pointer";V.appendChild(Z);T=function(ia){return function(){for(var oa=0,sa=0;sa<w.length;sa++){if(w[sa]==ia){z[sa]=null;k.table.deleteRow(oa+(null!=E?1:0));break}null!=z[sa]&&oa++}}}(T);mxEvent.addListener(V,"click",T);T=P.parentNode;J.appendChild(P);J.appendChild(V);T.appendChild(J)};g=function(P,T,J){w[P]=T;z[P]=k.addTextarea(w[C]+-":",J,2);z[P].style.width="100%";0<J.indexOf("\n")&&z[P].setAttribute("rows","2");D(z[P],T);null!=m[T]&&0==m[T].editable&&z[P].setAttribute("disabled","disabled")};p=[];for(var G=h.getModel().getParent(b)==h.getModel().getRoot(),K=h.getCellStyle(b),L=0;L<u.length;L++)("label"!=u[L].nodeName||"1"==K.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[L].nodeName&&p.push({name:u[L].nodeName,value:u[L].nodeValue});p.sort(function(P,T){return"label"==P.name?1:"label"==T.name?-1:P.name<T.name?-1:P.name>-T.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var Q=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(P){P=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(T){if(null!=T&&0<T.length&&T!=E)if(h.model.isRoot(b)){var J=a.getPageById(E);if(null!=J)if(null==a.getPageById(T)){var V=a.getPageIndex(J);0<=V&&(a.removePage(J),J.node.setAttribute("id",-T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),a.insertPage(J,V))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==h.getModel().getCell(T)?(h.getModel().cellRemoved(b),b.setId(T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),h.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[T])})}),mxResources.get("id"));a.showDialog(P.container,300,80,!0,!0);P.init()})}for(L=0;L<p.length;L++)g(C,p[L].name,p[L].value),C++;p=document.createElement("div");+"100%";var u=d.attributes,w=[],z=[],C=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(P,T){var K=document.createElement("div");K.style.position="relative";K.style.paddingRight="20px";K.style.boxSizing="border-box";K.style.width="100%";var V=document.createElement("a"),Z=mxUtils.createImage(Dialog.prototype.closeImage);Z.style.height="9px";Z.style.fontSize="9px";Z.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";V.className="geButton";V.setAttribute("title",+mxResources.get("delete"));V.style.position="absolute";V.style.top="4px";V.style.right="0px";V.style.margin="0px";V.style.width="9px";V.style.height="9px";V.style.cursor="pointer";V.appendChild(Z);T=function(ia){return function(){for(var oa=0,sa=0;sa<w.length;sa++){if(w[sa]==ia){z[sa]=null;k.table.deleteRow(oa+(null!=E?1:0));break}null!=z[sa]&&oa++}}}(T);mxEvent.addListener(V,"click",T);T=P.parentNode;K.appendChild(P);K.appendChild(V);T.appendChild(K)};g=function(P,T,K){w[P]=T;z[P]=k.addTextarea(w[C]++":",K,2);z[P].style.width="100%";0<K.indexOf("\n")&&z[P].setAttribute("rows","2");D(z[P],T);null!=m[T]&&0==m[T].editable&&z[P].setAttribute("disabled","disabled")};p=[];for(var G=h.getModel().getParent(b)==h.getModel().getRoot(),J=h.getCellStyle(b),L=0;L<u.length;L++)("label"!=u[L].nodeName||"1"==J.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[L].nodeName&&p.push({name:u[L].nodeName,value:u[L].nodeValue});p.sort(function(P,T){return"label"==P.name?1:"label"==T.name?-1:P.name<T.name?-1:P.name>+T.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var Q=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(P){P=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(T){if(null!=T&&0<T.length&&T!=E)if(h.model.isRoot(b)){var K=a.getPageById(E);if(null!=K)if(null==a.getPageById(T)){var V=a.getPageIndex(K);0<=V&&(a.removePage(K),K.node.setAttribute("id",+T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),a.insertPage(K,V))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==h.getModel().getCell(T)?(h.getModel().cellRemoved(b),b.setId(T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),h.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[T])})}),mxResources.get("id"));a.showDialog(P.container,300,80,!0,!0);P.init()})}for(L=0;L<p.length;L++)g(C,p[L].name,p[L].value),C++;p=document.createElement("div");p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);g=document.createElement("div");g.style.display="flex";g.style.alignItems="center";g.style.boxSizing="border-box";g.style.paddingRight="160px";g.style.whiteSpace="nowrap";g.style.marginTop="6px";g.style.width="100%";var N=document.createElement("input");N.setAttribute("placeholder",mxResources.get("enterPropertyName"));N.setAttribute("type","text");N.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");N.style.boxSizing="border-box";N.style.borderWidth="1px";N.style.borderStyle="solid";N.style.marginLeft="2px";N.style.padding="4px";N.style.width="100%";g.appendChild(N);p.appendChild(g);f.appendChild(p);var U=mxUtils.button(mxResources.get("addProperty"),function(){var P=N.value;if(0<P.length&&"label"!=P&&"id"!=P&&"placeholders"!=P&&0>P.indexOf(":"))try{var T=mxUtils.indexOf(w,P);if(0<=T&&null!=z[T])z[T].focus();else{d.cloneNode(!1).setAttribute(P,-"");0<=T&&(w.splice(T,1),z.splice(T,1));w.push(P);var J=k.addTextarea(P+":","",2);J.style.width="100%";z.push(J);D(J,P);J.focus()}U.setAttribute("disabled","disabled");N.value=""}catch(V){mxUtils.alert(V)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(N,"keypress",function(P){13==P.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():N.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";+"");0<=T&&(w.splice(T,1),z.splice(T,1));w.push(P);var K=k.addTextarea(P+":","",2);K.style.width="100%";z.push(K);D(K,P);K.focus()}U.setAttribute("disabled","disabled");N.value=""}catch(V){mxUtils.alert(V)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(N,"keypress",function(P){13==P.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():N.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";U.style.position="absolute";U.style.overflow="hidden";U.style.width="144px";U.style.right="0px";U.className="geBtn";g.appendChild(U);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";g=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(P){var T=h.getDataForCells([b],!0);P=new EmbedDialog(a,JSON.stringify(T,null,2),null,null,function(){console.log(T);a.alert("Written to Console (Dev Tools)")},mxResources.get("export"),null,"Console","data.json");a.showDialog(P.container,450,240,!0,!0);P.init()}));g.setAttribute("title",mxResources.get("export"));g.className="geBtn";var Y=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var P=!1,T=0;T<w.length;T++)null==z[T]?d.removeAttribute(w[T]):(d.setAttribute(w[T],z[T].value),P=P||"placeholder"==w[T]&&"1"==d.getAttribute("placeholders"));P&&d.removeAttribute("label");h.getModel().setValue(b,-d)}catch(J){mxUtils.alert(J)}});Y.setAttribute("title","Ctrl+Enter");Y.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(P){13==P.keyCode&&mxEvent.isControlDown(P)&&Y.click()});mxEvent.addListener(N,"keyup",e);mxEvent.addListener(N,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),-G.style.marginRight="10px",K=document.createElement("input"),K.setAttribute("type","checkbox"),K.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(K.setAttribute("checked","checked"),K.defaultChecked=!0),mxEvent.addListener(K,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(K),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),+d)}catch(K){mxUtils.alert(K)}});Y.setAttribute("title","Ctrl+Enter");Y.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(P){13==P.keyCode&&mxEvent.isControlDown(P)&&Y.click()});mxEvent.addListener(N,"keyup",e);mxEvent.addListener(N,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),+G.style.marginRight="10px",J=document.createElement("input"),J.setAttribute("type","checkbox"),J.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(J.setAttribute("checked","checked"),J.defaultChecked=!0),mxEvent.addListener(J,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(J),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),u.appendChild(G);a.editor.cancelFirst&&u.appendChild(p);u.appendChild(g);u.appendChild(Y);a.editor.cancelFirst||u.appendChild(p);f.appendChild(u);this.container=f};EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)&&(e=b.getId());return e};EditDataDialog.placeholderHelpLink=null;var LinkDialog=function(a,b,e,f){var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("value",b);g.setAttribute("placeholder","http://www.example.com/");g.setAttribute("type","text");g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";@@ -3848,17 +3848,17 @@ p.removeSelectionCells(p.getModel().getDescendants(oa));mxEvent.consume(H)}});X."block",ia.style.textAlign="right",ia.style.whiteSpace="nowrap",ia.style.position="absolute",ia.style.right="16px",ia.style.top="6px",0<Z&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toBack")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="▼",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",ia.appendChild(X),mxEvent.addListener(X,"click",function(H){p.isEnabled()&&p.addCell(oa,p.model.root,Z-1);mxEvent.consume(H)})),0<=Z&&Z<C-1&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toFront")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="▲",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",ia.appendChild(X),mxEvent.addListener(X,"click",function(H){p.isEnabled()&&p.addCell(oa,p.model.root,Z+1);mxEvent.consume(H)})),O.appendChild(ia);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(O.setAttribute("draggable","true"),O.style.cursor="move")}mxEvent.addListener(O,"dblclick",function(H){var ea=mxEvent.getSource(H).nodeName;"INPUT"!=ea&&"IMG"!=ea&&"true"!=ba.contentEditable&&(m(oa),mxEvent.consume(H))});p.getDefaultParent()==oa&&(O.classList.add("geActivePage"),O.style.fontWeight=p.isEnabled()?"bold":"",E=oa);mxEvent.addListener(O,"click",function(H){p.isEnabled()&&"true"!=ba.contentEditable&&(p.setDefaultParent(sa),p.view.setCurrentRoot(null),mxEvent.isShiftDown(H)&&p.setSelectionCells(oa.children),-mxEvent.consume(H))});u.appendChild(O)}p.isEnabled()?(K.classList.remove("mxDisabled"),Q.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),Y.classList.remove("mxDisabled")):(K.classList.add("mxDisabled"),Q.classList.add("mxDisabled"),U.classList.add("mxDisabled"),Y.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";N.clear();for(var J=C-1;0<=J;J--)mxUtils.bind(this,function(Z){T(J,p.convertValueToString(Z)||mxResources.get("background"),Z,Z)})(p.model.getChildAt(p.model.root,-J));var V=p.convertValueToString(E)||mxResources.get("background");K.setAttribute("title",mxResources.get("removeIt",[V]));U.setAttribute("title",mxResources.get("duplicateIt",[V]));p.isSelectionEmpty()&&L.classList.add("mxDisabled");d()}function m(T){if(p.isEnabled()&&null!=T){var J=N.get(T);if(null!=J){var V=J.getElementsByTagName("span");if(null!=V&&0<V.length){var Z=V[0],ia=mxUtils.getTextContent(Z);Z.style.textOverflow="";Z.style.cursor="text";Z.contentEditable="true";Z.focus();document.execCommand("selectAll",-!1,null);J.removeAttribute("draggable");J.style.cursor="";var oa=function(sa){if("true"==Z.contentEditable){Z.contentEditable="false";var O=mxUtils.getTextContent(Z);sa&&O!=ia?(O=mxUtils.getTextContent(Z),0<O.length?p.cellLabelChanged(T,O):p.cellLabelChanged(T,mxResources.get("untitledLayer"))):g()}};mxEvent.addListener(Z,"keydown",function(sa){if(13==sa.keyCode||27==sa.keyCode)oa(13==sa.keyCode),mxEvent.consume(sa)});mxEvent.addListener(Z,"blur",function(sa){oa(!0);mxEvent.consume(sa)})}}}}var p=+mxEvent.consume(H))});u.appendChild(O)}p.isEnabled()?(J.classList.remove("mxDisabled"),Q.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),Y.classList.remove("mxDisabled")):(J.classList.add("mxDisabled"),Q.classList.add("mxDisabled"),U.classList.add("mxDisabled"),Y.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";N.clear();for(var K=C-1;0<=K;K--)mxUtils.bind(this,function(Z){T(K,p.convertValueToString(Z)||mxResources.get("background"),Z,Z)})(p.model.getChildAt(p.model.root,+K));var V=p.convertValueToString(E)||mxResources.get("background");J.setAttribute("title",mxResources.get("removeIt",[V]));U.setAttribute("title",mxResources.get("duplicateIt",[V]));p.isSelectionEmpty()&&L.classList.add("mxDisabled");d()}function m(T){if(p.isEnabled()&&null!=T){var K=N.get(T);if(null!=K){var V=K.getElementsByTagName("span");if(null!=V&&0<V.length){var Z=V[0],ia=mxUtils.getTextContent(Z);Z.style.textOverflow="";Z.style.cursor="text";Z.contentEditable="true";Z.focus();document.execCommand("selectAll",+!1,null);K.removeAttribute("draggable");K.style.cursor="";var oa=function(sa){if("true"==Z.contentEditable){Z.contentEditable="false";var O=mxUtils.getTextContent(Z);sa&&O!=ia?(O=mxUtils.getTextContent(Z),0<O.length?p.cellLabelChanged(T,O):p.cellLabelChanged(T,mxResources.get("untitledLayer"))):g()}};mxEvent.addListener(Z,"keydown",function(sa){if(13==sa.keyCode||27==sa.keyCode)oa(13==sa.keyCode),mxEvent.consume(sa)});mxEvent.addListener(Z,"blur",function(sa){oa(!0);mxEvent.consume(sa)})}}}}var p=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom=parseInt("26px")+7+"px";k.appendChild(u);var w=null,z=null;mxEvent.addListener(k,"dragover",function(T){T.dataTransfer.dropEffect="move";z=0;T.stopPropagation();T.preventDefault()});mxEvent.addListener(k,"drop",function(T){T.stopPropagation();T.preventDefault()});var C=null,E=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height="26px";D.style.overflow="hidden";D.style.padding="3px 4px 4px 4px";D.style.borderWidth="1px 0px 0px 0px";D.style.borderStyle="solid";D.style.display="block";D.style.whiteSpace="nowrap";var G=document.createElement("a");G.className="geToolbarButton geAdaptiveAsset geToggleItem";-G.style.width="16px";G.style.height="18px";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="20px";G.style.margin="0 2px";G.style.display="inline-block";G.style.cursor="pointer";var K=G.cloneNode(!1);K.style.backgroundImage="url("+Editor.trashImage+")";K.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(K,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var J=p.model.root.getIndex(E);p.removeCells([E],!1);-0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<J&&J<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,J-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(T)});p.isEnabled()||K.classList.add("mxDisabled");D.appendChild(K);var L=G.cloneNode();L.style.backgroundImage="url("+Editor.layersImage+")";L.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(L,-"click",function(T){if(p.isEnabled()&&!p.isSelectionEmpty()){var J=mxUtils.getOffset(L);a.showPopupMenu(mxUtils.bind(this,function(V,Z){for(var ia=p.getLayerForCells(p.getSelectionCells()),oa=C-1;0<=oa;oa--)mxUtils.bind(this,function(sa){var O="1"==mxUtils.getValue(p.getCurrentCellStyle(sa),"locked","0"),X=V.addItem(p.convertValueToString(sa)||mxResources.get("background"),null,mxUtils.bind(this,function(){O||p.moveCells(p.getSelectionCells(),0,0,!1,sa)}),Z,null,null,!O);O?V.addCheckmark(X,Editor.lockedImage):-sa==ia&&V.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,oa))}),J.x,J.y+L.offsetHeight,T)}});D.appendChild(L);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,"click",function(T){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(T)});p.isEnabled()||Q.classList.add("mxDisabled");D.appendChild(Q);var N=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage++G.style.width="16px";G.style.height="18px";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="20px";G.style.margin="0 2px";G.style.display="inline-block";G.style.cursor="pointer";var J=G.cloneNode(!1);J.style.backgroundImage="url("+Editor.trashImage+")";J.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(J,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var K=p.model.root.getIndex(E);p.removeCells([E],!1);+0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<K&&K<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,K-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(T)});p.isEnabled()||J.classList.add("mxDisabled");D.appendChild(J);var L=G.cloneNode();L.style.backgroundImage="url("+Editor.layersImage+")";L.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(L,+"click",function(T){if(p.isEnabled()&&!p.isSelectionEmpty()){var K=mxUtils.getOffset(L);a.showPopupMenu(mxUtils.bind(this,function(V,Z){for(var ia=p.getLayerForCells(p.getSelectionCells()),oa=C-1;0<=oa;oa--)mxUtils.bind(this,function(sa){var O="1"==mxUtils.getValue(p.getCurrentCellStyle(sa),"locked","0"),X=V.addItem(p.convertValueToString(sa)||mxResources.get("background"),null,mxUtils.bind(this,function(){O||p.moveCells(p.getSelectionCells(),0,0,!1,sa)}),Z,null,null,!O);O?V.addCheckmark(X,Editor.lockedImage):+sa==ia&&V.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,oa))}),K.x,K.y+L.offsetHeight,T)}});D.appendChild(L);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,"click",function(T){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(T)});p.isEnabled()||Q.classList.add("mxDisabled");D.appendChild(Q);var N=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage+")";U.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(U,"click",function(T){if(p.isEnabled()){T=null;p.model.beginUpdate();try{T=p.cloneCell(E),p.cellLabelChanged(T,mxResources.get("untitledLayer")),T.setVisible(!0),T=p.addCell(T,p.model.root),p.setDefaultParent(T)}finally{p.model.endUpdate()}null==T||p.isCellLocked(T)||p.selectAll(T)}});p.isEnabled()||U.classList.add("mxDisabled");D.appendChild(U);var Y=G.cloneNode(!1);Y.style.backgroundImage="url("+Editor.plusImage+")";Y.setAttribute("title",-mxResources.get("addLayer"));mxEvent.addListener(Y,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var J=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(J)}finally{p.model.endUpdate()}m(J)}mxEvent.consume(T)});p.isEnabled()||Y.classList.add("mxDisabled");D.appendChild(Y);k.appendChild(D);var P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="•";P.style.position="absolute";P.style.fontWeight=+mxResources.get("addLayer"));mxEvent.addListener(Y,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var K=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(K)}finally{p.model.endUpdate()}m(K)}mxEvent.consume(T)});p.isEnabled()||Y.classList.add("mxDisabled");D.appendChild(Y);k.appendChild(D);var P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="•";P.style.position="absolute";P.style.fontWeight="bold";P.style.fontSize="16pt";P.style.right="6px";g();p.model.addListener(mxEvent.CHANGE,g);p.addListener("defaultParentChanged",g);a.addListener("lockedChanged",g);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?L.classList.add("mxDisabled"):L.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,h,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=g;a.installResizeHandler(this,!0)};(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";@@ -7236,16 +7236,16 @@ this.addEntry("db database schema er entity relation table list",function(){var"List")}),this.addEntry("db database schema er entity relation table list",function(){return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"List Item 1")}),this.addEntry("db database schema er entity relation table table row",function(){var e=new mxCell(d.value,new mxGeometry(0,0,90,d.geometry.height),"shape=partialRectangle;fillColor=none;align=left;verticalAlign=middle;strokeColor=none;spacingLeft=34;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");e.vertex=!0;var f=b.cloneCell(d,"");f.connectable=!1;f.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;stokeWidth=1;dashed=1;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";f.geometry.width=30;e.insert(f);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"List Item 2")}),this.addEntry("db database schema er entity relation table table row divider hline line separator",function(){var e=new mxCell("",new mxGeometry(0,0,60,10),"line;strokeWidth=1;rotatable=0;dashed=0;labelPosition=right;align=left;verticalAlign=middle;spacingTop=0;spacingLeft=6;points=[];portConstraint=eastwest;");e.vertex=!0;return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"List Item 3")}),this.addEntry("db database schema er entity relation table table",function(){var e=new mxCell("Entity",new mxGeometry(0,0,160,120),"swimlane;childLayout=stackLayout;horizontal=1;startSize=50;horizontalStack=0;rounded=1;fontSize=14;fontStyle=0;strokeWidth=2;resizeParent=0;resizeLast=1;shadow=0;dashed=0;align=center;arcSize=4;whiteSpace=wrap;html=1;");-e.vertex=!0;var f=new mxCell("+Attribute1\n+Attribute2\n+Attribute3",new mxGeometry(0,30,160,90),"align=left;strokeColor=none;fillColor=none;spacingLeft=4;fontSize=12;verticalAlign=top;resizable=0;rotatable=0;part=1;html=1;");f.vertex=!0;e.insert(f);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Entity")}),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Entity",null,null,"db database schema er entity relation table "),this.createVertexTemplateEntry("rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;",-100,40,"Entity","Entity (Rounded)",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Weak Entity",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,"Attribute","Attribute",null,null,"db database schema er entity relation table attribute chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;",-100,40,"Attribute","Key Attribute",null,null,"db database schema er entity relation table attribute key chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,'<span style="border-bottom: 1px dotted">Attribute</span>',"Weak Key Attribute",null,null,"db database schema er entity relation table attribute key weak chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;dashed=1;",100,40,"Attribute","Derived Attribute",null,null,"db database schema er entity relation table attribute derived chen"),-this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;margin=3;whiteSpace=wrap;html=1;align=center;",100,40,"Attribute","Multivalue Attribute",null,null,"db database schema er entity relation table attribute multivalue chen"),this.createVertexTemplateEntry("shape=associativeEntity;whiteSpace=wrap;html=1;align=center;",140,60,"Associative\nEntity","Associative Entity",null,null,"db database schema er entity relation table associative entity chen"),this.createVertexTemplateEntry("shape=rhombus;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",-120,60,"Relationship","Relationship",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("shape=rhombus;double=1;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",120,60,"Relationship","Identifying Relationship",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("ellipse;shape=cloud;whiteSpace=wrap;html=1;align=center;",100,60,"Cloud","Cloud",null,null,"db database schema er entity relation table cloud"),-this.addEntry("db database schema er entity relation table hierarchy",function(){var e=new mxCell("",new mxGeometry(0,0,100,100),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;");e.vertex=!0;var f=new mxCell("main",new mxGeometry(0,0,50,100),"html=1;shape=mxgraph.er.anchor;whiteSpace=wrap;");f.vertex=!0;e.insert(f);f=new mxCell("sub",new mxGeometry(50,5,45,90),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;whiteSpace=wrap;points=[];strokeColor=inherit;fillColor=inherit;");f.vertex=!0;e.insert(f);-return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Hierarchy")}),this.createVertexTemplateEntry("shape=note;size=20;whiteSpace=wrap;html=1;",100,100,"Note","Note",null,null,"db database schema er entity relation table note"),this.addEntry("db database schema er entity relation table relation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;")],160,0,"Untitled Relation")}),this.addEntry("db database schema er entity relation table mandatory participation chen",-function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"1")],160,0,"Mandatory Participation (0:1)")}),this.addEntry("db database schema er entity relation table mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"N")],160,0,"Mandatory Participation (0:N)")}),this.addEntry("db database schema er entity relation table mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",-"M","N")],160,0,"Mandatory Participation (M:N)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",null,"1")],160,0,"Optional Participation (0:1)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",null,-"N")],160,0,"Optional Participation (0:N)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;","M","N")],160,0,"Optional Participation (M:N)")}),this.addEntry("db database schema er entity relation table recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;",null,"1")],160,0,"Recursive Relationship (0:1)")}),+e.vertex=!0;var f=new mxCell("+Attribute1\n+Attribute2\n+Attribute3",new mxGeometry(0,30,160,90),"align=left;strokeColor=none;fillColor=none;spacingLeft=4;spacingRight=4;fontSize=12;verticalAlign=top;resizable=0;rotatable=0;part=1;html=1;whiteSpace=wrap;");f.vertex=!0;e.insert(f);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Entity")}),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Entity",null,null,"db database schema er entity relation table "),+this.createVertexTemplateEntry("rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Entity (Rounded)",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("shape=ext;margin=3;double=1;whiteSpace=wrap;html=1;align=center;",100,40,"Entity","Weak Entity",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,"Attribute","Attribute",null,null,"db database schema er entity relation table attribute chen"),+this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;fontStyle=4;",100,40,"Attribute","Key Attribute",null,null,"db database schema er entity relation table attribute key chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;",100,40,'<span style="border-bottom: 1px dotted">Attribute</span>',"Weak Key Attribute",null,null,"db database schema er entity relation table attribute key weak chen"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;align=center;dashed=1;",+100,40,"Attribute","Derived Attribute",null,null,"db database schema er entity relation table attribute derived chen"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;margin=3;whiteSpace=wrap;html=1;align=center;",100,40,"Attribute","Multivalue Attribute",null,null,"db database schema er entity relation table attribute multivalue chen"),this.createVertexTemplateEntry("shape=associativeEntity;whiteSpace=wrap;html=1;align=center;",140,60,"Associative\nEntity","Associative Entity",null,null,+"db database schema er entity relation table associative entity chen"),this.createVertexTemplateEntry("shape=rhombus;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",120,60,"Relationship","Relationship",null,null,"db database schema er entity relation table chen"),this.createVertexTemplateEntry("shape=rhombus;double=1;perimeter=rhombusPerimeter;whiteSpace=wrap;html=1;align=center;",120,60,"Relationship","Identifying Relationship",null,null,"db database schema er entity relation table chen"),+this.createVertexTemplateEntry("ellipse;shape=cloud;whiteSpace=wrap;html=1;align=center;",100,60,"Cloud","Cloud",null,null,"db database schema er entity relation table cloud"),this.addEntry("db database schema er entity relation table hierarchy",function(){var e=new mxCell("",new mxGeometry(0,0,100,100),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;");e.vertex=!0;var f=new mxCell("main",new mxGeometry(0,0,50,100),"html=1;shape=mxgraph.er.anchor;whiteSpace=wrap;");f.vertex=!0;e.insert(f);f=new mxCell("sub",+new mxGeometry(50,5,45,90),"rounded=1;absoluteArcSize=1;html=1;arcSize=10;whiteSpace=wrap;points=[];strokeColor=inherit;fillColor=inherit;");f.vertex=!0;e.insert(f);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Hierarchy")}),this.createVertexTemplateEntry("shape=note;size=20;whiteSpace=wrap;html=1;",100,100,"Note","Note",null,null,"db database schema er entity relation table note"),this.addEntry("db database schema er entity relation table relation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;")],+160,0,"Untitled Relation")}),this.addEntry("db database schema er entity relation table mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"1")],160,0,"Mandatory Participation (0:1)")}),this.addEntry("db database schema er entity relation table mandatory participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;",null,"N")],160,0,"Mandatory Participation (0:N)")}),this.addEntry("db database schema er entity relation table mandatory participation chen",+function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;","M","N")],160,0,"Mandatory Participation (M:N)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",null,"1")],160,0,"Optional Participation (0:1)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;",+null,"N")],160,0,"Optional Participation (0:N)")}),this.addEntry("db database schema er entity relation table optional participation chen",function(){return b.createEdgeTemplateFromCells([a("endArrow=none;html=1;rounded=0;dashed=1;dashPattern=1 2;","M","N")],160,0,"Optional Participation (M:N)")}),this.addEntry("db database schema er entity relation table recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;",null,"1")],160,0,"Recursive Relationship (0:1)")}),this.addEntry("db database schema er entity relation table recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;",null,"N")],160,0,"Recursive Relationship (0:N)")}),this.addEntry("db database schema er entity relation table recursive relationship chen",function(){return b.createEdgeTemplateFromCells([a("shape=link;html=1;rounded=0;","M","N")],160,0,"Recursive Relationship (M:N)")}),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;endFill=1;",100,100,"","0 to Many Optional",null,"db database schema er entity relation table zero many optional"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERoneToMany;",100,100,"","1 to Many",null,"db database schema er entity relation table one many"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;",100,100,"","1 Mandatory",null,"db database schema er entity relation table one mandatory"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;startArrow=ERmandOne;",100,100,"","1 to 1",null,"db database schema er entity relation table one"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERone;endFill=1;",100,100,"","1",null,"db database schema er entity relation table one"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;endFill=1;",100,100,"","0 to 1",null,"db database schema er entity relation table zero one"),this.createEdgeTemplateEntry("edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmany;",@@ -12275,7 +12275,7 @@ var StorageDialog=function(b,g,l){function d(Q,c,e,f,p,n){function t(){mxEvent.a(b.setMode(e,!0),g())})}D++;++x>l&&(mxUtils.br(J),x=1);var z=document.createElement("a");z.style.overflow="hidden";z.style.display="inline-block";z.className="geBaseButton";z.style.boxSizing="border-box";z.style.fontSize="11px";z.style.position="relative";z.style.margin="4px";z.style.marginTop="8px";z.style.marginBottom="0px";z.style.padding="8px 10px 8px 10px";z.style.width="88px";z.style.height="100px";z.style.whiteSpace="nowrap";z.setAttribute("title",c);var E=document.createElement("div");E.style.textOverflow="ellipsis";E.style.overflow="hidden";E.style.position="absolute";E.style.bottom="8px";E.style.left="0px";E.style.right="0px";mxUtils.write(E,c);z.appendChild(E);if(null!=Q){var C=document.createElement("img");C.setAttribute("src",Q);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";z.appendChild(C)}else E.style.paddingTop="5px",E.style.whiteSpace="normal",mxClient.IS_IOS?(z.style.padding="0px 10px 20px 10px",z.style.top="6px"):mxClient.IS_FF&&(E.style.paddingTop="0px",E.style.marginTop="-2px");if(null!=p)for(Q=0;Q<p.length;Q++)mxUtils.br(E),mxUtils.write(E,p[Q]);if(null!=f&&null==b[f]){C.style.visibility="hidden";mxUtils.setOpacity(E,10);var F=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});F.spin(z);var R=window.setTimeout(function(){null==b[f]&&(F.stop(),z.style.display="none")},3E4);b.addListener("clientLoaded",-mxUtils.bind(this,function(U,O){null!=b[f]&&O.getProperty("client")==b[f]&&(window.clearTimeout(R),mxUtils.setOpacity(E,100),C.style.visibility="",F.stop(),t(),"drive"==f&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else t();J.appendChild(z)}l=null!=l?l:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom="20px";var y=document.createElement("div");y.style.border="1px solid #d3d3d3";y.style.borderWidth="1px 0px 1px 0px";+mxUtils.bind(this,function(U,P){null!=b[f]&&P.getProperty("client")==b[f]&&(window.clearTimeout(R),mxUtils.setOpacity(E,100),C.style.visibility="",F.stop(),t(),"drive"==f&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else t();J.appendChild(z)}l=null!=l?l:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom="20px";var y=document.createElement("div");y.style.border="1px solid #d3d3d3";y.style.borderWidth="1px 0px 1px 0px";y.style.padding="10px 0px 20px 0px";var x=0,D=0,J=document.createElement("div");J.style.paddingTop="2px";y.appendChild(J);var K=document.createElement("p"),L=document.createElement("p");L.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(L,mxResources.get("saveDiagramsTo")+":");q.appendChild(L);q.appendChild(y);x=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");y=document.createElement("span");y.style.position="absolute";y.style.cursor="pointer";y.style.bottom="27px";y.style.color="gray";y.style.userSelect="none";y.style.textAlign="center";y.style.left="50%";mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0)");mxUtils.write(y,mxResources.get("decideLater"));@@ -12302,9 +12302,9 @@ mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+" max)"),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",y.appendChild(c))}!b.isOffline()&&5E5>g.length&&(c=mxUtils.button("",function(){try{var e="mailto:?subject="+encodeURIComponent(J||b.defaultFilename)+"&body="+encodeURIComponent(L.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.className="geAdaptiveAsset",D.setAttribute("src",Editor.mailImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",c.appendChild(D),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",y.appendChild(c));D=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});y.appendChild(D);c=mxUtils.button(mxResources.get("copy"),function(){L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>g.length?mxClient.IS_SF||null!=document.documentMode?D.className="geBtn gePrimaryBtn":(y.appendChild(c),c.className="geBtn gePrimaryBtn",D.className="geBtn"):null!=Q&&(y.appendChild(Q),D.className="geBtn",Q.className="geBtn gePrimaryBtn");d.appendChild(y);this.container=d};EmbedDialog.showPreviewOption=!0;-var GoogleSitesDialog=function(b,g){function l(){var U=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(C.checked&&""!=c.value){var O="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=U&&(O+="&title="+encodeURIComponent(U));0<F.length&&(O+="&s="+F);""!=e.value&&"0"!=e.value&&(O+="&border="+e.value);""!=Q.value&&(O+="&height="+Q.value);O+="&pan="+(f.checked?"1":"0");O+="&zoom="+(p.checked?"1":"0");O+="&fit="+(E.checked?"1":"0");-O+="&resize="+(z.checked?"1":"0");O+="&x0="+Number(L.value);O+="&y0="+J;q.mathEnabled&&(O+="&math=1");t.checked?O+="&edit=_blank":n.checked&&(O+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));K.value=O}else R.constructor==DriveFile||R.constructor==DropboxFile?(O="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=c.value?O+=encodeURIComponent(mxUtils.htmlEntities(c.value))+"&type=3":(O+=R.getHash().substring(1),O=R.constructor==DropboxFile?O+"&type=2":O+"&type=1"),null!=-U&&(O+="&title="+encodeURIComponent(U)),""!=Q.value&&(U=parseInt(Q.value)+parseInt(L.value),O+="&height="+U),K.value=O):K.value=""}var d=document.createElement("div"),q=b.editor.graph,y=q.getGraphBounds(),x=q.view.scale,D=Math.floor(y.x/x-q.view.translate.x),J=Math.floor(y.y/x-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var K=document.createElement("input");K.setAttribute("type","text");K.style.marginBottom="8px";K.style.marginTop="2px";K.style.width="410px";+var GoogleSitesDialog=function(b,g){function l(){var U=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(C.checked&&""!=c.value){var P="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=U&&(P+="&title="+encodeURIComponent(U));0<F.length&&(P+="&s="+F);""!=e.value&&"0"!=e.value&&(P+="&border="+e.value);""!=Q.value&&(P+="&height="+Q.value);P+="&pan="+(f.checked?"1":"0");P+="&zoom="+(p.checked?"1":"0");P+="&fit="+(E.checked?"1":"0");+P+="&resize="+(z.checked?"1":"0");P+="&x0="+Number(L.value);P+="&y0="+J;q.mathEnabled&&(P+="&math=1");t.checked?P+="&edit=_blank":n.checked&&(P+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));K.value=P}else R.constructor==DriveFile||R.constructor==DropboxFile?(P="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=c.value?P+=encodeURIComponent(mxUtils.htmlEntities(c.value))+"&type=3":(P+=R.getHash().substring(1),P=R.constructor==DropboxFile?P+"&type=2":P+"&type=1"),null!=+U&&(P+="&title="+encodeURIComponent(U)),""!=Q.value&&(U=parseInt(Q.value)+parseInt(L.value),P+="&height="+U),K.value=P):K.value=""}var d=document.createElement("div"),q=b.editor.graph,y=q.getGraphBounds(),x=q.view.scale,D=Math.floor(y.x/x-q.view.translate.x),J=Math.floor(y.y/x-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var K=document.createElement("input");K.setAttribute("type","text");K.style.marginBottom="8px";K.style.marginTop="2px";K.style.width="410px";d.appendChild(K);mxUtils.br(d);this.init=function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var L=document.createElement("input");L.setAttribute("type","text");L.setAttribute("size","4");L.style.marginRight="16px";L.style.marginLeft="4px";L.value=D;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.setAttribute("size","4");Q.style.marginLeft="4px";Q.value=Math.ceil(y.height/x);d.appendChild(Q);mxUtils.br(d);y=document.createElement("hr");y.setAttribute("size","1");y.style.marginBottom="16px";y.style.marginTop="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","28");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";c.value=g||"";d.appendChild(c);mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","3");e.style.marginBottom="8px";e.style.marginLeft="4px";e.value="0";d.appendChild(e);mxUtils.br(d);var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;f.style.marginLeft="16px";d.appendChild(f);mxUtils.write(d,mxResources.get("pan")+" ");var p=document.createElement("input");@@ -12323,7 +12323,7 @@ function(f){y.clearCellOverlays();var p=y.getModel().getChildren(y.getDefaultPard.appendChild(q);this.graph=y};this.container=d};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);-var BackgroundImageDialog=function(b,g,l,d,q){function y(){null==m||m==mxConstants.NONE?(N.style.display="none",U.checked=!1):(N.style.backgroundColor=m,N.style.display="",U.checked=!0)}var x=b.editor.graph,D=document.createElement("div");D.style.whiteSpace="nowrap";var J=document.createElement("h2");mxUtils.write(J,mxResources.get("background"));J.style.marginTop="0px";D.appendChild(J);var K=null!=l&&null!=l.originalSrc;J=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";+var BackgroundImageDialog=function(b,g,l,d,q){function y(){null==m||m==mxConstants.NONE?(O.style.display="none",U.checked=!1):(O.style.backgroundColor=m,O.style.display="",U.checked=!0)}var x=b.editor.graph,D=document.createElement("div");D.style.whiteSpace="nowrap";var J=document.createElement("h2");mxUtils.write(J,mxResources.get("background"));J.style.marginTop="0px";D.appendChild(J);var K=null!=l&&null!=l.originalSrc;J=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var Q=document.createElement("input");Q.style.cssText="margin-right:8px;margin-bottom:8px;";Q.setAttribute("value","url");Q.setAttribute("type","radio");Q.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.width="360px";c.value=K||null==l?"":l.src;var e=document.createElement("select");e.style.width="360px";if(null!=b.pages)for(var f=0;f<b.pages.length;f++){var p=document.createElement("option");mxUtils.write(p,b.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));p.setAttribute("value","data:page/id,"+b.pages[f].getId());b.pages[f]==b.currentPage&&p.setAttribute("disabled","disabled");null!=l&&l.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),J=!0);e.appendChild(p)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",Q.style.display="none",e.style.display="none");var n=document.createElement("option"),t=!1,z=!1,E=function(A,B){t||null!=A&&z||(Q.checked?null!=B&&B(n.selected?null:e.value):""==c.value||b.isOffline()?(F.value="",R.value="",null!=B&&B("")):(c.value=mxUtils.trim(c.value),b.loadImage(c.value,function(H){F.value=H.width;R.value=H.height;null!=B&&B(c.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));F.value="";R.value="";null!=B&&B(null)})))},C=mxUtils.bind(this,@@ -12333,27 +12333,27 @@ function(H){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<H.dataTransfer.fi":");D.appendChild(f);var F=document.createElement("input");F.setAttribute("type","text");F.style.width="60px";F.style.marginLeft="8px";F.style.marginRight="16px";F.value=null==l||K?"":l.width;D.appendChild(F);mxUtils.write(D,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==l||K?"":l.height;D.appendChild(R);mxUtils.br(D);mxUtils.br(D);mxEvent.addListener(c,"change",E);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(c.value=A.url,E()));c.focus()};D.appendChild(Q);D.appendChild(e);mxUtils.br(D);mxUtils.br(D);K?(Q.setAttribute("checked","checked"),Q.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!J&&Q.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),n.setAttribute("value","pageNotFound"),e.appendChild(n),mxEvent.addListener(e,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));l=document.createElement("div");l.style.display=q?"inline-flex":"none";l.style.alignItems="center";l.style.cursor="default";l.style.minWidth="40%";l.style.height="20px";var U=document.createElement("input");U.setAttribute("type","checkbox");U.style.margin="0px 10px 0px 4px";U.style.verticalAlign="bottom";U.defaultChecked=d!=mxConstants.NONE&&-null!=d;U.checked=U.defaultChecked;l.appendChild(U);mxUtils.write(l,mxResources.get("fillColor"));q=l.cloneNode(!1);var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px 10px 0px 30px";O.style.verticalAlign="bottom";O.defaultChecked=x.shadowVisible;O.checked=O.defaultChecked;q.appendChild(O);mxUtils.write(q,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||O.setAttribute("disabled","disabled");mxEvent.addListener(q,"click",function(A){mxEvent.getSource(A)!=-O&&(O.checked=!O.checked)});var N=document.createElement("button");N.style.width="36px";N.style.height="18px";N.style.cursor="pointer";N.style.marginLeft="10px";N.style.backgroundPosition="center center";N.style.backgroundRepeat="no-repeat";N.style.verticalAlign="bottom";N.className="geColorBtn";var m=d;y();mxEvent.addListener(l,"click",function(A){mxEvent.getSource(A)!=U&&(U.checked=!U.checked);m=U.checked?"#ffffff":null;y()});mxEvent.addListener(N,"click",function(A){b.pickColor(m||"none",function(B){m=-B;y()});mxEvent.consume(A)});l.appendChild(N);D.appendChild(l);D.appendChild(q);mxUtils.br(D);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);q=mxUtils.button(mxResources.get("reset"),function(){c.value="";F.value="";R.value="";L.checked=!0;m=mxConstants.NONE;y();t=!1});mxEvent.addGestureListeners(q,function(){t=!0});q.className=+null!=d;U.checked=U.defaultChecked;l.appendChild(U);mxUtils.write(l,mxResources.get("fillColor"));q=l.cloneNode(!1);var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px 10px 0px 30px";P.style.verticalAlign="bottom";P.defaultChecked=x.shadowVisible;P.checked=P.defaultChecked;q.appendChild(P);mxUtils.write(q,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||P.setAttribute("disabled","disabled");mxEvent.addListener(q,"click",function(A){mxEvent.getSource(A)!=+P&&(P.checked=!P.checked)});var O=document.createElement("button");O.style.width="36px";O.style.height="18px";O.style.cursor="pointer";O.style.marginLeft="10px";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.verticalAlign="bottom";O.className="geColorBtn";var m=d;y();mxEvent.addListener(l,"click",function(A){mxEvent.getSource(A)!=U&&(U.checked=!U.checked);m=U.checked?"#ffffff":null;y()});mxEvent.addListener(O,"click",function(A){b.pickColor(m||"none",function(B){m=+B;y()});mxEvent.consume(A)});l.appendChild(O);D.appendChild(l);D.appendChild(q);mxUtils.br(D);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);q=mxUtils.button(mxResources.get("reset"),function(){c.value="";F.value="";R.value="";L.checked=!0;m=mxConstants.NONE;y();t=!1});mxEvent.addGestureListeners(q,function(){t=!0});q.className="geBtn";q.width="100";d.appendChild(q);if(Graph.fileSupport){var u=document.createElement("input");u.setAttribute("multiple","multiple");u.setAttribute("type","file");mxEvent.addListener(u,"change",function(A){null!=u.files&&(C(u.files),u.type="",u.type="file",u.value="")});u.style.display="none";D.appendChild(u);q=mxUtils.button(mxResources.get("open"),function(){u.click()});q.className="geBtn";d.appendChild(q)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();E(null,function(A){g(""!=-A&&null!=A?new mxImage(A,F.value,R.value):null,null==A,m,!mxClient.IS_SVG||mxClient.IS_SF?null:O.checked)})});mxEvent.addGestureListeners(applyBtn,function(){z=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(x);D.appendChild(d);this.container=D},ParseDialog=function(b,g,l){function d(e,f,p){var n=e.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(T,+A&&null!=A?new mxImage(A,F.value,R.value):null,null==A,m,!mxClient.IS_SVG||mxClient.IS_SF?null:P.checked)})});mxEvent.addGestureListeners(applyBtn,function(){z=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(x);D.appendChild(d);this.container=D},ParseDialog=function(b,g,l){function d(e,f,p){var n=e.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(T,k,v,G,I){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(new mxRectangle(0,0,G,I));var M=null;z.getModel().beginUpdate();try{M="txt"==k?b.insertAsPreText(v,y.x,y.y):z.insertVertex(null,null,null,y.x,y.y,G,I,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(v)+";"),z.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:T,format:k},null,2))}finally{z.getModel().endUpdate()}null!=M&&(z.setSelectionCell(M),z.scrollCellToVisible(M))},z=b.editor.graph,E="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"==e&&"svg"==E?window.setTimeout(function(){b.spinner.stop();t(e,E,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",295,212)},200):b.generatePlantUmlImage(e,E,function(T,k,v){b.spinner.stop();t(e,E,T,k,v)},function(T){b.handleError(T)})}}else if("mermaid"==f||"mermaid2drawio"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<n.length&&(0==n[C].trim().length||"%%"==n[C].substring(0,2));)C++;if("---"==n[C].trim()){do C++;while(C<n.length&&"---"!=n[C].trim());C++}C=n[C].trim().toLowerCase();n=C.indexOf(" ");C=C.substring(0,0<n?n:C.length);var F="undefined"!==typeof mxMermaidToDrawio&&"mermaid2drawio"==f&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);z=b.editor.graph;F&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();z.setSelectionCells(b.importXml(T,Math.max(y.x,20),Math.max(y.y,20),!0,null,null,!0));z.scrollCellToVisible(z.getSelectionCell())}));b.generateMermaidImage(e,null,function(T,k,v){if(!F){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(new mxRectangle(0,0,k,v));b.spinner.stop();var G=null;z.getModel().beginUpdate();try{G=z.insertVertex(null,null,null,y.x,y.y,k,v,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+T+";"),z.setAttributeForCell(G,"mermaidData",JSON.stringify({data:e},null,2))}finally{z.getModel().endUpdate()}null!=G&&(z.setSelectionCell(G),z.scrollCellToVisible(G))}},function(T){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(T)})}}else if("table"==-f){f=null;var R=[],U=0,O={};for(C=0;C<n.length;C++){var N=mxUtils.trim(n[C]);if("primary key"==N.substring(0,11).toLowerCase()){var m=N.match(/\((.+)\)/);m&&m[1]&&(O[m[1]]=!0);n.splice(C,1)}else 0<N.toLowerCase().indexOf("primary key")&&(O[N.split(" ")[0]]=!0,n[C]=mxUtils.trim(N.replace(/primary key/i,"")))}for(C=0;C<n.length;C++)if(N=mxUtils.trim(n[C]),"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))),f=new mxCell(N,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),f.vertex=!0,R.push(f),N=b.editor.graph.getPreferredSizeForCell(u),null!=N&&(f.geometry.width=N.width+10);else if(null!=f&&")"==N.charAt(0))U+=f.geometry.width+40,f=null;else if("("!=N&&null!=f){N=N.substring(0,","==N.charAt(N.length-1)?N.length-1:N.length);m=O[N.split(" ")[0]];var u=new mxCell("",new mxGeometry(0,-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(m?"1":"0")+";");u.vertex=!0;var A=new mxCell(m?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(m?"fontStyle=1;":""));A.vertex=!0;u.insert(A);N=new mxCell(N,new mxGeometry(30,-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(m?"fontStyle=5;":""));N.vertex=!0;u.insert(N);N=b.editor.graph.getPreferredSizeForCell(N);null!=N&&f.geometry.width<N.width+30&&(f.geometry.width=Math.min(320,Math.max(f.geometry.width,N.width+30)));f.insert(u,m?0:null);f.geometry.height+=30}0<R.length&&(z=b.editor.graph,y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,-!0)),z.setSelectionCells(z.importCells(R,y.x,y.y)),z.scrollCellToVisible(z.getSelectionCell()))}else if("list"==f){if(0<n.length){z=b.editor.graph;f=null;R=[];for(C=u=0;C<n.length;C++)";"!=n[C].charAt(0)&&(0==n[C].length?f=null:null==f?(f=new mxCell(n[C],new mxGeometry(u,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),f.vertex=!0,R.push(f),N=z.getPreferredSizeForCell(f),-null!=N&&f.geometry.width<N.width+10&&(f.geometry.width=N.width+10),u+=f.geometry.width+40):"--"==n[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,f.geometry.height+=N.geometry.height,f.insert(N)):0<n[C].length&&(U=new mxCell(n[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;"),-U.vertex=!0,N=z.getPreferredSizeForCell(U),null!=N&&U.geometry.width<N.width&&(U.geometry.width=N.width),f.geometry.width=Math.max(f.geometry.width,U.geometry.width),f.geometry.height+=U.geometry.height,f.insert(U)));if(0<R.length){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0));z.getModel().beginUpdate();try{R=z.importCells(R,y.x,y.y);N=[];for(C=0;C<R.length;C++)N.push(R[C]),N=N.concat(R[C].children);z.fireEvent(new mxEventObject("cellsInserted","cells",N))}finally{z.getModel().endUpdate()}z.setSelectionCells(R);+f){f=null;var R=[],U=0,P={};for(C=0;C<n.length;C++){var O=mxUtils.trim(n[C]);if("primary key"==O.substring(0,11).toLowerCase()){var m=O.match(/\((.+)\)/);m&&m[1]&&(P[m[1]]=!0);n.splice(C,1)}else 0<O.toLowerCase().indexOf("primary key")&&(P[O.split(" ")[0]]=!0,n[C]=mxUtils.trim(O.replace(/primary key/i,"")))}for(C=0;C<n.length;C++)if(O=mxUtils.trim(n[C]),"create table"==O.substring(0,12).toLowerCase())O=mxUtils.trim(O.substring(12)),"("==O.charAt(O.length-1)&&(O=mxUtils.trim(O.substring(0,O.length-+1))),f=new mxCell(O,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),f.vertex=!0,R.push(f),O=b.editor.graph.getPreferredSizeForCell(u),null!=O&&(f.geometry.width=O.width+10);else if(null!=f&&")"==O.charAt(0))U+=f.geometry.width+40,f=null;else if("("!=O&&null!=f){O=O.substring(0,","==O.charAt(O.length-1)?O.length-1:O.length);m=P[O.split(" ")[0]];var u=new mxCell("",new mxGeometry(0,+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(m?"1":"0")+";");u.vertex=!0;var A=new mxCell(m?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(m?"fontStyle=1;":""));A.vertex=!0;u.insert(A);O=new mxCell(O,new mxGeometry(30,+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(m?"fontStyle=5;":""));O.vertex=!0;u.insert(O);O=b.editor.graph.getPreferredSizeForCell(O);null!=O&&f.geometry.width<O.width+30&&(f.geometry.width=Math.min(320,Math.max(f.geometry.width,O.width+30)));f.insert(u,m?0:null);f.geometry.height+=30}0<R.length&&(z=b.editor.graph,y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,+!0)),z.setSelectionCells(z.importCells(R,y.x,y.y)),z.scrollCellToVisible(z.getSelectionCell()))}else if("list"==f){if(0<n.length){z=b.editor.graph;f=null;R=[];for(C=u=0;C<n.length;C++)";"!=n[C].charAt(0)&&(0==n[C].length?f=null:null==f?(f=new mxCell(n[C],new mxGeometry(u,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),f.vertex=!0,R.push(f),O=z.getPreferredSizeForCell(f),+null!=O&&f.geometry.width<O.width+10&&(f.geometry.width=O.width+10),u+=f.geometry.width+40):"--"==n[C]?(O=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;"),O.vertex=!0,f.geometry.height+=O.geometry.height,f.insert(O)):0<n[C].length&&(U=new mxCell(n[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;"),+U.vertex=!0,O=z.getPreferredSizeForCell(U),null!=O&&U.geometry.width<O.width&&(U.geometry.width=O.width),f.geometry.width=Math.max(f.geometry.width,U.geometry.width),f.geometry.height+=U.geometry.height,f.insert(U)));if(0<R.length){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0));z.getModel().beginUpdate();try{R=z.importCells(R,y.x,y.y);O=[];for(C=0;C<R.length;C++)O.push(R[C]),O=O.concat(R[C].children);z.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{z.getModel().endUpdate()}z.setSelectionCells(R);z.scrollCellToVisible(z.getSelectionCell())}}}else{u=function(T){var k=B[T];null==k&&(k=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),k.vertex=!0,B[T]=k,R.push(k));return k};var B={};R=[];for(C=0;C<n.length;C++)if(";"!=n[C].charAt(0)){var H=n[C].split("->");2<=H.length&&(m=u(H[0]),A=u(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,H.geometry.relative=!0,m.insertEdge(H,!0),A.insertEdge(H,!1),R.push(H))}if(0<R.length){n=document.createElement("div");n.style.visibility=-"hidden";document.body.appendChild(n);z=new Graph(n);z.getModel().beginUpdate();try{R=z.importCells(R);for(C=0;C<R.length;C++)z.getModel().isVertex(R[C])&&(N=z.getPreferredSizeForCell(R[C]),R[C].geometry.width=Math.max(R[C].geometry.width,N.width),R[C].geometry.height=Math.max(R[C].geometry.height,N.height));C=!0;"horizontalFlow"==f||"verticalFlow"==f?((new mxHierarchicalLayout(z,"horizontalFlow"==f?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(z.getDefaultParent(),R),C=!1):"circle"==-f?(new mxCircleLayout(z)).execute(z.getDefaultParent()):(U=new mxFastOrganicLayout(z),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(z.getDefaultParent()));C&&(O=new mxParallelEdgeLayout(z),O.spacing=30,O.execute(z.getDefaultParent()))}finally{z.getModel().endUpdate()}z.clearCellOverlays();N=[];b.editor.graph.getModel().beginUpdate();try{R=z.getModel().getChildren(z.getDefaultParent()),y=mxEvent.isAltDown(p)?y:b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0)),N=b.editor.graph.importCells(R,-y.x,y.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());z.destroy();n.parentNode.removeChild(n)}}}function q(){return"list"==D.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"==D.value||+"hidden";document.body.appendChild(n);z=new Graph(n);z.getModel().beginUpdate();try{R=z.importCells(R);for(C=0;C<R.length;C++)z.getModel().isVertex(R[C])&&(O=z.getPreferredSizeForCell(R[C]),R[C].geometry.width=Math.max(R[C].geometry.width,O.width),R[C].geometry.height=Math.max(R[C].geometry.height,O.height));C=!0;"horizontalFlow"==f||"verticalFlow"==f?((new mxHierarchicalLayout(z,"horizontalFlow"==f?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(z.getDefaultParent(),R),C=!1):"circle"==+f?(new mxCircleLayout(z)).execute(z.getDefaultParent()):(U=new mxFastOrganicLayout(z),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(z.getDefaultParent()));C&&(P=new mxParallelEdgeLayout(z),P.spacing=30,P.execute(z.getDefaultParent()))}finally{z.getModel().endUpdate()}z.clearCellOverlays();O=[];b.editor.graph.getModel().beginUpdate();try{R=z.getModel().getChildren(z.getDefaultParent()),y=mxEvent.isAltDown(p)?y:b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0)),O=b.editor.graph.importCells(R,+y.x,y.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(O);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());z.destroy();n.parentNode.removeChild(n)}}}function q(){return"list"==D.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"==D.value||"mermaid2drawio"==D.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==D.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"==D.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"==D.value||"plantUmlTxt"==D.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":";Example:\na->b\nb->edge label->c\nc->a\n"}var y=b.editor.graph.getFreeInsertPoint();g=document.createElement("div");g.style.textAlign="right";var x=document.createElement("textarea");x.style.boxSizing="border-box";x.style.resize="none";x.style.width="100%";x.style.height="354px";x.style.marginBottom="16px";var D=document.createElement("select");D.className="geBtn";if("formatSql"==l||"mermaid"==l&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())D.style.display="none";var J=document.createElement("option");J.setAttribute("value","list");mxUtils.write(J,mxResources.get("list"));"plantUml"!=l&&"mermaid"!=l&&D.appendChild(J);null!=l&&"fromText"!=l||J.setAttribute("selected","selected");J=document.createElement("option");@@ -12377,15 +12377,15 @@ ka.appendChild(ra);return ka}function F(){null!=aa&&aa==ia&&EditorUi.logEvent({cka,mxUtils.bind(this,function(la,qa,ya){ta(qa,ya,la.value)}),null,null,null,null,b.mode);b.showDialog(ra.container,420,150,!0,!1);ra.init()}else b.pickFolder(b.mode,function(la){ta(b.mode,la,ka)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function R(ka,ta,ra,la,qa,ya,Ea){return da!=ka?(null!=da&&(da.style.backgroundColor="transparent",da.style.border="2px solid transparent",0<da.getElementsByTagName("table").length&&(da.getElementsByTagName("table")[0].style.visibility="visible"),da==sa&&(sa.style.backgroundImage=Ia,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",xa.style.visibility="hidden",Ba.style.visibility="hidden",Da.style.visibility="hidden",za.style.visibility="hidden",Fa.style.visibility=null!=ia?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=ka.style.backgroundImage&&0<ka.getElementsByTagName("table").length&&(ka.getElementsByTagName("table")[0].style.visibility="hidden"),ka==sa&&(ta=ia,null!=ta?(Fa.style.visibility="visible",Fa.style.visibility=null!=ia?"visible":"hidden",za.style.visibility="visible"):(xa.style.visibility="visible",Ba.style.visibility="visible",Da.style.visibility="visible",za.style.visibility="hidden",Fa.style.visibility="hidden")),G.removeAttribute("disabled"),aa=ta,ca=ra,fa=ya,da=ka,ha=la,pa=Ea,na=qa,da.style.border=J,!0):!1}function U(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";xa.style.visibility=-"visible";Ba.style.visibility="visible";Da.style.visibility="visible";za.style.visibility="hidden";Fa.style.visibility="hidden";xa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?xa.select():document.execCommand("selectAll",!1,null)}function O(){xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";sa.style.backgroundImage=Ia;sa.style.backgroundSize="contain";za.style.visibility="visible";Fa.style.visibility="visible"}function N(ka){var ta=mxUtils.trim(xa.value);-if(ka||""==ta)null!=wa&&(xa.value=wa,O());else{xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";var ra=!1;ka='Write a detailed and complex MermaidJS declaration for "'+(""!=ta?ta:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(la){la!=b.emptyDiagramXml&&(ra=!0,aa=la)}));sa.style.backgroundImage="url("+Editor.spinImage+-")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(ka,function(la,qa,ya,Ea){da==sa&&"hidden"==xa.style.visibility&&(Ia="url(data:image/svg+xml;base64,"+qa.substring(qa.indexOf(",")+1)+")",sa.setAttribute("title",ta),ia=aa=la=ra?aa:b.createMermaidXml(la,EditorUi.defaultMermaidConfig,qa,ya,Ea,ta),wa=ta,O())},function(la){da==sa&&(xa.style.visibility="visible",Ba.style.visibility="visible",Da.style.visibility="visible",za.style.visibility="visible",Fa.style.visibility="visible",b.handleError(la))})}}-function m(ka,ta,ra,la,qa,ya,Ea,Ha,Pa,Ka,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==ka||M||b.sidebar.currentElt==Ga)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=P){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+-P.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+P.naturalWidth+'" height="'+P.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";E(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ra,ka)}else b.sidebar.currentElt=Ga,M=!0,Ma(ka,function(hb){if(M&&b.sidebar.currentElt==Ga)try{E(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ga,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}M=!1})}function Ya(){var Oa=document.createElement("table");+"visible";Ba.style.visibility="visible";Da.style.visibility="visible";za.style.visibility="hidden";Fa.style.visibility="hidden";xa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?xa.select():document.execCommand("selectAll",!1,null)}function P(){xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";sa.style.backgroundImage=Ia;sa.style.backgroundSize="contain";za.style.visibility="visible";Fa.style.visibility="visible"}function O(ka){var ta=mxUtils.trim(xa.value);+if(ka||""==ta)null!=wa&&(xa.value=wa,P());else{xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";var ra=!1;ka='Write a detailed and complex MermaidJS declaration for "'+(""!=ta?ta:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(la){la!=b.emptyDiagramXml&&(ra=!0,aa=la)}));sa.style.backgroundImage="url("+Editor.spinImage++")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(ka,function(la,qa,ya,Ea){da==sa&&"hidden"==xa.style.visibility&&(Ia="url(data:image/svg+xml;base64,"+qa.substring(qa.indexOf(",")+1)+")",sa.setAttribute("title",ta),ia=aa=la=ra?aa:b.createMermaidXml(la,EditorUi.defaultMermaidConfig,qa,ya,Ea,ta),wa=ta,P())},function(la){da==sa&&(xa.style.visibility="visible",Ba.style.visibility="visible",Da.style.visibility="visible",za.style.visibility="visible",Fa.style.visibility="visible",b.handleError(la))})}}+function m(ka,ta,ra,la,qa,ya,Ea,Ha,Pa,Ka,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==ka||M||b.sidebar.currentElt==Ga)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=N){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='++N.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+N.naturalWidth+'" height="'+N.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";E(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ra,ka)}else b.sidebar.currentElt=Ga,M=!0,Ma(ka,function(hb){if(M&&b.sidebar.currentElt==Ga)try{E(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ga,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}M=!1})}function Ya(){var Oa=document.createElement("table");Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var bb=document.createElement("tbody"),cb=document.createElement("tr"),hb=document.createElement("td");hb.setAttribute("align","center");hb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius="8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=ma-34+"px";mxUtils.write(Za,mxResources.get(ra,null,ra));hb.appendChild(Za);cb.appendChild(hb);bb.appendChild(cb);Oa.appendChild(bb);return Oa}var Ga=null;if("generative"!=Va||null==sa){Ga=document.createElement("div");Ga.className="geTemplate geAdaptiveAsset";Ga.style.backgroundOrigin="content-box";Ga.style.backgroundPosition="center center";Ga.style.backgroundRepeat="no-repeat";Ga.style.backgroundSize="contain";Ga.style.boxSizing="border-box";Ga.style.borderRadius="12px";Ga.style.position="relative";Ga.style.height=ma+"px";Ga.style.width=Aa+"px";Ga.style.padding="4px";Ga.style.border="2px solid transparent";var fb=null,Ta=ka;null!=ra?Ga.setAttribute("title",mxResources.get(ra,null,ra)):null!=la&&0<la.length&&Ga.setAttribute("title",la)}else Ga=sa;if(null!=ya){Ga.style.display="inline-flex";Ga.style.justifyContent="center";Ga.style.alignItems="center";qa=document.createElement("img");-qa.setAttribute("src",ya);qa.setAttribute("alt",la);qa.style.maxWidth=ma+"px";qa.style.maxHeight=Aa+"px";P=qa;var ib=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(qa);qa.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea,Na)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){F();mxEvent.consume(Oa)})}else if(!Ka&&null!=ka&&0<ka.length){var gb=+qa.setAttribute("src",ya);qa.setAttribute("alt",la);qa.style.maxWidth=ma+"px";qa.style.maxHeight=Aa+"px";N=qa;var ib=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(qa);qa.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea,Na)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){F();mxEvent.consume(Oa)})}else if(!Ka&&null!=ka&&0<ka.length){var gb=function(Oa){v.spin(ua)&&Ma(ka,function(bb,cb){v.stop();null!=bb&&(R(Ga,bb,ta,null,null,Na,cb),Oa&&F())})};ya=Pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";Ga.style.backgroundImage="url("+ya+")";null!=ra&&Ga.appendChild(Ya());mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ga.appendChild(Ya()),"generative"==Va&&null==sa&&(Ga.style.backgroundImage=Ia,Ga.style.overflow="visible",Ga.appendChild(Fa),Ga.appendChild(za),Ga.appendChild(xa),Ga.appendChild(Ba),Ga.appendChild(Da),sa=Ga),qa&&R(Ga),null!=Ha?(mxEvent.addGestureListeners(Ga,null,null,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea)})),mxEvent.addListener(Ga,"click",Ha)):(mxEvent.addListener(Ga,"click",function(Oa){R(Ga,null,null,ka,Ea)&&"generative"==Va&&null==ia&&U()}),mxEvent.addListener(Ga,"dblclick",function(Oa){"generative"!=Va?F():"hidden"==xa.style.visibility&&U();mxEvent.consume(Oa)}));null!=ka&&(ya=I.cloneNode(!0),Ga.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Oa){S=b.sidebar.currentElt==Ga}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Oa){S||Qa(Oa,null!=ra?ra:la);mxEvent.consume(Oa)})));ua.appendChild(Ga);return Ga}function u(){function ka(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"…");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function ta(Ma,Qa,Ya){mxEvent.addListener(Qa,@@ -12400,7 +12400,7 @@ D=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clIMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";g||D||!l||B.appendChild(H);l&&mxUtils.write(B,(D?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_TRELLO&&null!=b.trello&&(H=b.trello.extension);var T=document.createElement("input");T.setAttribute("value",b.defaultFilename+H);T.style.marginLeft="10px";T.style.width=g||D?"144px":"244px";this.init=function(){l&&Editor.selectFilename(T);null!=ua.parentNode&&null!=ua.parentNode.parentNode&&mxEvent.addGestureListeners(ua.parentNode.parentNode,mxUtils.bind(this,function(ka){null!=b.sidebar&&b.sidebar.hideTooltip()}),null,null)};l&&(B.appendChild(T),t?T.style.width=g||D?"350px":"450px":null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width=g||D?"80px":"180px",B.appendChild(t)));t=!1;var k=0,v=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),G=mxUtils.button(p||mxResources.get("create"),function(){G.setAttribute("disabled",-"disabled");F();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";var I=document.createElement("img");I.setAttribute("src",Editor.magnifyImage);I.setAttribute("title",mxResources.get("preview"));I.className="geAdaptiveAsset geActiveButton";I.style.position="absolute";I.style.borderRadius="16px";I.style.background="white";I.style.cursor="default";I.style.padding="2px";I.style.opacity="0.8";I.style.height="16px";I.style.right="2px";I.style.top="2px";var M=!1,P=null,S=!1;if(Q||c){var V=+"disabled");F();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";var I=document.createElement("img");I.setAttribute("src",Editor.magnifyImage);I.setAttribute("title",mxResources.get("preview"));I.className="geAdaptiveAsset geActiveButton";I.style.position="absolute";I.style.borderRadius="16px";I.style.background="white";I.style.cursor="default";I.style.padding="2px";I.style.opacity="0.8";I.style.height="16px";I.style.right="2px";I.style.top="2px";var M=!1,N=null,S=!1;if(Q||c){var V=[],W=null,X=null,Z=null,Y=function(ka){G.setAttribute("disabled","disabled");for(var ta=0;ta<V.length;ta++)V[ta].className=ta==ka?"geBtn gePrimaryBtn":"geBtn"};t=!0;p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="30px";A.appendChild(p);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){oa.style.display="";va.style.display="";ua.style.left="160px";Y(0);ua.scrollTop=0;ua.innerText="";k=0;W!=Ua&&(Ua=W,Ja=X,ab=Z,oa.innerText="",u(),W=null)});V.push(D);p.appendChild(D);var ba=function(ka){oa.style.display="none";va.style.display="none";ua.style.left="30px";Y(ka?-1:1);null==W&&(W=Ua);ua.scrollTop=0;ua.innerText="";v.spin(ua);var ta=function(ra,la,qa){k=0;v.stop();Ua=ra;qa=qa||{};var ya=0,Ea;for(Ea in qa)ya+=qa[Ea].length;if(la)ua.innerText=la;else if(0==ra.length&&0==ya)ua.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ua.innerText="",0<ya){oa.style.display="";ua.style.left="160px";oa.innerText="";ab=0;Ja={"draw.io":ra};for(Ea in qa)Ja[Ea]=qa[Ea];u()}else z(!0)};ka?c(ea.value,ta):Q(ta)};Q&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),p.appendChild(D),V.push(D));if(c){D=document.createElement("span");D.style.marginLeft="10px";D.innerText=mxResources.get("search")+":";p.appendChild(D);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(ka){13==ka.keyCode&&ba(!0)});p.appendChild(ea);@@ -12414,7 +12414,7 @@ oa.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;bottom:68pxa.style.top="0px";xa.style.bottom="38px";xa.style.resize="none";xa.style.boxSizing="border-box";xa.style.fontSize="12px";xa.style.border="none";xa.style.margin="8px";var Ba=document.createElement("button");Ba.className="geBtn gePrimaryBtn";Ba.style.position="absolute";Ba.style.bottom="0px";Ba.style.height="30px";Ba.style.right="0px";Ba.style.left="0px";Ba.style.margin="8px";Ba.style.fontSize="14px";Ba.style.borderRadius="4px";Ba.setAttribute("disabled","disabled");Ba.setAttribute("title",mxResources.get("ok"));mxUtils.write(Ba,mxResources.get("ok"));var Fa=I.cloneNode(!0),La=!1;mxEvent.addGestureListeners(Fa,function(ka){La=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ka){if(!La&&null!=ia){var ta="<mxfile><diagram>"+Graph.compress(ia)+"</diagram></mxfile>";E(ta,mxEvent.getClientX(ka),mxEvent.getClientY(ka),sa,wa)}});var za=I.cloneNode(!0);za.setAttribute("src",Editor.editImage);za.setAttribute("title",mxResources.get("edit"));za.style.right="";za.style.left="2px";var Da=I.cloneNode(!0);Da.setAttribute("src",Editor.helpImage);Da.setAttribute("title",mxResources.get("help"));Da.style.opacity="1";Da.style.right="-8px";Da.style.top="-8px";mxEvent.addListener(Da,"click",function(ka){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ka)});xa.style.visibility="hidden";Ba.style.visibility="hidden";za.style.visibility="hidden";Da.style.visibility="hidden";Fa.style.visibility="hidden";mxEvent.addListener(za,"click",U);mxEvent.addListener(xa,-"input",function(){""!=xa.value?Ba.removeAttribute("disabled"):Ba.setAttribute("disabled","disabled")});mxEvent.addListener(Ba,"click",function(){N()});mxEvent.addListener(xa,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(N(!0),mxEvent.consume(ka)):(N(),mxEvent.consume(ka))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==+"input",function(){""!=xa.value?Ba.removeAttribute("disabled"):Ba.setAttribute("disabled","disabled")});mxEvent.addListener(Ba,"click",function(){O()});mxEvent.addListener(xa,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(O(!0),mxEvent.consume(ka)):(O(),mxEvent.consume(ka))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ja.smartTemplate={content:C()});if(!g){var eb=function(){mxUtils.get($a,function(ka){if(!jb){jb=!0;ka=ka.getXml().documentElement.firstChild;for(var ta={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("parsererror"==ka.nodeName)null!=window.console&&console.log("Parser error in "+L+": "+ka.textContent);else if("clibs"==ka.nodeName){for(var ra=ka.getAttribute("name"),la=ka.getElementsByTagName("add"),qa=[],ya=0;ya<la.length;ya++)qa.push(encodeURIComponent(mxUtils.getTextContent(la[ya])));null!=ra&&0<qa.length&&(ta[ra]=qa.join(";"))}else if(qa=ka.getAttribute("url"),null!=qa){la=ka.getAttribute("section");ra=ka.getAttribute("subsection");if(null==la&&(ya=qa.indexOf("/"),la=qa.substring(0,ya),null==ra)){var Ea=qa.indexOf("/",ya+1);-1<Ea&&(ra=qa.substring(ya+1,Ea))}ya=Ja[la];null==ya&&(ya=[],Ja[la]=ya);qa=ka.getAttribute("clibs");null!=ta[qa]&&(qa=ta[qa]);qa={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:qa,tags:ka.getAttribute("tags")};ya.push(qa);null!=ra&&(ya=Ra[la],null==ya&&(ya={},Ra[la]=ya),la=ya[ra],null==la&&(la=[],ya[ra]=la),la.push(qa))}ka=ka.nextSibling}v.stop();u()}})};A.appendChild(va);A.appendChild(oa);@@ -12423,48 +12423,48 @@ function(){null!=y&&y();b.hideDialog(!0)});p.className="geBtn";!b.editor.cancelFmxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),g.className="geBtn",n.appendChild(g));Graph.fileSupport&&f&&(f=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(ta){b.openFiles(ka.files,!0);ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=ka}b.newDlgFileInputElt.click()}),f.className="geBtn",n.appendChild(f));n.appendChild(G);b.editor.cancelFirst||null!=d||q&&null==y||n.appendChild(p);A.appendChild(n);this.container=A};NewDialog.tagsList={};var SaveDialog=function(b,g,l,d,q,y,x,D){function J(A,B,H,T,k,v){var G=null;if(null==d||0>mxUtils.indexOf(d,A))if(k=null!=k?k:b.getTitleForService(A),0<=mxUtils.indexOf(U,A)||null!=b.getServiceForName(A)){G=document.createElement("option");if("pick"==v)G.innerHTML=mxUtils.htmlEntities(k)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",G.setAttribute("value","pickFolder-"+A),G.setAttribute("title",k+" - "+mxResources.get("pickFolder")+"...");else{var I=A+-(null!=H?"-"+H:""),M=m[I];null!=M&&null!=M.option&&M.option.parentNode.removeChild(M.option);M=null;if(null!=B){"/"==B.charAt(B.length-1)&&(B=B.substring(0,B.length-1));"/"==B.charAt(0)&&(B=B.substring(1));M=B;if(A!=App.MODE_GITHUB&&A==App.MODE_GITLAB){var P=M.lastIndexOf("/");0<=P&&(M=M.substring(P+1))}40<M.length&&(M=M.substring(0,20)+"..."+M.substring(M.length-20))}G.innerHTML=mxUtils.htmlEntities(k)+(null!=M?" – "+mxUtils.htmlEntities(M):"");G.setAttribute("title",k++(null!=H?"-"+H:""),M=m[I];null!=M&&null!=M.option&&M.option.parentNode.removeChild(M.option);M=null;if(null!=B){"/"==B.charAt(B.length-1)&&(B=B.substring(0,B.length-1));"/"==B.charAt(0)&&(B=B.substring(1));M=B;if(A!=App.MODE_GITHUB&&A==App.MODE_GITLAB){var N=M.lastIndexOf("/");0<=N&&(M=M.substring(N+1))}40<M.length&&(M=M.substring(0,20)+"..."+M.substring(M.length-20))}G.innerHTML=mxUtils.htmlEntities(k)+(null!=M?" – "+mxUtils.htmlEntities(M):"");G.setAttribute("title",k+(null!=B?" ("+B+")":"")+(null!=H&&decodeURIComponent(H)!=B?" ["+H+"]":""));G.setAttribute("value",I);m[I]={option:G,mode:A,path:B,id:H};SaveDialog.lastValue==I&&null==D?T=!0:null==T&&("root"==v?T=null==D&&b.mode==A||null!=A&&A==D:"pickFolder-"==F.value.substring(0,11)&&(T=!0));T&&G.setAttribute("selected","selected")}F.appendChild(G)}return G}function K(A){b.pickFolder(A,function(B){var H=null;A==App.MODE_GOOGLE&&null!=B.docs&&0<B.docs.length?H={mode:A,path:B.docs[0].name,id:B.docs[0].id}:A==App.MODE_ONEDRIVE&&null!=B.value&&0<B.value.length?H={mode:A,path:B.value[0].name,id:OneDriveFile.prototype.getIdOf(B.value[0])}:(A==App.MODE_GITHUB||A==App.MODE_GITLAB)&&null!=B&&0<B.length&&(H={mode:A,path:decodeURIComponent(B),id:B});null!=H&&(R.style.display="",b.addRecent(H,"Folders",5),B=J(H.mode,H.path,H.id,!0),F.innerHTML="",m={},L(),H=F.selectedIndex,F.value=B.value,0>F.selectedIndex&&(F.selectedIndex=H))},!0,!0,!0,!0)}function L(){var A=b.getRecent("Folders"),B=0;if(null!=A&&0<A.length){for(var H=0;H<A.length;H++)null!=-J(A[H].mode,A[H].path,A[H].id)&&B++;0<B&&F.appendChild(O.cloneNode(!0))}J(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");J(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(J(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),J(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&J(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);J(App.MODE_GITHUB,null,null,null,null,"pick");J(App.MODE_GITLAB,null,-null,null,null,"pick");J(App.MODE_TRELLO);A=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&A&&J(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&J(App.MODE_BROWSER);A&&J("download");Editor.popupsAllowed&&J("_blank",null,null,null,mxResources.get("openInNewWindow"));0<B&&(F.appendChild(O.cloneNode(!0)),B=F.value,F.appendChild(R),-F.value=B);if("pickFolder-"==F.value.substring(0,11)||"reset"==F.value)B=document.createElement("option"),B.setAttribute("value",""),B.setAttribute("selected","selected"),mxUtils.write(B,mxResources.get("pickFolder")+"..."),F.insertBefore(B,F.firstChild);N=F.value}function Q(){if("reset"==F.value)b.resetRecent("Folders"),F.innerHTML="",F.value="",pickFolderOption=null,m={},L();else if("pickFolder-"==F.value.substring(0,11)){var A=F.value.substring(11);F.value=N;K(A)}else if(null!=C&&null!=m[F.value]&&+J(A[H].mode,A[H].path,A[H].id)&&B++;0<B&&F.appendChild(P.cloneNode(!0))}J(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");J(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(J(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),J(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&J(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);J(App.MODE_GITHUB,null,null,null,null,"pick");J(App.MODE_GITLAB,null,+null,null,null,"pick");J(App.MODE_TRELLO);A=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&A&&J(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&J(App.MODE_BROWSER);A&&J("download");Editor.popupsAllowed&&J("_blank",null,null,null,mxResources.get("openInNewWindow"));0<B&&(F.appendChild(P.cloneNode(!0)),B=F.value,F.appendChild(R),+F.value=B);if("pickFolder-"==F.value.substring(0,11)||"reset"==F.value)B=document.createElement("option"),B.setAttribute("value",""),B.setAttribute("selected","selected"),mxUtils.write(B,mxResources.get("pickFolder")+"..."),F.insertBefore(B,F.firstChild);O=F.value}function Q(){if("reset"==F.value)b.resetRecent("Folders"),F.innerHTML="",F.value="",pickFolderOption=null,m={},L();else if("pickFolder-"==F.value.substring(0,11)){var A=F.value.substring(11);F.value=O;K(A)}else if(null!=C&&null!=m[F.value]&&null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){A=b.getExtensionForService(m[F.value].mode);var B=E.value;null!=A&&0>g.indexOf(".")&&0>B.indexOf(".")&&(E.value=B+A)}u.innerHTML="";mxUtils.write(u,mxResources.get("download"==F.value||"_blank"==F.value?"ok":"save"));""==F.value?u.setAttribute("disabled","disabled"):u.removeAttribute("disabled")}var c=document.createElement("div");c.style.display="flex";c.style.flexWrap="wrap";c.style.whiteSpace="nowrap";var e=document.createElement("div");e.style.display="grid";e.style.gap="5px 8px";e.style.gridAutoRows="auto auto 44px";e.style.gridAutoColumns="0fr minmax(0,1fr)";e.style.width="100%";var f=null,p=null;if(null!=q&&null!=y&&"image/"==y.substring(0,6)&&("image/svg"!=y.substring(0,9)||mxClient.IS_SVG)){e.style.display="inline-grid";e.style.flexBasis="75%";f=document.createElement("div");f.style.display="inline-block";f.style.height="auto";f.style.maxWidth="25%";f.style.margin="auto";var n=document.createElement("img"),t=x?q:btoa(unescape(encodeURIComponent(q)));n.setAttribute("src","data:"+y+";base64,"+t);n.style.boxSizing="border-box";n.style.maxHeight="50px";n.style.maxWidth="100%";n.style.paddingLeft="10px";f.appendChild(n);mxClient.IS_FF||"image/png"!=y||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(p=mxUtils.button(mxResources.get("copy"),function(){var A=b.base64ToBlob(t,"image/png");A=new ClipboardItem({"image/png":A,"text/html":new Blob(['<img src="data:'+y+";base64,"+t+'">'],{type:"text/html"})});navigator.clipboard.write([A]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(B){b.handleError(B)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(f.setAttribute("title",mxResources.get("openInNewWindow")),f.style.cursor="pointer",mxEvent.addGestureListeners(f,null,null,function(A){mxEvent.isPopupTrigger(A)||b.openInNewWindow(q,y,x)})):f.setAttribute("title",mxResources.get("preview"))}n=document.createElement("div");n.style.display="flex";n.style.padding="1px";n.style.alignItems="center";n.style.justifyContent="flex-end";n.style.gridColumn="1";n.style.whiteSpace="nowrap";var z=document.createElement("div");z.style.display="grid";z.style.padding="1px";z.style.alignItems="center";z.style.gridColumn="2";z.style.gridAutoColumns="minmax(0,1fr) auto";z.style.gap="6px";mxUtils.write(n,mxResources.get("saveAs")+":");var E=document.createElement("input");E.setAttribute("type","text");E.setAttribute("value",g);E.style.boxSizing="border-box";E.style.width="100%";z.appendChild(E);e.appendChild(n);e.appendChild(z);var C=null;null!=b.editor.diagramFileTypes&&null==y&&(n=n.cloneNode(!1),z=z.cloneNode(!1),mxUtils.write(n,mxResources.get("type")+":"),C=FilenameDialog.createFileTypes(b,E,b.editor.diagramFileTypes),C.style.boxSizing="border-box",C.style.width="100%",z.appendChild(C),e.appendChild(n),e.appendChild(z));n=n.cloneNode(!1);z=z.cloneNode(!1);mxUtils.write(n,mxResources.get("where")+":");var F=document.createElement("select");-F.style.textOverflow="ellipsis";F.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var U=["browser","device","download","_blank"],O=document.createElement("option");O.setAttribute("disabled","disabled");O.innerHTML="-----------------";var N=null,m={},u=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=F.value;var A=m[SaveDialog.lastValue];null!=A&&l(E,A.mode,A.id)},null,"geBtn gePrimaryBtn");+F.style.textOverflow="ellipsis";F.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var U=["browser","device","download","_blank"],P=document.createElement("option");P.setAttribute("disabled","disabled");P.innerHTML="-----------------";var O=null,m={},u=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=F.value;var A=m[SaveDialog.lastValue];null!=A&&l(E,A.mode,A.id)},null,"geBtn gePrimaryBtn");mxEvent.addListener(E,"keypress",function(A){13==A.keyCode&&u.click()});mxEvent.addListener(F,"change",Q);L();Q();z.appendChild(F);null!=SaveDialog.lastValue&&null!=m[SaveDialog.lastValue]&&(F.value=SaveDialog.lastValue);e.appendChild(n);e.appendChild(z);c.appendChild(e);null!=f&&c.appendChild(f);e=document.createElement("div");e.style.flexBasis="100%";e.style.textAlign="right";e.style.marginTop=null!=y?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||e.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));-f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&e.appendChild(f);null!=p&&e.appendChild(p);e.appendChild(u);b.editor.cancelFirst||e.appendChild(f);c.appendChild(e);this.init=function(){Editor.selectFilename(E)};this.container=c},CreateDialog=function(b,g,l,d,q,y,x,D,J,K,L,Q,c,e,f,p,n){function t(N,m,u,A){function B(){mxEvent.addListener(H,"click",function(){var I=u;if(x){var M=C.value,P=M.lastIndexOf(".");if(0>g.lastIndexOf(".")&&0>P){I=null!=-I?I:O.value;var S="";I==App.MODE_GOOGLE?S=b.drive.extension:I==App.MODE_GITHUB?S=b.gitHub.extension:I==App.MODE_GITLAB?S=b.gitLab.extension:I==App.MODE_TRELLO?S=b.trello.extension:I==App.MODE_DROPBOX?S=b.dropbox.extension:I==App.MODE_ONEDRIVE?S=b.oneDrive.extension:I==App.MODE_DEVICE&&(S=".drawio");0<=P&&(M=M.substring(0,P));C.value=M+S}}z(u)})}var H=document.createElement("a");H.style.overflow="hidden";var T=document.createElement("img");T.src=N;T.setAttribute("border","0");T.setAttribute("align",+f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&e.appendChild(f);null!=p&&e.appendChild(p);e.appendChild(u);b.editor.cancelFirst||e.appendChild(f);c.appendChild(e);this.init=function(){Editor.selectFilename(E)};this.container=c},CreateDialog=function(b,g,l,d,q,y,x,D,J,K,L,Q,c,e,f,p,n){function t(O,m,u,A){function B(){mxEvent.addListener(H,"click",function(){var I=u;if(x){var M=C.value,N=M.lastIndexOf(".");if(0>g.lastIndexOf(".")&&0>N){I=null!=+I?I:P.value;var S="";I==App.MODE_GOOGLE?S=b.drive.extension:I==App.MODE_GITHUB?S=b.gitHub.extension:I==App.MODE_GITLAB?S=b.gitLab.extension:I==App.MODE_TRELLO?S=b.trello.extension:I==App.MODE_DROPBOX?S=b.dropbox.extension:I==App.MODE_ONEDRIVE?S=b.oneDrive.extension:I==App.MODE_DEVICE&&(S=".drawio");0<=N&&(M=M.substring(0,N));C.value=M+S}}z(u)})}var H=document.createElement("a");H.style.overflow="hidden";var T=document.createElement("img");T.src=O;T.setAttribute("border","0");T.setAttribute("align","absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";H.style.display="inline-block";H.className="geBaseButton";H.style.position="relative";H.style.margin="4px";H.style.padding="8px 8px 10px 8px";H.style.whiteSpace="nowrap";H.appendChild(T);H.style.color="gray";H.style.fontSize="11px";var k=document.createElement("div");H.appendChild(k);mxUtils.write(k,m);if(null!=A&&null==b[A]){T.style.visibility="hidden";mxUtils.setOpacity(k,10);var v=new Spinner({lines:12,length:12,-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(H);var G=window.setTimeout(function(){null==b[A]&&(v.stop(),H.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[A]&&(window.clearTimeout(G),mxUtils.setOpacity(k,100),T.style.visibility="",v.stop(),B())}))}else B();R.appendChild(H);++U==Q&&(mxUtils.br(R),U=0)}function z(N){var m=C.value;if(null==N||null!=m&&0<m.length)n&&b.hideDialog(),-l(m,N,C)}L="1"==urlParams.noDevice?!1:L;x=null!=x?x:!0;D=null!=D?D:!0;Q=null!=Q?Q:4;n=null!=n?n:!0;y=document.createElement("div");y.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(y);var E=document.createElement("h2");mxUtils.write(E,q||mxResources.get("create"));E.style.marginTop="0px";E.style.marginBottom="24px";y.appendChild(E);q=document.createElement("span");mxUtils.write(q,mxResources.get("filename")+":");q.style.maxWidth="106px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";+width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(H);var G=window.setTimeout(function(){null==b[A]&&(v.stop(),H.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[A]&&(window.clearTimeout(G),mxUtils.setOpacity(k,100),T.style.visibility="",v.stop(),B())}))}else B();R.appendChild(H);++U==Q&&(mxUtils.br(R),U=0)}function z(O){var m=C.value;if(null==O||null!=m&&0<m.length)n&&b.hideDialog(),+l(m,O,C)}L="1"==urlParams.noDevice?!1:L;x=null!=x?x:!0;D=null!=D?D:!0;Q=null!=Q?Q:4;n=null!=n?n:!0;y=document.createElement("div");y.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(y);var E=document.createElement("h2");mxUtils.write(E,q||mxResources.get("create"));E.style.marginTop="0px";E.style.marginBottom="24px";y.appendChild(E);q=document.createElement("span");mxUtils.write(q,mxResources.get("filename")+":");q.style.maxWidth="106px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.style.display="inline-block";y.appendChild(q);var C=document.createElement("input");C.setAttribute("value",g);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};y.appendChild(C);null!=p&&null!=b.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="90px",y.appendChild(p));p=null;if("1"!=urlParams.noDevice&&null!=c&&null!=e&&"image/"==e.substring(0,6)&&("image/svg"!=e.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";q=document.createElement("img");var F=f?c:btoa(unescape(encodeURIComponent(c)));q.setAttribute("src","data:"+e+";base64,"+F);q.style.position="absolute";q.style.top="70px";q.style.right="100px";q.style.maxWidth="120px";q.style.maxHeight="80px";mxUtils.setPrefixedStyle(q.style,"transform","translate(50%,-50%)");y.appendChild(q);mxClient.IS_FF||"image/png"!=e||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||-(p=mxUtils.button(mxResources.get("copy"),function(N){N=b.base64ToBlob(F,"image/png");N=new ClipboardItem({"image/png":N,"text/html":new Blob(['<img src="data:'+e+";base64,"+F+'">'],{type:"text/html"})});navigator.clipboard.write([N]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(m){b.handleError(m)}))}),p.style.marginTop="6px",p.className="geBtn");J&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,-null,null,function(N){mxEvent.isPopupTrigger(N)||z("_blank")}))}mxUtils.br(y);var R=document.createElement("div");R.style.textAlign="center";var U=0;R.style.marginTop="6px";y.appendChild(R);var O=document.createElement("select");O.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),O.appendChild(c),t(IMAGE_PATH+"/google-drive-logo.svg",-mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(c,mxResources.get("oneDrive")),O.appendChild(c),b.mode==App.MODE_ONEDRIVE&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_DROPBOX),-mxUtils.write(c,mxResources.get("dropbox")),O.appendChild(c),b.mode==App.MODE_DROPBOX&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITHUB),mxUtils.write(c,mxResources.get("github")),O.appendChild(c),t(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(c=document.createElement("option"),-c.setAttribute("value",App.MODE_GITLAB),mxUtils.write(c,mxResources.get("gitlab")),O.appendChild(c),t(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_TRELLO),mxUtils.write(c,mxResources.get("trello")),O.appendChild(c),t(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||-null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)c=document.createElement("option"),c.setAttribute("value",App.MODE_DEVICE),mxUtils.write(c,mxResources.get("device")),O.appendChild(c),b.mode!=App.MODE_DEVICE&&D||c.setAttribute("selected","selected"),L&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);D&&isLocalStorage&&"0"!=urlParams.browser&&(D=document.createElement("option"),D.setAttribute("value",App.MODE_BROWSER),mxUtils.write(D,mxResources.get("browser")),O.appendChild(D),+(p=mxUtils.button(mxResources.get("copy"),function(O){O=b.base64ToBlob(F,"image/png");O=new ClipboardItem({"image/png":O,"text/html":new Blob(['<img src="data:'+e+";base64,"+F+'">'],{type:"text/html"})});navigator.clipboard.write([O]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(m){b.handleError(m)}))}),p.style.marginTop="6px",p.className="geBtn");J&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,+null,null,function(O){mxEvent.isPopupTrigger(O)||z("_blank")}))}mxUtils.br(y);var R=document.createElement("div");R.style.textAlign="center";var U=0;R.style.marginTop="6px";y.appendChild(R);var P=document.createElement("select");P.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),P.appendChild(c),t(IMAGE_PATH+"/google-drive-logo.svg",+mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(c,mxResources.get("oneDrive")),P.appendChild(c),b.mode==App.MODE_ONEDRIVE&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_DROPBOX),+mxUtils.write(c,mxResources.get("dropbox")),P.appendChild(c),b.mode==App.MODE_DROPBOX&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITHUB),mxUtils.write(c,mxResources.get("github")),P.appendChild(c),t(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(c=document.createElement("option"),+c.setAttribute("value",App.MODE_GITLAB),mxUtils.write(c,mxResources.get("gitlab")),P.appendChild(c),t(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_TRELLO),mxUtils.write(c,mxResources.get("trello")),P.appendChild(c),t(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||+null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)c=document.createElement("option"),c.setAttribute("value",App.MODE_DEVICE),mxUtils.write(c,mxResources.get("device")),P.appendChild(c),b.mode!=App.MODE_DEVICE&&D||c.setAttribute("selected","selected"),L&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);D&&isLocalStorage&&"0"!=urlParams.browser&&(D=document.createElement("option"),D.setAttribute("value",App.MODE_BROWSER),mxUtils.write(D,mxResources.get("browser")),P.appendChild(D),b.mode==App.MODE_BROWSER&&D.setAttribute("selected","selected"),t(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));D=document.createElement("div");D.style.marginTop="26px";D.style.textAlign="center";null!=K&&(L=mxUtils.button(mxResources.get("help"),function(){b.openLink(K)}),L.className="geBtn",D.appendChild(L));L=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});L.className="geBtn";b.editor.cancelFirst&&null==d&&D.appendChild(L);null==d&&(c=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),c.className="geBtn",D.appendChild(c));J&&Editor.popupsAllowed&&(J=mxUtils.button(mxResources.get("openInNewWindow"),function(){z("_blank")}),J.className="geBtn",D.appendChild(J));CreateDialog.showDownloadButton&&(J=mxUtils.button(mxResources.get("download"),function(){z("download")}),J.className="geBtn",D.appendChild(J),null!=p&&(J.style.marginTop="6px",-D.style.marginTop="6px"));null!=p&&(mxUtils.br(D),D.appendChild(p));b.editor.cancelFirst&&null==d||D.appendChild(L);mxEvent.addListener(C,"keypress",function(N){13==N.keyCode?z(App.MODE_DEVICE):27==N.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});y.appendChild(D);this.container=y};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;+D.style.marginTop="6px"));null!=p&&(mxUtils.br(D),D.appendChild(p));b.editor.cancelFirst&&null==d||D.appendChild(L);mxEvent.addListener(C,"keypress",function(O){13==O.keyCode?z(App.MODE_DEVICE):27==O.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});y.appendChild(D);this.container=y};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;var PopupDialog=function(b,g,l,d,q){q=null!=q?q:!0;var y=document.createElement("div");y.style.textAlign="left";y.style.height="100%";mxUtils.write(y,mxResources.get("fileOpenLocation"));mxUtils.br(y);mxUtils.br(y);var x=mxUtils.button(mxResources.get("openInThisWindow"),function(){q&&b.hideDialog();null!=d&&d()});x.className="geBtn";x.style.marginBottom="8px";x.style.width="280px";y.appendChild(x);mxUtils.br(y);var D=mxUtils.button(mxResources.get("openInNewWindow"),function(){q&&b.hideDialog();null!=l&&l();b.openLink(g,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=x.style.width;y.appendChild(D);mxUtils.br(y);mxUtils.br(y);mxUtils.write(y,mxResources.get("allowPopups"));this.container=y},ImageDialog=function(b,g,l,d,q,y,x,D){function J(){0<Q.value.length?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");"data:"!=Q.value.substring(0,5)?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}y=null!=y?y:!0;var K=b.editor.graph,L=document.createElement("div");mxUtils.write(L,g);g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";g.style.paddingRight="20px";var Q=document.createElement("input");Q.setAttribute("value",l);Q.setAttribute("type","text");Q.setAttribute("spellcheck","false");Q.setAttribute("autocorrect","off");Q.setAttribute("autocomplete","off");Q.setAttribute("autocapitalize","off");Q.style.marginTop="6px";Q.style.width=(Graph.fileSupport?460:340)-20+"px";Q.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundPosition="100% 50%";Q.style.paddingRight="14px";l=document.createElement("div");l.setAttribute("title",mxResources.get("reset"));l.style.position="relative";l.style.left="-16px";l.style.width="12px";l.style.height="14px";l.style.cursor="pointer";l.style.display="inline-block";l.style.top="3px";l.style.background="url('"+b.editor.transparentImage+-"')";mxEvent.addListener(l,"click",function(){Q.value="";Q.focus()});g.appendChild(Q);g.appendChild(l);L.appendChild(g);var c=D,e,f,p=function(C,F,R,U){var O="data:"==C.substring(0,5);!b.isOffline()||O&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(N){b.spinner.stop();b.hideDialog();var m=!1===U?1:null!=F&&null!=R?Math.max(F/N.width,R/N.height):Math.min(1,Math.min(520/N.width,520/N.height));y&&(C=b.convertDataUri(C));d(C,-Math.round(Number(N.width)*m),Math.round(Number(N.height)*m),c,e,f)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(C,null,null,c,e,f)):(C=b.convertDataUri(C),F=null==F?120:F,R=null==R?100:R,b.hideDialog(),d(C,F,R,c,e,f))},n=function(C,F){if(null!=C){var R=q?null:K.getModel().getGeometry(K.getSelectionCell());null!=R?p(C,R.width,R.height,F):p(C,null,null,F)}else b.hideDialog(),d(null)};this.init=function(){Q.focus();+"')";mxEvent.addListener(l,"click",function(){Q.value="";Q.focus()});g.appendChild(Q);g.appendChild(l);L.appendChild(g);var c=D,e,f,p=function(C,F,R,U){var P="data:"==C.substring(0,5);!b.isOffline()||P&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(O){b.spinner.stop();b.hideDialog();var m=!1===U?1:null!=F&&null!=R?Math.max(F/O.width,R/O.height):Math.min(1,Math.min(520/O.width,520/O.height));y&&(C=b.convertDataUri(C));d(C,+Math.round(Number(O.width)*m),Math.round(Number(O.height)*m),c,e,f)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(C,null,null,c,e,f)):(C=b.convertDataUri(C),F=null==F?120:F,R=null==R?100:R,b.hideDialog(),d(C,F,R,c,e,f))},n=function(C,F){if(null!=C){var R=q?null:K.getModel().getGeometry(K.getSelectionCell());null!=R?p(C,R.width,R.height,F):p(C,null,null,F)}else b.hideDialog(),d(null)};this.init=function(){Q.focus();if(Graph.fileSupport){Q.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=L.parentNode,F=null;mxEvent.addListener(C,"dragleave",function(R){null!=F&&(F.parentNode.removeChild(F),F=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){null!=F&&(F.parentNode.removeChild(F),-F=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(O,N,m,u,A,B,H,T){n(O,T)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var N=0;N<O.length;N++)O[N]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var U=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&n(decodeURIComponent(U))}R.stopPropagation();R.preventDefault()}),+F=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(P,O,m,u,A,B,H,T){n(P,T)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var O=0;O<P.length;O++)P[O]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var U=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&n(decodeURIComponent(U))}R.stopPropagation();R.preventDefault()}),!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign="center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&D.appendChild(l);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(Q.value=C.url));Q.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var t=document.createElement("input");-t.setAttribute("multiple","multiple");t.setAttribute("type","file");mxEvent.addListener(t,"change",function(C){null!=t.files&&(b.importFiles(t.files,0,0,b.maxImageSize,function(F,R,U,O,N,m){n(F)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var R=0;R<F.length;R++)F[R]()},!0),t.type="",t.type="file",t.value="")});t.style.display="none";document.body.appendChild(t);b.imgDlgFileInputElt=t}g=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});+t.setAttribute("multiple","multiple");t.setAttribute("type","file");mxEvent.addListener(t,"change",function(C){null!=t.files&&(b.importFiles(t.files,0,0,b.maxImageSize,function(F,R,U,P,O,m){n(F)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var R=0;R<F.length;R++)F[R]()},!0),t.type="",t.type="file",t.value="")});t.style.display="none";document.body.appendChild(t);b.imgDlgFileInputElt=t}g=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});g.className="geBtn";D.appendChild(g)}mxEvent.addListener(Q,"keypress",function(C){13==C.keyCode&&n(Q.value)});var z=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,Q.value,c,function(F,R,U){c=F;e=R;f=U});b.showDialog(C.container,300,390,!0,!0)});x&&(z.className="geBtn",D.appendChild(z));var E=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=Q.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(Q.value),-F=new Image;F.onload=function(){b.editor.convertImageToDataUri(C,function(R){b.confirmImageResize(function(U){b.resizeImage(F,R,mxUtils.bind(this,function(O,N,m){b.spinner.stop();null!=O&&O.length<b.maxImageBytes?(Q.value=O,J()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},F.width>b.maxImageSize||F.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};F.onerror=function(){b.spinner.stop();+F=new Image;F.onload=function(){b.editor.convertImageToDataUri(C,function(R){b.confirmImageResize(function(U){b.resizeImage(F,R,mxUtils.bind(this,function(P,O,m){b.spinner.stop();null!=P&&P.length<b.maxImageBytes?(Q.value=P,J()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},F.width>b.maxImageSize||F.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};F.onerror=function(){b.spinner.stop();b.handleError({message:mxResources.get("fileNotFound")})};F.src=C}});E.className="geBtn";mxEvent.addListener(Q,"change",function(C){c=null;J()});J();D.appendChild(E);x=mxUtils.button(mxResources.get("apply"),function(){n(Q.value)});x.className="geBtn gePrimaryBtn";D.appendChild(x);b.editor.cancelFirst||D.appendChild(l);Graph.fileSupport&&(D.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),L.appendChild(x));L.appendChild(D);this.container=L},LinkDialog=function(b,g,l,d,q,y,x){function D(C,F){var R=document.createElement("option");mxUtils.write(R,mxResources.get(C));R.value=C;z.appendChild(R);E[C]=F}var J=document.createElement("div");J.style.height="100%";mxUtils.write(J,mxResources.get("editLink")+":");var K=document.createElement("div");K.className="geTitle";K.style.backgroundColor="transparent";K.style.borderColor="transparent";K.style.whiteSpace="nowrap";K.style.textOverflow="clip";K.style.cursor="default";var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("dragUrlsHere"));L.setAttribute("type","text");L.style.marginTop="6px";L.style.width="414px";L.style.boxSizing="border-box";L.style.backgroundImage="url('"+Dialog.prototype.clearImage+@@ -12491,53 +12491,53 @@ var RevisionDialog=function(b,g,l){var d=document.createElement("div"),q=documen"1px";y.style.borderStyle="solid";var x=document.createElement("div");x.style.position="absolute";x.style.display="none";x.style.textAlign="center";x.style.padding="8px";x.style.borderRadius="8px";x.style.left="50%";x.style.top="50%";x.style.whiteSpace="nowrap";x.style.transform="translate(-50%, -50%)";x.style.background="inherit";x.style.border="1px solid";y.appendChild(x);mxEvent.disableContextMenu(y);d.appendChild(y);var D=new Graph(y);D.setTooltips(!1);D.setEnabled(!1);D.setPanning(!0);D.panningHandler.ignoreCell=!0;D.panningHandler.useLeftButtonForPanning=!0;D.minFitScale=null;D.maxFitScale=null;D.centerZoom=!0;var J=0,K=null,L=0,Q=D.getGlobalVariable;D.getGlobalVariable=function(X){return"page"==X&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==X?L+1:"pagecount"==X?null!=K?K.length:1:Q.apply(this,arguments)};D.getLinkForCell=function(){return null};for(var c=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),e=b.getCurrentFile(),f=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={},n=0;n<f.length;n++)p[f[n].getAttribute("id")]=f[n];var t=null,z=null,E=null,C=null,F=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=E&&D.zoomIn()},20);F.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=E&&D.zoomOut()},20);R.setAttribute("disabled",-"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=E&&(1==D.view.scale?(D.maxFitScale=8,D.fit(8)):D.zoomActual(),D.center())},20);U.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);O.setAttribute("disabled","disabled");var N=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);N.setAttribute("disabled","disabled");var m=y.cloneNode(!1);m.style.pointerEvent=+"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=E&&(1==D.view.scale?(D.maxFitScale=8,D.fit(8)):D.zoomActual(),D.center())},20);U.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);P.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);O.setAttribute("disabled","disabled");var m=y.cloneNode(!1);m.style.pointerEvent="none";y.parentNode.appendChild(m);var u=new Graph(m);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var A=document.createElement("div");A.style.textAlign="left";A.style.color="gray";A.style.backgroundColor="transparent";A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.style.whiteSpace="nowrap";A.style.cursor="default";A.style.height="100%";A.style.display=-"inline-flex";A.style.alignItems="center";A.style.flexGrow="1";mxEvent.addListener(A,"click",function(){var X=mxUtils.getTextContent(A);""!=X&&b.alert(X)});var B=null;mxEvent.addGestureListeners(O,function(X){try{var Z=null!=K[J]?p[K[J].getAttribute("id")]:null;mxUtils.setOpacity(O,20);x.innerText="";if(null==Z)x.style.display="inline-block",mxUtils.write(x,mxResources.get("pageNotFound"));else{B=A.innerHTML;A.innerHTML=mxResources.get("current");y.style.display="none";m.style.display="";m.style.backgroundColor=-y.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,u.getModel());u.view.scaleAndTranslate(D.view.scale,D.view.translate.x,D.view.translate.y);u.mathEnabled="1"==Y.getAttribute("math");u.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container)}}catch(ba){x.style.display="inline-block",x.innerText="",mxUtils.write(x,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(O,-60);x.style.display="none";x.innerText="";"none"==y.style.display&&(y.style.display="",A.innerHTML=B,m.style.display="none")});mxEvent.addListener(N,"click",mxUtils.bind(this,function(X){null!=E&&(X=b.getPagesForNode(E.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{e.patch(Y,null,!0,!0),b.hideDialog(),+"inline-flex";A.style.alignItems="center";A.style.flexGrow="1";mxEvent.addListener(A,"click",function(){var X=mxUtils.getTextContent(A);""!=X&&b.alert(X)});var B=null;mxEvent.addGestureListeners(P,function(X){try{var Z=null!=K[J]?p[K[J].getAttribute("id")]:null;mxUtils.setOpacity(P,20);x.innerText="";if(null==Z)x.style.display="inline-block",mxUtils.write(x,mxResources.get("pageNotFound"));else{B=A.innerHTML;A.innerHTML=mxResources.get("current");y.style.display="none";m.style.display="";m.style.backgroundColor=+y.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,u.getModel());u.view.scaleAndTranslate(D.view.scale,D.view.translate.x,D.view.translate.y);u.mathEnabled="1"==Y.getAttribute("math");u.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container)}}catch(ba){x.style.display="inline-block",x.innerText="",mxUtils.write(x,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(P,+60);x.style.display="none";x.innerText="";"none"==y.style.display&&(y.style.display="",A.innerHTML=B,m.style.display="none")});mxEvent.addListener(O,"click",mxUtils.bind(this,function(X){null!=E&&(X=b.getPagesForNode(E.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{e.patch(Y,null,!0,!0),b.hideDialog(),b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var H=mxUtils.button(mxResources.get("restore"),function(X){null!=E&&null!=C&&b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(H.setAttribute("disabled","disabled"),e.save(!0,function(Z){b.spinner.stop();H.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();H.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.userSelect="none";T.style.maxWidth="100px";T.style.marginLeft="10px";T.style.display="none";var k=null;mxEvent.addListener(T,"change",function(X){null!=k&&(k(X),mxEvent.consume(X))});var v=mxUtils.button(mxResources.get("open"),function(){null!=E&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(E.documentElement)),b.openLink(b.getUrl(),null,!0))});v.className="geBtn";v.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});G.className="geBtn";G.setAttribute("disabled","disabled");null!=l&&(v.style.display="none");f=document.createElement("div");f.style.position="absolute";f.style.top="482px";f.style.right="28px";f.style.left="32px";f.style.justifyContent="end";f.style.display="flex";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.display="flex";I.style.alignItems="center";I.style.justifyContent="stretch";I.style.left="32px";I.style.right="32px";I.style.border="none";I.style.top="440px";I.style.height="28px";var M=-null;if(null!=g&&0<g.length){y.style.cursor="move";var P=document.createElement("table");P.style.borderWidth="1px";P.style.borderStyle="solid";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var S=document.createElement("tbody"),V=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(J=mxUtils.indexOf(b.pages,b.currentPage));for(n=g.length-1;0<=n;n--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){c.stop();+null;if(null!=g&&0<g.length){y.style.cursor="move";var N=document.createElement("table");N.style.borderWidth="1px";N.style.borderStyle="solid";N.style.borderCollapse="collapse";N.style.borderSpacing="0px";N.style.width="100%";var S=document.createElement("tbody"),V=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(J=mxUtils.indexOf(b.pages,b.currentPage));for(n=g.length-1;0<=n;n--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){c.stop();x.innerText="";var fa=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=aa){var da=function(wa){null!=wa&&(wa=ha(Editor.parseDiagramNode(wa)));return wa},ha=function(wa){var ua=wa.getAttribute("background");if(null==ua||""==ua||ua==mxConstants.NONE)ua=D.defaultPageBackgroundColor;y.style.backgroundColor=mxUtils.getLightDarkColor(ua);(new mxCodec(wa.ownerDocument)).decode(wa,D.getModel());D.maxFitScale=1;D.fit(8);D.center();D.mathEnabled="1"==wa.getAttribute("math");D.setAdaptiveColors(wa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&D.mathEnabled&&Editor.MathJaxRender(D.container);return wa};T.style.display="none";T.innerText="";E=fa;C=ca;K=parseSelectFunction=null;L=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");K=[];for(ca=0;ca<fa.length;ca++)K.push(fa[ca]);L=Math.min(J,K.length-1);0<K.length&&da(K[L]);if(1<K.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<K.length;ca++){fa=document.createElement("option");fa.setAttribute("title",pa+" ("+K[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var pa=K[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(K[ca].getAttribute("id"));var na="";if(null!=aa){var ia=new DiagramPage(K[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ia])&&(na=" (M)")}else na=" (X)";mxUtils.write(fa,pa+na);ca==L&&fa.setAttribute("selected","selected");T.appendChild(fa)}k=function(){try{var wa=parseInt(T.value);L=J=wa;da(K[wa])}catch(ua){T.value=J,b.handleError(ua)}}}else ha(aa);-pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");A.innerText="";mxUtils.write(A,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());A.setAttribute("title",Y.getAttribute("title"));F.removeAttribute("disabled");R.removeAttribute("disabled");U.removeAttribute("disabled");O.removeAttribute("disabled");N.removeAttribute("disabled");null!=e&&e.isRestricted()||(b.editor.graph.isEnabled()&&H.removeAttribute("disabled"),v.removeAttribute("disabled"),G.removeAttribute("disabled"));-mxUtils.setOpacity(F,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(O,60);mxUtils.setOpacity(N,60)}else T.style.display="none",T.innerText="",A.innerText="",x.innerText="",mxUtils.write(A,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=+pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");A.innerText="";mxUtils.write(A,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());A.setAttribute("title",Y.getAttribute("title"));F.removeAttribute("disabled");R.removeAttribute("disabled");U.removeAttribute("disabled");P.removeAttribute("disabled");O.removeAttribute("disabled");null!=e&&e.isRestricted()||(b.editor.graph.isEnabled()&&H.removeAttribute("disabled"),v.removeAttribute("disabled"),G.removeAttribute("disabled"));+mxUtils.setOpacity(F,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(P,60);mxUtils.setOpacity(O,60)}else T.style.display="none",T.innerText="",A.innerText="",x.innerText="",mxUtils.write(A,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding="6px";ea.style.whiteSpace="nowrap";X==g[g.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===V?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){z!=X&&(c.stop(),-null!=t&&(t.style.backgroundColor=""),z=X,t=Y,t.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=E=null,A.removeAttribute("title"),A.innerText=mxResources.get("loading")+"...",y.style.backgroundColor=D.defaultPageBackgroundColor,x.innerText="",D.getModel().clear(),H.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),v.setAttribute("disabled",-"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(F,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(O,20),mxUtils.setOpacity(N,20),c.spin(y),X.getXml(function(fa){if(z==X)try{ba(fa)}catch(aa){A.innerText=mxResources.get("error")+": "+aa.message}},function(fa){c.stop();T.style.display="none";T.innerText="";A.innerText="";mxUtils.write(A,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,-"dblclick",function(ca){v.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(g[n]);null!=W&&n==g.length-1&&(M=W)}P.appendChild(S);q.appendChild(P)}else null==e||null==b.drive&&e.constructor==window.DriveFile||null==b.dropbox&&e.constructor==window.DropboxFile?(y.style.display="none",I.style.display="none",mxUtils.write(q,mxResources.get("notAvailable"))):(y.style.display="none",I.style.display=-"none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";I.appendChild(A);I.appendChild(O);I.appendChild(R);I.appendChild(U);I.appendChild(F);I.appendChild(T);I.appendChild(N);b.editor.cancelFirst&&f.appendChild(q);f.appendChild(v);null!=e&&e.constructor==DriveFile&&f.appendChild(G);f.appendChild(H);b.editor.cancelFirst||f.appendChild(q);d.appendChild(f);d.appendChild(I);-this.container=d},DraftDialog=function(b,g,l,d,q,y,x,D,J){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,g);K.appendChild(L);var Q=document.createElement("select"),c=mxUtils.bind(this,function(){"-1"==Q.value?(Q.value=Q.options[0].value,c(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this,N;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){for(N=-0;N<J.length;N++)q.apply(O,[N,mxUtils.bind(O,function(){})]);b.hideDialog(!0);m.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(z=mxUtils.parseXml(J[Q.value].data),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,this.init())});if(null!=J){Q.style.marginLeft="4px";for(g=0;g<J.length;g++){var e=document.createElement("option");e.setAttribute("value",g);var f=new Date(J[g].created),p=new Date(J[g].modified);mxUtils.write(e,f.toLocaleDateString()+" "+f.toLocaleTimeString()+" - "++null!=t&&(t.style.backgroundColor=""),z=X,t=Y,t.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=E=null,A.removeAttribute("title"),A.innerText=mxResources.get("loading")+"...",y.style.backgroundColor=D.defaultPageBackgroundColor,x.innerText="",D.getModel().clear(),H.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),v.setAttribute("disabled",+"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(F,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(P,20),mxUtils.setOpacity(O,20),c.spin(y),X.getXml(function(fa){if(z==X)try{ba(fa)}catch(aa){A.innerText=mxResources.get("error")+": "+aa.message}},function(fa){c.stop();T.style.display="none";T.innerText="";A.innerText="";mxUtils.write(A,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,+"dblclick",function(ca){v.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(g[n]);null!=W&&n==g.length-1&&(M=W)}N.appendChild(S);q.appendChild(N)}else null==e||null==b.drive&&e.constructor==window.DriveFile||null==b.dropbox&&e.constructor==window.DropboxFile?(y.style.display="none",I.style.display="none",mxUtils.write(q,mxResources.get("notAvailable"))):(y.style.display="none",I.style.display=+"none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";I.appendChild(A);I.appendChild(P);I.appendChild(R);I.appendChild(U);I.appendChild(F);I.appendChild(T);I.appendChild(O);b.editor.cancelFirst&&f.appendChild(q);f.appendChild(v);null!=e&&e.constructor==DriveFile&&f.appendChild(G);f.appendChild(H);b.editor.cancelFirst||f.appendChild(q);d.appendChild(f);d.appendChild(I);+this.container=d},DraftDialog=function(b,g,l,d,q,y,x,D,J){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,g);K.appendChild(L);var Q=document.createElement("select"),c=mxUtils.bind(this,function(){"-1"==Q.value?(Q.value=Q.options[0].value,c(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this,O;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){for(O=+0;O<J.length;O++)q.apply(P,[O,mxUtils.bind(P,function(){})]);b.hideDialog(!0);m.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(z=mxUtils.parseXml(J[Q.value].data),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,this.init())});if(null!=J){Q.style.marginLeft="4px";for(g=0;g<J.length;g++){var e=document.createElement("option");e.setAttribute("value",g);var f=new Date(J[g].created),p=new Date(J[g].modified);mxUtils.write(e,f.toLocaleDateString()+" "+f.toLocaleTimeString()+" - "+(f.toDateString(),p.toDateString(),p.toLocaleDateString())+" "+p.toLocaleTimeString());Q.appendChild(e)}e=document.createElement("option");e.setAttribute("value","-1");mxUtils.write(e,mxResources.get("deleteAll"));Q.appendChild(e);L.appendChild(Q);mxEvent.addListener(Q,"change",c)}null==l&&(l=J[0].data);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.marginTop="10px";n.style.left="40px";n.style.right="40px";n.style.top="46px";n.style.bottom=-"74px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);K.appendChild(n);var t=new Graph(n);t.setEnabled(!1);t.setPanning(!0);t.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var z=mxUtils.parseXml(l),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,F=null,R=t.getGlobalVariable;t.getGlobalVariable=function(O){return"page"==O&&null!=F&&null!=F[C]?F[C].getAttribute("name"):-"pagenumber"==O?C+1:"pagecount"==O?null!=F?F.length:1:R.apply(this,arguments)};t.getLinkForCell=function(){return null};l=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){t.zoomIn()},20);L=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){t.zoomOut()},20);g=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==t.view.scale?(t.maxFitScale=8,t.fit(8)):t.zoomActual();t.center()},20);x=mxUtils.button(x||mxResources.get("discard"),-function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(N){q.apply(O,[Q.value,mxUtils.bind(O,function(){null!=Q.parentNode&&(Q.options[Q.selectedIndex].parentNode.removeChild(Q.options[Q.selectedIndex]),1<Q.options.length?(Q.value=Q.options[0].value,c()):b.hideDialog(!0))})]);N.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});x.className="geBtn";var U=document.createElement("select");+"74px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);K.appendChild(n);var t=new Graph(n);t.setEnabled(!1);t.setPanning(!0);t.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var z=mxUtils.parseXml(l),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,F=null,R=t.getGlobalVariable;t.getGlobalVariable=function(P){return"page"==P&&null!=F&&null!=F[C]?F[C].getAttribute("name"):+"pagenumber"==P?C+1:"pagecount"==P?null!=F?F.length:1:R.apply(this,arguments)};t.getLinkForCell=function(){return null};l=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){t.zoomIn()},20);L=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){t.zoomOut()},20);g=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==t.view.scale?(t.maxFitScale=8,t.fit(8)):t.zoomActual();t.center()},20);x=mxUtils.button(x||mxResources.get("discard"),+function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var P=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(O){q.apply(P,[Q.value,mxUtils.bind(P,function(){null!=Q.parentNode&&(Q.options[Q.selectedIndex].parentNode.removeChild(Q.options[Q.selectedIndex]),1<Q.options.length?(Q.value=Q.options[0].value,c()):b.hideDialog(!0))})]);O.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});x.className="geBtn";var U=document.createElement("select");U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";y=mxUtils.button(y||mxResources.get("edit"),function(){d.apply(this,[Q.value])});y.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position="absolute";e.style.bottom="30px";e.style.right="40px";e.style.textAlign="right";f=document.createElement("div");f.className="geToolbarContainer";f.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";-this.init=function(){function O(A){if(null!=A){var B=A.getAttribute("background");if(null==B||""==B||B==mxConstants.NONE)B="light-dark(#ffffff, transparent)";n.style.backgroundColor=B;(new mxCodec(A.ownerDocument)).decode(A,t.getModel());t.maxFitScale=1;t.fit(8);t.center()}return A}function N(A){null!=A&&(A=O(Editor.parseDiagramNode(A)));return A}mxEvent.addListener(U,"change",function(A){C=parseInt(U.value);N(F[C]);mxEvent.consume(A)});if("mxfile"==E.nodeName){var m=E.getElementsByTagName("diagram");-F=[];for(var u=0;u<m.length;u++)F.push(m[u]);0<F.length&&N(F[C]);U.innerText="";if(1<F.length)for(U.style.display="",u=0;u<F.length;u++)m=document.createElement("option"),mxUtils.write(m,F[u].getAttribute("name")||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",u),u==C&&m.setAttribute("selected","selected"),U.appendChild(m);else U.style.display="none"}else O(E)};f.appendChild(U);f.appendChild(l);f.appendChild(L);f.appendChild(g);l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});+this.init=function(){function P(A){if(null!=A){var B=A.getAttribute("background");if(null==B||""==B||B==mxConstants.NONE)B="light-dark(#ffffff, transparent)";n.style.backgroundColor=B;(new mxCodec(A.ownerDocument)).decode(A,t.getModel());t.maxFitScale=1;t.fit(8);t.center()}return A}function O(A){null!=A&&(A=P(Editor.parseDiagramNode(A)));return A}mxEvent.addListener(U,"change",function(A){C=parseInt(U.value);O(F[C]);mxEvent.consume(A)});if("mxfile"==E.nodeName){var m=E.getElementsByTagName("diagram");+F=[];for(var u=0;u<m.length;u++)F.push(m[u]);0<F.length&&O(F[C]);U.innerText="";if(1<F.length)for(U.style.display="",u=0;u<F.length;u++)m=document.createElement("option"),mxUtils.write(m,F[u].getAttribute("name")||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",u),u==C&&m.setAttribute("selected","selected"),U.appendChild(m);else U.style.display="none"}else P(E)};f.appendChild(U);f.appendChild(l);f.appendChild(L);f.appendChild(g);l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});l.className="geBtn";D=null!=D?mxUtils.button(mxResources.get("ignore"),D):null;null!=D&&(D.className="geBtn");b.editor.cancelFirst?(e.appendChild(l),null!=D&&e.appendChild(D),e.appendChild(x),e.appendChild(y)):(e.appendChild(y),e.appendChild(x),null!=D&&e.appendChild(D),e.appendChild(l));K.appendChild(e);K.appendChild(f);this.container=K},FindWindow=function(b,g,l,d,q,y){function x(k,v,G){if("object"===typeof v.value&&null!=v.value.attributes){v=v.value.attributes;for(var I=0;I<v.length;I++)if("label"!=v[I].nodeName){var M=mxUtils.trim(v[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==k&&0<=M.indexOf(G)||null!=k&&k.test(M))return!0}}return!1}function D(){e?(B.removeAttribute("disabled"),H.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));C.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function J(k,v,G){u.innerText="";var I=L.model.getDescendants(L.model.getRoot()),M=C.value.toLowerCase(),-P=R.checked?new RegExp(M):null,S=null;p=null;Q!=M&&(Q=M,c=null,f=!1);var V=null==c;if(0<M.length){if(f){f=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}k=(W+1)%b.pages.length;c=null;do f=!1,I=b.pages[k],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(I),L.model.setRoot(I.root),k=(k+1)%b.pages.length;while(!J(!0,v,G)&&k!=W);c&&(c=null,G?b.editor.graph.model.execute(new SelectPage(b,I)):b.selectPage(I));f=!1;L=b.editor.graph;return J(!0,v,G)}for(X=0;X<I.length;X++){W=-L.view.getState(I[X]);v&&(V=V||W==c);if(null!=W&&null!=W.cell.value&&(V||null==S)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(O.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([O])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;v&&y&&W==c&&(label=label.substr(n),Z=n);var Y=""==F.value;if(null==P&&(0<=label.indexOf(M)||Y&&x(P,W.cell,M))||null!=P&&(P.test(label)||-Y&&x(P,W.cell,M)))if(y&&(null!=P?(Y=label.match(P),null!=Y&&0<Y.length&&(p=Y[0].toLowerCase(),n=Z+Y.index+p.length)):(p=M,n=Z+label.indexOf(M)+p.length)),V){S=W;break}else null==S&&(S=W)}V=V||W==c}}if(null!=S){if(X==I.length&&U.checked)return c=null,f=!0,J(!0,v,G);c=S;L.scrollCellToVisible(c.cell);L.isEnabled()&&!L.isCellLocked(c.cell)?G||L.getSelectionCell()==c.cell&&1==L.getSelectionCount()||L.setSelectionCell(c.cell):L.highlightCell(c.cell)}else{if(!k&&U.checked)return f=!0,J(!0,v,G);L.isEnabled()&&+N=R.checked?new RegExp(M):null,S=null;p=null;Q!=M&&(Q=M,c=null,f=!1);var V=null==c;if(0<M.length){if(f){f=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}k=(W+1)%b.pages.length;c=null;do f=!1,I=b.pages[k],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(I),L.model.setRoot(I.root),k=(k+1)%b.pages.length;while(!J(!0,v,G)&&k!=W);c&&(c=null,G?b.editor.graph.model.execute(new SelectPage(b,I)):b.selectPage(I));f=!1;L=b.editor.graph;return J(!0,v,G)}for(X=0;X<I.length;X++){W=+L.view.getState(I[X]);v&&(V=V||W==c);if(null!=W&&null!=W.cell.value&&(V||null==S)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(P.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([P])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;v&&y&&W==c&&(label=label.substr(n),Z=n);var Y=""==F.value;if(null==N&&(0<=label.indexOf(M)||Y&&x(N,W.cell,M))||null!=N&&(N.test(label)||+Y&&x(N,W.cell,M)))if(y&&(null!=N?(Y=label.match(N),null!=Y&&0<Y.length&&(p=Y[0].toLowerCase(),n=Z+Y.index+p.length)):(p=M,n=Z+label.indexOf(M)+p.length)),V){S=W;break}else null==S&&(S=W)}V=V||W==c}}if(null!=S){if(X==I.length&&U.checked)return c=null,f=!0,J(!0,v,G);c=S;L.scrollCellToVisible(c.cell);L.isEnabled()&&!L.isCellLocked(c.cell)?G||L.getSelectionCell()==c.cell&&1==L.getSelectionCount()||L.setSelectionCell(c.cell):L.highlightCell(c.cell)}else{if(!k&&U.checked)return f=!0,J(!0,v,G);L.isEnabled()&&!G&&L.clearSelection()}e=null!=S;y&&!k&&D();return 0==M.length||null!=S}var K=b.actions.get("findReplace"),L=b.editor.graph,Q=null,c=null,e=!1,f=!1,p=null,n=0,t=1,z=document.createElement("div");z.style.userSelect="none";z.style.overflow="hidden";z.style.padding="10px";z.style.height="100%";var E=y?"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=E;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";z.appendChild(C);mxUtils.br(z);if(y){var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("replaceWith"));F.setAttribute("type","text");F.style.marginTop="4px";F.style.marginBottom="6px";F.style.width=E;F.style.fontSize="12px";F.style.borderRadius="4px";F.style.padding="6px";z.appendChild(F);mxUtils.br(z);mxEvent.addListener(F,"input",D)}var R=document.createElement("input");R.setAttribute("id","geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";z.appendChild(R);E=document.createElement("label");E.setAttribute("for","geFindWinRegExChck");z.appendChild(E);mxUtils.write(E,mxResources.get("regularExpression"));z.appendChild(E);E=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");E.style.position="relative";E.style.marginLeft="6px";E.style.top="3px";z.appendChild(E);mxUtils.br(z);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");-U.setAttribute("type","checkbox");U.style.marginRight="4px";z.appendChild(U);E=document.createElement("label");E.setAttribute("for","geFindWinAllPagesChck");z.appendChild(E);mxUtils.write(E,mxResources.get("allPages"));z.appendChild(E);var O=document.createElement("div");mxUtils.br(z);E=document.createElement("div");E.style.left="0px";E.style.right="0px";E.style.marginTop="6px";E.style.padding="0 6px 0 6px";E.style.textAlign="center";z.appendChild(E);var N=mxUtils.button(mxResources.get("reset"),-function(){u.innerText="";C.value="";C.style.backgroundColor="";y&&(F.value="",D());Q=c=null;f=!1;C.focus()});N.setAttribute("title",mxResources.get("reset"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";y||E.appendChild(N);var m=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(k){b.handleError(k)}});m.setAttribute("title",-mxResources.get("find")+" (Enter)");m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";E.appendChild(m);var u=document.createElement("div");u.style.marginTop="10px";if(y){var A=function(k,v,G,I,M){if(null==M||"1"!=M.html)return I=k.toLowerCase().indexOf(v,I),0>I?k:k.substr(0,I)+G+k.substr(I+v.length);var P=k;v=mxUtils.htmlEntities(v,!1,!1,!1);M=[];var S=-1;for(k=k.replace(/<br>/ig,-"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=k.indexOf("<",S+1));)M.push(S);S=k.match(/<[^>]*>/g);k=k.replace(/<[^>]*>/g,"");I=k.toLowerCase().indexOf(v,I);if(0>I)return P;P=I+v.length;G=mxUtils.htmlEntities(G);k=k.substr(0,I)+G+k.substr(P);for(var V=0,W=0;W<M.length;W++){if(M[W]-V<I)k=k.substr(0,M[W])+S[W]+k.substr(M[W]);else{var X=M[W]-V<P?I+V:M[W]+(G.length-v.length);k=k.substr(0,X)+S[W]+k.substr(X)}V+=S[W].length}return k.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,+U.setAttribute("type","checkbox");U.style.marginRight="4px";z.appendChild(U);E=document.createElement("label");E.setAttribute("for","geFindWinAllPagesChck");z.appendChild(E);mxUtils.write(E,mxResources.get("allPages"));z.appendChild(E);var P=document.createElement("div");mxUtils.br(z);E=document.createElement("div");E.style.left="0px";E.style.right="0px";E.style.marginTop="6px";E.style.padding="0 6px 0 6px";E.style.textAlign="center";z.appendChild(E);var O=mxUtils.button(mxResources.get("reset"),+function(){u.innerText="";C.value="";C.style.backgroundColor="";y&&(F.value="",D());Q=c=null;f=!1;C.focus()});O.setAttribute("title",mxResources.get("reset"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";y||E.appendChild(O);var m=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(k){b.handleError(k)}});m.setAttribute("title",+mxResources.get("find")+" (Enter)");m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";E.appendChild(m);var u=document.createElement("div");u.style.marginTop="10px";if(y){var A=function(k,v,G,I,M){if(null==M||"1"!=M.html)return I=k.toLowerCase().indexOf(v,I),0>I?k:k.substr(0,I)+G+k.substr(I+v.length);var N=k;v=mxUtils.htmlEntities(v,!1,!1,!1);M=[];var S=-1;for(k=k.replace(/<br>/ig,+"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=k.indexOf("<",S+1));)M.push(S);S=k.match(/<[^>]*>/g);k=k.replace(/<[^>]*>/g,"");I=k.toLowerCase().indexOf(v,I);if(0>I)return N;N=I+v.length;G=mxUtils.htmlEntities(G);k=k.substr(0,I)+G+k.substr(N);for(var V=0,W=0;W<M.length;W++){if(M[W]-V<I)k=k.substr(0,M[W])+S[W]+k.substr(M[W]);else{var X=M[W]-V<N?I+V:M[W]+(G.length-v.length);k=k.substr(0,X)+S[W]+k.substr(X)}V+=S[W].length}return k.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1").replace(/\n/g,"<br>")},B=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.isCellEditable(k)&&L.model.setValue(k,A(v,p,F.value,n-p.length,L.getCurrentCellStyle(k)));C.style.backgroundColor=J(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(G){b.handleError(G)}});B.setAttribute("title",mxResources.get("replFind"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.className="geBtn gePrimaryBtn";B.setAttribute("disabled","disabled");E.appendChild(B);mxUtils.br(E);var H=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.model.setValue(k,A(v,p,F.value,n-p.length,L.getCurrentCellStyle(k)));B.setAttribute("disabled","disabled");H.setAttribute("disabled","disabled")}}catch(G){b.handleError(G)}});H.setAttribute("title",mxResources.get("replace"));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";H.setAttribute("disabled","disabled");E.appendChild(H);var T=mxUtils.button(mxResources.get("replaceAll"),function(){u.innerText="";Q=null;var k=b.currentPage,v=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var G=0,I={};J(!1,!0,!0)&&100>G;){var M=c.cell,P=L.getLabel(M),S=I[M.id];if(S&&S.replAllMrk==t&&S.replAllPos>=n)break;I[M.id]=-{replAllMrk:t,replAllPos:n};L.isCellEditable(M)&&(L.model.setValue(M,A(P,p,F.value,n-p.length,L.getCurrentCellStyle(M))),G++)}k!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,k));mxUtils.write(u,mxResources.get("matchesRepl",[G]))}catch(V){b.handleError(V)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(v),b.editor.graph.rendering=!0}t++});T.setAttribute("title",mxResources.get("replaceAll"));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");E.appendChild(T);mxUtils.br(E);E.appendChild(N);N=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));N.setAttribute("title",mxResources.get("close"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";-E.appendChild(N);mxUtils.br(E);E.appendChild(u)}else N.style.width="90px",m.style.width="90px";mxEvent.addListener(C,"keyup",function(k){if(91==k.keyCode||93==k.keyCode||17==k.keyCode)mxEvent.consume(k);else if(27==k.keyCode)K.funct();else if(Q!=C.value.toLowerCase()||13==k.keyCode)try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(v){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(z,"keydown",function(k){70==k.keyCode&&b.keyHandler.isControlDown(k)&&+"6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");E.appendChild(H);var T=mxUtils.button(mxResources.get("replaceAll"),function(){u.innerText="";Q=null;var k=b.currentPage,v=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var G=0,I={};J(!1,!0,!0)&&100>G;){var M=c.cell,N=L.getLabel(M),S=I[M.id];if(S&&S.replAllMrk==t&&S.replAllPos>=n)break;I[M.id]=+{replAllMrk:t,replAllPos:n};L.isCellEditable(M)&&(L.model.setValue(M,A(N,p,F.value,n-p.length,L.getCurrentCellStyle(M))),G++)}k!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,k));mxUtils.write(u,mxResources.get("matchesRepl",[G]))}catch(V){b.handleError(V)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(v),b.editor.graph.rendering=!0}t++});T.setAttribute("title",mxResources.get("replaceAll"));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");E.appendChild(T);mxUtils.br(E);E.appendChild(O);O=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));O.setAttribute("title",mxResources.get("close"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";+E.appendChild(O);mxUtils.br(E);E.appendChild(u)}else O.style.width="90px",m.style.width="90px";mxEvent.addListener(C,"keyup",function(k){if(91==k.keyCode||93==k.keyCode||17==k.keyCode)mxEvent.consume(k);else if(27==k.keyCode)K.funct();else if(Q!=C.value.toLowerCase()||13==k.keyCode)try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(v){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(z,"keydown",function(k){70==k.keyCode&&b.keyHandler.isControlDown(k)&&!mxEvent.isShiftDown(k)&&(K.funct(),mxEvent.consume(k))});this.window=new mxWindow(mxResources.get("find")+(y?"/"+mxResources.get("replace"):""),z,g,l,d,q,!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?U.removeAttribute("disabled"):(U.checked=!1,U.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,g,l,d,q,y){var x=b.editor.graph,D=document.createElement("div");D.style.textAlign="center";D.style.userSelect="none";D.style.overflow="hidden";D.style.height="100%";if(y){var J=function(){var f=x.freehand.getStrokeColor(!0);null!=f&&f!=mxConstants.NONE&&1<f.length&&"string"===typeof f&&("default"==f?f=mxResources.get("useBlackAndWhite"):(f="#"==f.charAt(0)?f.substring(1).toUpperCase():f,f=ColorDialog.prototype.colorNames[f]),null!=f&&Q.setAttribute("title",f))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=x.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";D.appendChild(K);x.freehand.setPerfectFreehandMode(K.checked);var L=document.createElement("label");L.setAttribute("for","geFreehandBrush");@@ -12550,57 +12550,57 @@ mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){x.freehand.isDrawing()&&x.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.height="100%";var D=document.createElement("div");D.style.display="flex";D.style.alignItems="center";D.style.justifyContent="center";D.style.paddingTop="20px";var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginRight="4px";J.checked=!0;var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginRight="4px";K.checked=!0;var L=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(y.isSelectionEmpty()?y.getVerticesAndEdges():y.getSelectionCells(),J.checked,K.checked)}));L.setAttribute("title","Convert Colors");L.className="geBtn gePrimaryBtn";D.appendChild(L);x.appendChild(D);D=D.cloneNode(!1);D.appendChild(K);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("background"));x.appendChild(D);D=D.cloneNode(!1);D.appendChild(J);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("labels"));x.appendChild(D);this.window=new mxWindow(mxResources.get("adaptiveColors"),x,g,l,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);-this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,g,l,d,q){function y(){N=!0;n.value=m;Q.isSelectionEmpty()?(z.setAttribute("disabled","disabled"),"selectionOnly"==n.value&&(n.value="includeCopyOfMyDiagram")):z.removeAttribute("disabled");b.isDiagramEmpty()?(t.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==n.value&&(n.value="help")):t.removeAttribute("disabled");-N=!1}function x(A,B,H){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==H?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,A);T.setAttribute("title",A);mxEvent.addListener(T,"click",B);return T}function D(A){var B=+this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,g,l,d,q){function y(){O=!0;n.value=m;Q.isSelectionEmpty()?(z.setAttribute("disabled","disabled"),"selectionOnly"==n.value&&(n.value="includeCopyOfMyDiagram")):z.removeAttribute("disabled");b.isDiagramEmpty()?(t.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==n.value&&(n.value="help")):t.removeAttribute("disabled");+O=!1}function x(A,B,H){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==H?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,A);T.setAttribute("title",A);mxEvent.addListener(T,"click",B);return T}function D(A){var B=document.createElement("div");B.style.display="block";B.style.position="relative";B.style.backgroundColor="#e0e0e0";B.style.borderRadius="4px";B.style.wordWrap="break-word";B.style.textAlign="left";B.style.padding="6px";B.style.margin="12px";B.style.left="0px";B.style.right="0px";mxUtils.write(B,A);e.appendChild(B);return B}function J(A){var B=A.indexOf("<mxGraphModel "),H=A.indexOf("</mxGraphModel>");0>B&&(B=A.indexOf("<mxGraphModel>"));if(0<=B&&H>B){var T=mxUtils,k=T.trim,v=A.substring(0,B),G=v.indexOf("```");-0<=G&&(v=v.substring(v,0,G+6));T=k.call(T,v);B=A.substring(B,H+15);k=mxUtils;v=k.trim;A=A.substring(H+15);H=A.lastIndexOf("```");0<=H&&(A=A.substring(H+3));return[T,B,v.call(k,A)]}return null}function K(A){var B=D(A);B.style.cursor="pointer";B.style.marginBottom="2px";B.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(B,"click",function(V){O.value=A;O.focus()});var H=D("");H.style.marginTop="2px";var T=b.currentPage,k=A,v=[],G=null;if("includeCopyOfMyDiagram"==n.value||"selectionOnly"==+0<=G&&(v=v.substring(v,0,G+6));T=k.call(T,v);B=A.substring(B,H+15);k=mxUtils;v=k.trim;A=A.substring(H+15);H=A.lastIndexOf("```");0<=H&&(A=A.substring(H+3));return[T,B,v.call(k,A)]}return null}function K(A){var B=D(A);B.style.cursor="pointer";B.style.marginBottom="2px";B.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(B,"click",function(V){P.value=A;P.focus()});var H=D("");H.style.marginTop="2px";var T=b.currentPage,k=A,v=[],G=null;if("includeCopyOfMyDiagram"==n.value||"selectionOnly"==n.value){var I=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==n.value&&(I.isObjectIgnored=function(V){return V.constructor==mxCell&&!Q.model.isRoot(V)&&!Q.model.isLayer(V)&&!Q.isCellSelected(V)&&!Q.isAncestorSelected(V)});G=I.encode(Q.getModel());I.document.appendChild(G);v.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(G)})}else"create"==n.value?(k=C.value.replace(/([A-Z])/g," $1").toLowerCase(),k="Write the declaration code for a "+(""!=k?k:"graph")+' that shows "'+(""!=A?A:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):v.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});v.push({role:"user",content:k});var M={model:Editor.gptModel,-messages:v},P=0;for(v=0;v<M.messages.length;v++)P+=M.messages[v].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");var V=document.createElement("img");V.setAttribute("title","Processing "+P+" tokens");V.setAttribute("src",IMAGE_PATH+"/spin.gif");V.style.marginLeft="6px";H.appendChild(V);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=+messages:v},N=0;for(v=0;v<M.messages.length;v++)N+=M.messages[v].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");var V=document.createElement("img");V.setAttribute("title","Processing "+N+" tokens");V.setAttribute("src",IMAGE_PATH+"/spin.gif");V.style.marginLeft="6px";H.appendChild(V);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=new mxXmlRequest(Editor.gptUrl,JSON.stringify(M),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();H.innerHTML="";mxUtils.write(H,ba.message);H.appendChild(x(mxResources.get("tryAgain"),S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=J(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ha=null;null!=G&&(fa=new mxCodec(G.ownerDocument),ha=new mxGraphModel,fa.decode(G,ha));fa=mxUtils.bind(this,function(pa){Q.model.beginUpdate();try{if(null!=ha&&null!=b.getPageIndex(T)){b.selectPage(T);var na=b.diffCells(ha.root,da.root);b.patchPage(T,na,null,!0)}else{var ia=da.getChildren(da.getChildAt(da.getRoot(),0));Q.setSelectionCells(Q.importCells(ia))}}finally{Q.model.endUpdate()}mxEvent.consume(pa)});aa=Q.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));H.innerHTML="";B=H;0<ea[0].length&&(mxUtils.write(B,ea[0]),mxUtils.br(B));B.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(x(mxResources.get("tryAgain"),S,"flex"));ca.appendChild(x(mxResources.get(null!=G?"apply":"insert"),fa,"flex"));H.appendChild(ca);0<ea[2].length&&(mxUtils.br(B),mxUtils.write(B,ea[2]));B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else H.innerHTML="",B=H,mxUtils.write(B,ba),H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var ea=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",M,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==n.value){var fa=b.extractMermaidDeclaration(ca);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ha){Y(ha)})),b.generateMermaidImage(fa,null,function(){},function(ha){mxMermaidToDrawio.resetListeners();Z(ha)})):(Y(ca),H.appendChild(x(mxResources.get("tryAgain"),S)))}else Y(ca)}else{var aa="Error: "+ba.getStatus();try{var da=JSON.parse(ba.getText());null!=da&&null!=da.error&&null!=da.error.message&&(aa=da.error.message)}catch(ha){}H.innerHTML="";mxUtils.write(H,aa);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ha){Z(ha)}}),Z)}),function(W){H.innerHTML="";mxUtils.write(H,W.message);H.appendChild(x(mxResources.get("tryAgain"),-S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function L(){""!=mxUtils.trim(O.value)&&(K(O.value),O.value="")}var Q=b.editor.graph,c=document.createElement("div");c.style.textAlign="center";c.style.overflow="hidden";c.style.height="100%";var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.top="0px";e.style.left="0px";e.style.right="0px";e.style.bottom="104px";c.appendChild(e);var f=document.createElement("div");f.style.position=+S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function L(){""!=mxUtils.trim(P.value)&&(K(P.value),P.value="")}var Q=b.editor.graph,c=document.createElement("div");c.style.textAlign="center";c.style.overflow="hidden";c.style.height="100%";var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.top="0px";e.style.left="0px";e.style.right="0px";e.style.bottom="104px";c.appendChild(e);var f=document.createElement("div");f.style.position="absolute";f.style.boxSizing="border-box";f.style.borderRadius="4px";f.style.border="1px solid lightgray";f.style.margin="8px 8px 16px 8px";f.style.padding="8px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.padding="6px";f.style.height="80px";var p=document.createElement("div");p.style.display="flex";p.style.gap="6px";p.style.marginBottom="6px";var n=document.createElement("select");n.style.textOverflow="ellipsis";n.style.flexGrow="1";n.style.padding="4px";n.style.minWidth="0";f.appendChild(p);var t=document.createElement("option");t.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));n.appendChild(t);var z=document.createElement("option");z.setAttribute("value","selectionOnly");mxUtils.write(z,mxResources.get("selectionOnly"));n.appendChild(z);p.appendChild(n);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var E=document.createElement("option");E.setAttribute("value","create");mxUtils.write(E,mxResources.get("create"));n.appendChild(E)}E=document.createElement("option");E.setAttribute("value","help");mxUtils.write(E,mxResources.get("help"));n.appendChild(E);E=document.createElement("option");E.setAttribute("value","reset");mxUtils.write(E,mxResources.get("reset"));n.appendChild(E);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(E=0;E<EditorUi.mermaidDiagramTypes.length;E++){var F=document.createElement("option"),-R=EditorUi.mermaidDiagramTypes[E],U=R;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));F.setAttribute("value",R);mxUtils.write(F,U);C.appendChild(F)}p.appendChild(C);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";var O=document.createElement("input");O.setAttribute("type","text");O.style.width="100%";O.style.outline="none";O.style.border="none";-O.style.background="transparent";O.style.padding="8px 26px 8px 8px";O.style.boxSizing="border-box";p.appendChild(O);E=document.createElement("img");E.setAttribute("src",Editor.sendImage);E.setAttribute("title",mxResources.get("sendMessage"));E.className="geAdaptiveAsset";E.style.position="relative";E.style.cursor="pointer";E.style.opacity="0.5";E.style.height="19px";E.style.left="-24px";E.style.top="5px";E.style.background="url('"+b.editor.transparentImage+"')";p.appendChild(E);f.appendChild(p);Q.isSelectionEmpty()?-b.isDiagramEmpty()?n.value="help":n.value="includeCopyOfMyDiagram":n.value="selectionOnly";var N=!1,m=n.value,u=function(){O.setAttribute("placeholder",mxResources.get("create"==n.value?"describeYourDiagram":"askMeAnything"));"create"==n.value?(n.style.width="",C.style.display=""):(n.style.width="100%",C.style.display="none")};u();mxEvent.addListener(n,"change",function(){N||("reset"==n.value?(n.value=m,e.innerHTML=""):m=n.value,u())});Q.selectionModel.addListener(mxEvent.CHANGE,y);Q.getModel().addListener(mxEvent.CHANGE,-y);y();mxEvent.addListener(E,"click",L);mxEvent.addListener(O,"keydown",function(A){13!=A.keyCode||mxEvent.isShiftDown(A)||L()});c.appendChild(f);this.window=new mxWindow(mxResources.get("chatWindowTitle"),c,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){Q.getModel().removeListener(y)}));this.window.addListener("show",-mxUtils.bind(this,function(){this.window.fit();O.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)x=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(J,K){if(y.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(Q){b.hideDialog();if(null!=Q&&0<Q.length){Q=+R=EditorUi.mermaidDiagramTypes[E],U=R;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));F.setAttribute("value",R);mxUtils.write(F,U);C.appendChild(F)}p.appendChild(C);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";var P=document.createElement("input");P.setAttribute("type","text");P.style.width="100%";P.style.outline="none";P.style.border="none";+P.style.background="transparent";P.style.padding="8px 26px 8px 8px";P.style.boxSizing="border-box";p.appendChild(P);E=document.createElement("img");E.setAttribute("src",Editor.sendImage);E.setAttribute("title",mxResources.get("sendMessage"));E.className="geAdaptiveAsset";E.style.position="relative";E.style.cursor="pointer";E.style.opacity="0.5";E.style.height="19px";E.style.left="-24px";E.style.top="5px";E.style.background="url('"+b.editor.transparentImage+"')";p.appendChild(E);f.appendChild(p);Q.isSelectionEmpty()?+b.isDiagramEmpty()?n.value="help":n.value="includeCopyOfMyDiagram":n.value="selectionOnly";var O=!1,m=n.value,u=function(){P.setAttribute("placeholder",mxResources.get("create"==n.value?"describeYourDiagram":"askMeAnything"));"create"==n.value?(n.style.width="",C.style.display=""):(n.style.width="100%",C.style.display="none")};u();mxEvent.addListener(n,"change",function(){O||("reset"==n.value?(n.value=m,e.innerHTML=""):m=n.value,u())});Q.selectionModel.addListener(mxEvent.CHANGE,y);Q.getModel().addListener(mxEvent.CHANGE,+y);y();mxEvent.addListener(E,"click",L);mxEvent.addListener(P,"keydown",function(A){13!=A.keyCode||mxEvent.isShiftDown(A)||L()});c.appendChild(f);this.window=new mxWindow(mxResources.get("chatWindowTitle"),c,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){Q.getModel().removeListener(y)}));this.window.addListener("show",+mxUtils.bind(this,function(){this.window.fit();P.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)x=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(J,K){if(y.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(Q){b.hideDialog();if(null!=Q&&0<Q.length){Q=Q.split(" ");for(var c=[],e=[],f=0;f<Q.length;f++){var p=mxUtils.trim(Q[f]);""!=p&&(e.push(p),0>mxUtils.indexOf(J,p)&&c.push(p))}y.isSelectionEmpty()?K(J.concat(c)):y.addTagsForCells(y.getSelectionCells(),e)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},x);x=D.div;this.window=new mxWindow(mxResources.get("tags"),x,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){D.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,g,l,d){var q=document.createElement("div");q.style.textAlign="center";var y=document.createElement("p");y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("authorizationRequired"));var x="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";g==b.drive?(x=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):g==b.dropbox?(x=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):g==b.oneDrive?(x=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(x=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(x=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg",D.style.width="32px"):g==b.trello&&(x=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[x]));var J=document.createElement("input");J.setAttribute("type","checkbox");x=mxUtils.button(mxResources.get("authorize"),function(){d(J.checked)});x.insertBefore(D,x.firstChild);x.style.marginTop="6px";x.className="geBigButton";x.style.fontSize="18px";x.style.padding="14px";q.appendChild(y);q.appendChild(b);q.appendChild(x);l&&(l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(J),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberMe")),l.appendChild(y),q.appendChild(l),J.checked=!0,J.defaultChecked=!0,mxEvent.addListener(y,"click",function(K){J.checked=!J.checked;mxEvent.consume(K)}));this.container=q},MoreShapesDialog=function(b,g,l){l=null!=l?l:b.sidebar.entries;var d=document.createElement("div"),q=[];if(null!=b.sidebar.customEntries)for(var y=0;y<b.sidebar.customEntries.length;y++){for(var x=b.sidebar.customEntries[y]||{},D={title:b.getResource(x.title),entries:[]},J=0;null!=x.entries&&J<x.entries.length;J++){var K=x.entries[J];D.entries.push({id:K.id,title:b.getResource(K.title),desc:b.getResource(K.desc),image:K.preview})}0<D.entries.length&&q.push(D)}for(y=0;y<l.length;y++)if(null==b.sidebar.enabledLibraries)q.push(l[y]);else{D={title:l[y].title,entries:[]};for(J=0;J<l[y].entries.length;J++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,-l[y].entries[J].id)&&D.entries.push(l[y].entries[J]);0<D.entries.length&&q.push(D)}l=q;if(g){y=mxUtils.bind(this,function(R){for(var U=0;U<R.length;U++)(function(O){var N=f.cloneNode(!1);N.style.fontWeight="bold";N.style.backgroundColor="light-dark(#e5e5e5, #505759)";N.style.padding="6px 0px 6px 20px";mxUtils.write(N,O.title);L.appendChild(N);for(var m=0;m<O.entries.length;m++)(function(u){var A=f.cloneNode(!1);A.style.cursor="pointer";A.style.padding="4px 0px 4px 20px";A.style.whiteSpace="nowrap";+l[y].entries[J].id)&&D.entries.push(l[y].entries[J]);0<D.entries.length&&q.push(D)}l=q;if(g){y=mxUtils.bind(this,function(R){for(var U=0;U<R.length;U++)(function(P){var O=f.cloneNode(!1);O.style.fontWeight="bold";O.style.backgroundColor="light-dark(#e5e5e5, #505759)";O.style.padding="6px 0px 6px 20px";mxUtils.write(O,P.title);L.appendChild(O);for(var m=0;m<P.entries.length;m++)(function(u){var A=f.cloneNode(!1);A.style.cursor="pointer";A.style.padding="4px 0px 4px 20px";A.style.whiteSpace="nowrap";A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.setAttribute("title",u.title+" ("+u.id+")");var B=document.createElement("input");B.setAttribute("type","checkbox");B.checked=b.sidebar.isEntryVisible(u.id);B.defaultChecked=B.checked;A.appendChild(B);mxUtils.write(A," "+u.title);L.appendChild(A);var H=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){Q.style.textAlign="center";Q.style.padding="0px";Q.style.color="";Q.innerText="";if(null!=u.desc){var k=document.createElement("pre");k.style.boxSizing="border-box";k.style.fontFamily="inherit";k.style.margin="20px";k.style.right="0px";k.style.textAlign="left";mxUtils.write(k,u.desc);Q.appendChild(k)}null!=u.imageCallback?u.imageCallback(Q):null!=u.image?(k=document.createElement("img"),k.setAttribute("border","0"),k.style.maxWidth="100%",k.setAttribute("src",u.image),Q.appendChild(k)):null==u.desc&&(Q.style.padding="20px",Q.style.color="rgb(179, 179, 179)",mxUtils.write(Q,mxResources.get("noPreview")));null!=c&&(c.style.backgroundColor=-"");c=A;c.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(A,"click",H);mxEvent.addListener(A,"dblclick",function(T){B.checked=!B.checked;mxEvent.consume(T)});e.push(function(){return B.checked?u.id:null});0==U&&0==m&&H()})(O.entries[m])})(R[U])});J=document.createElement("div");J.className="geDialogTitle";mxUtils.write(J,mxResources.get("shapes"));J.style.position="absolute";J.style.top="0px";J.style.left="0px";J.style.lineHeight="40px";J.style.height=+"");c=A;c.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(A,"click",H);mxEvent.addListener(A,"dblclick",function(T){B.checked=!B.checked;mxEvent.consume(T)});e.push(function(){return B.checked?u.id:null});0==U&&0==m&&H()})(P.entries[m])})(R[U])});J=document.createElement("div");J.className="geDialogTitle";mxUtils.write(J,mxResources.get("shapes"));J.style.position="absolute";J.style.top="0px";J.style.left="0px";J.style.lineHeight="40px";J.style.height="40px";J.style.right="0px";var L=document.createElement("div"),Q=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";Q.style.position="absolute";Q.style.left="202px";Q.style.right="0px";Q.style.top="40px";Q.style.bottom="60px";Q.style.overflow="auto";Q.style.borderLeftStyle="solid";Q.style.borderLeftWidth="1px";Q.style.textAlign="center";var c=null,e=[],f=document.createElement("div");f.style.position="relative";f.style.left="0px";f.style.right="0px";y(l);d.style.padding="30px";d.appendChild(J);d.appendChild(L);d.appendChild(Q);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.position="relative";p.style.top="1px";p.checked=b.sidebar.sidebarTitles;p.defaultChecked=p.checked;l.appendChild(p);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("labels"));y.style.paddingRight="20px";l.appendChild(y);mxEvent.addListener(y,"click",function(R){p.checked=!p.checked;mxEvent.consume(R)});var n=document.createElement("input");n.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)y=document.createElement("span"),y.style.paddingRight="20px",y.appendChild(n),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),-n.style.position="relative",n.style.top="1px",n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(y,"click",function(R){mxEvent.getSource(R)!=n&&(n.checked=!n.checked,mxEvent.consume(R))}),l.appendChild(y);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],U=0;U<e.length;U++){var O=e[U].apply(this,arguments);null!=O&&R.push(O)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&+n.style.position="relative",n.style.top="1px",n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(y,"click",function(R){mxEvent.getSource(R)!=n&&(n.checked=!n.checked,mxEvent.consume(R))}),l.appendChild(y);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],U=0;U<e.length;U++){var P=e[U].apply(this,arguments);null!=P&&R.push(P)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<R.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=U&&0<R.splice(U,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),n.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),n.checked,!0);b.setSidebarTitles(p.checked,n.checked)});J.className="geBtn gePrimaryBtn"}else{var t=document.createElement("table");-y=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";J=document.createElement("tr");t.style.width="100%";g=document.createElement("td");q=document.createElement("td");x=document.createElement("td");var z=mxUtils.bind(this,function(R,U,O){var N=document.createElement("input");N.type="checkbox";t.appendChild(N);N.checked=b.sidebar.isEntryVisible(O);var m=document.createElement("span");mxUtils.write(m,U);U=document.createElement("div");U.style.display="block";U.appendChild(N);-U.appendChild(m);mxEvent.addListener(m,"click",function(u){N.checked=!N.checked;mxEvent.consume(u)});R.appendChild(U);return function(){return N.checked?O:null}});J.appendChild(g);J.appendChild(q);J.appendChild(x);y.appendChild(J);t.appendChild(y);e=[];var E=0;for(y=0;y<l.length;y++)for(J=0;J<l[y].entries.length;J++)E++;var C=[g,q,x],F=0;for(y=0;y<l.length;y++)(function(R){for(var U=0;U<R.entries.length;U++){var O=R.entries[U];e.push(z(C[Math.floor(F/(E/3))],O.title,O.id));F++}})(l[y]);d.appendChild(t);+y=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";J=document.createElement("tr");t.style.width="100%";g=document.createElement("td");q=document.createElement("td");x=document.createElement("td");var z=mxUtils.bind(this,function(R,U,P){var O=document.createElement("input");O.type="checkbox";t.appendChild(O);O.checked=b.sidebar.isEntryVisible(P);var m=document.createElement("span");mxUtils.write(m,U);U=document.createElement("div");U.style.display="block";U.appendChild(O);+U.appendChild(m);mxEvent.addListener(m,"click",function(u){O.checked=!O.checked;mxEvent.consume(u)});R.appendChild(U);return function(){return O.checked?P:null}});J.appendChild(g);J.appendChild(q);J.appendChild(x);y.appendChild(J);t.appendChild(y);e=[];var E=0;for(y=0;y<l.length;y++)for(J=0;J<l[y].entries.length;J++)E++;var C=[g,q,x],F=0;for(y=0;y<l.length;y++)(function(R){for(var U=0;U<R.entries.length;U++){var P=R.entries[U];e.push(z(C[Math.floor(F/(E/3))],P.title,P.id));F++}})(l[y]);d.appendChild(t);l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,l.appendChild(n),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),l.appendChild(y),mxEvent.addListener(y,"click",function(R){n.checked=!n.checked;mxEvent.consume(R)}));d.appendChild(l);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});-y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],U=0;U<e.length;U++){var O=e[U].apply(this,arguments);null!=O&&R.push(O)}b.sidebar.showEntries(0<R.length?R.join(";"):"",n.checked);b.hideDialog()});J.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(y),l.appendChild(J)):(l.appendChild(J),l.appendChild(y));d.appendChild(l);this.container=d},PluginsDialog=function(b,+y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],U=0;U<e.length;U++){var P=e[U].apply(this,arguments);null!=P&&R.push(P)}b.sidebar.showEntries(0<R.length?R.join(";"):"",n.checked);b.hideDialog()});J.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(y),l.appendChild(J)):(l.appendChild(J),l.appendChild(y));d.appendChild(l);this.container=d},PluginsDialog=function(b,g,l,d){function q(){J=!0;if(0==D.length)x.innerText=mxResources.get("noPlugins");else{x.innerText="";for(var e=0;e<D.length;e++){var f=document.createElement("span");f.style.display="flex";f.style.alignItems="center";f.style.whiteSpace="nowrap";var p=document.createElement("img");p.src=Editor.trashImage;p.style.position="relative";p.style.cursor="pointer";p.style.marginRight="4px";p.style.display="inline-block";p.style.width="18px";p.setAttribute("title",mxResources.get("delete"));f.appendChild(p);mxUtils.write(f,D[e]);x.appendChild(f);mxUtils.br(x);mxEvent.addListener(p,"click",function(n){return function(){b.confirm(mxResources.get("delete")+' "'+D[n]+'"?',function(){null!=l&&l(D[n]);D.splice(n,1);q()})}}(e))}}}var y=document.createElement("div"),x=document.createElement("div");x.style.height="180px";x.style.overflow="auto";var D=mxSettings.getPlugins().slice(),J=!1;y.appendChild(x);q();J=!1;var K=mxUtils.button(mxResources.get("add"),null!=g?function(){g(function(e){e&&0>mxUtils.indexOf(D,e)&&D.push(e);q()})}:function(){var e=document.createElement("div"),f=document.createElement("span");f.style.marginTop="6px";mxUtils.write(f,mxResources.get("builtinPlugins")+": ");e.appendChild(f);var p=document.createElement("select");p.style.width="150px";for(f=0;f<App.publicPlugin.length;f++){var n=document.createElement("option");mxUtils.write(n,App.publicPlugin[f]);n.value=App.publicPlugin[f];p.appendChild(n)}e.appendChild(p);mxUtils.br(e);mxUtils.br(e);f=mxUtils.button(mxResources.get("custom")+"...",function(){var t=new FilenameDialog(b,"",mxResources.get("add"),function(z){b.hideDialog();if(null!=z&&0<z.length){z=z.split(";");for(var E=0;E<z.length;E++){var C=z[E],F=App.pluginRegistry[C];null!=F&&(C=F);0<C.length&&0>mxUtils.indexOf(D,C)&&D.push(C)}q()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(t.container,300,80,!0,!0);t.init()});f.className="geBtn";ALLOW_CUSTOM_PLUGINS||(f.style.display="none");e=new CustomDialog(b,e,mxUtils.bind(this,function(){var t=App.pluginRegistry[p.value];0>mxUtils.indexOf(D,t)&&(D.push(t),q())}),null,null,null,f);b.showDialog(e.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var Q=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){J?(mxSettings.setPlugins(D),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});Q.className="geBtn gePrimaryBtn";var c=document.createElement("div");-c.style.marginTop="14px";c.style.textAlign="right";b.isOffline()||c.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||c.appendChild(L),c.appendChild(K),c.appendChild(Q)):(c.appendChild(K),c.appendChild(Q),d||c.appendChild(L));y.appendChild(c);this.container=y},CropImageDialog=function(b,g,l,d){function q(){var R=n.checked,U=t.checked,O=e.geometry,N=J.width,m=J.height,u=(300-N)/2,A=(300-m)/2;O.x<u?(O.width-=u-O.x,O.x=u):O.x+O.width>u+N&&(O.width=u+N-O.x,-O.x=Math.min(O.x,u+N));O.y<A?(O.height-=A-O.y,O.y=A):O.y+O.height>A+m&&(O.height=A+m-O.y,O.y=Math.min(O.y,A+m));var B=(O.x-u)/N*100;N=100-(O.x+O.width-u)/N*100;u=(O.y-A)/m*100;O=100-(O.y+O.height-A)/m*100;return"inset("+mxUtils.format(u)+"% "+mxUtils.format(N)+"% "+mxUtils.format(O)+"% "+mxUtils.format(B)+"%"+(R?" round "+c+"%":U?" round 50%":"")+")"}function y(R){null!=L&&(!0!==R&&(L.model.setGeometry(e,Q.clone()),c=5,E.value=c),L.model.setStyle(e,f+q()),L.selectAll(),z.style.visibility=n.checked?+c.style.marginTop="14px";c.style.textAlign="right";b.isOffline()||c.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||c.appendChild(L),c.appendChild(K),c.appendChild(Q)):(c.appendChild(K),c.appendChild(Q),d||c.appendChild(L));y.appendChild(c);this.container=y},CropImageDialog=function(b,g,l,d){function q(){var R=n.checked,U=t.checked,P=e.geometry,O=J.width,m=J.height,u=(300-O)/2,A=(300-m)/2;P.x<u?(P.width-=u-P.x,P.x=u):P.x+P.width>u+O&&(P.width=u+O-P.x,+P.x=Math.min(P.x,u+O));P.y<A?(P.height-=A-P.y,P.y=A):P.y+P.height>A+m&&(P.height=A+m-P.y,P.y=Math.min(P.y,A+m));var B=(P.x-u)/O*100;O=100-(P.x+P.width-u)/O*100;u=(P.y-A)/m*100;P=100-(P.y+P.height-A)/m*100;return"inset("+mxUtils.format(u)+"% "+mxUtils.format(O)+"% "+mxUtils.format(P)+"% "+mxUtils.format(B)+"%"+(R?" round "+c+"%":U?" round 50%":"")+")"}function y(R){null!=L&&(!0!==R&&(L.model.setGeometry(e,Q.clone()),c=5,E.value=c),L.model.setStyle(e,f+q()),L.selectAll(),z.style.visibility=n.checked?"visible":"hidden")}var x=document.createElement("div"),D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var J=document.createElement("img");J.onload=function(){function R(){L.model.setStyle(e,f+q())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);-L.graphHandler.allowLivePreview=!1;var U=L.createVertexHandler;L.createVertexHandler=function(){var P=U.apply(this,arguments);P.livePreview=!1;return P};if(null!=l)try{if("inset"==l.substring(0,5)){var O=e.geometry,N=J.width,m=J.height,u=(300-N)/2,A=(300-m)/2,B=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),H=parseFloat(B[0]),T=parseFloat(B[1]),k=parseFloat(B[2]),v=parseFloat(B[3]);isFinite(H)&&isFinite(T)&&isFinite(k)&&isFinite(v)?(O.x=v/100*N+u,O.y=H/100*m+A,O.width=(100-T)/100*N+u-O.x,O.height=(100--k)/100*m+A-O.y,"round"==B[4]?"50%"==B[5]?t.setAttribute("checked","checked"):(c=parseInt(B[5]),E.value=c,n.setAttribute("checked","checked"),z.style.visibility="visible"):p.setAttribute("checked","checked")):l=null}else l=null}catch(P){}e.style=f+(l?l:q());e.vertex=!0;L.addCell(e,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,R);L.addListener(mxEvent.CELLS_RESIZED,R);var G=L.graphHandler.mouseUp,I=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){G.apply(this,arguments);+L.graphHandler.allowLivePreview=!1;var U=L.createVertexHandler;L.createVertexHandler=function(){var N=U.apply(this,arguments);N.livePreview=!1;return N};if(null!=l)try{if("inset"==l.substring(0,5)){var P=e.geometry,O=J.width,m=J.height,u=(300-O)/2,A=(300-m)/2,B=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),H=parseFloat(B[0]),T=parseFloat(B[1]),k=parseFloat(B[2]),v=parseFloat(B[3]);isFinite(H)&&isFinite(T)&&isFinite(k)&&isFinite(v)?(P.x=v/100*O+u,P.y=H/100*m+A,P.width=(100-T)/100*O+u-P.x,P.height=(100-+k)/100*m+A-P.y,"round"==B[4]?"50%"==B[5]?t.setAttribute("checked","checked"):(c=parseInt(B[5]),E.value=c,n.setAttribute("checked","checked"),z.style.visibility="visible"):p.setAttribute("checked","checked")):l=null}else l=null}catch(N){}e.style=f+(l?l:q());e.vertex=!0;L.addCell(e,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,R);L.addListener(mxEvent.CELLS_RESIZED,R);var G=L.graphHandler.mouseUp,I=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){G.apply(this,arguments);K.style.backgroundColor="#fff9"};L.graphHandler.mouseDown=function(){I.apply(this,arguments);K.style.backgroundColor=""};L.dblClick=function(){};var M=L.getSelectionModel().changeSelection;L.getSelectionModel().changeSelection=function(){M.call(this,[e],[e])}};J.onerror=function(){J.onload=null;J.src=Editor.errorImage};J.setAttribute("src",g);J.style.maxWidth="300px";J.style.maxHeight="300px";D.appendChild(J);x.appendChild(D);var K=document.createElement("div");K.style.width="300px";K.style.height="300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";x.appendChild(K);var L=null,Q=new mxGeometry(100,100,100,100),c=5,e=new mxCell("",Q.clone(),""),f="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+g.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";x.appendChild(p);g=document.createElement("label");g.setAttribute("for","croppingRect");mxUtils.write(g,mxResources.get("rectangle"));x.appendChild(g);var n=document.createElement("input");n.setAttribute("type","radio");n.setAttribute("id","croppingRounded");n.setAttribute("name","croppingShape");n.style.margin="5px";x.appendChild(n);g=document.createElement("label");g.setAttribute("for","croppingRounded");mxUtils.write(g,mxResources.get("rounded"));x.appendChild(g);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id",@@ -12615,30 +12615,30 @@ x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");Kt.setAttribute("type","text");t.style.width="100px";t.value=1==g.length?mxUtils.getValue(l.getCellStyle(g[0]),mxConstants.STYLE_ROTATION,0):"";K.appendChild(t);D.appendChild(J);D.appendChild(K);x.appendChild(D);y.appendChild(x);q.appendChild(y);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var z=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var E=0;E<g.length;E++){var C=l.getCellGeometry(g[E]);null!=C&&(C=C.clone(),l.isCellMovable(g[E])&&(C.relative=L.checked,0<mxUtils.trim(Q.value).length&&(C.x=Number(Q.value)),0<mxUtils.trim(c.value).length&&(C.y=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(e.value)),0<mxUtils.trim(f.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(f.value))),l.isCellResizable(g[E])&&(0<mxUtils.trim(p.value).length&&(C.width=Number(p.value)),0<mxUtils.trim(n.value).length&&(C.height=Number(n.value))),l.getModel().setGeometry(g[E],C));0<mxUtils.trim(t.value).length&&l.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[g[E]])}}finally{l.getModel().endUpdate()}});z.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",function(E){13==E.keyCode&&z.click()});y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign="right";b.editor.cancelFirst?(y.appendChild(d),y.appendChild(z)):(y.appendChild(z),y.appendChild(d));q.appendChild(y);this.container=q},LibraryDialog=function(b,-g,l,d,q,y,x){function D(O){for(O=document.elementFromPoint(O.clientX,O.clientY);null!=O&&O.parentNode!=f;)O=O.parentNode;var N=null;if(null!=O){var m=f.firstChild;for(N=0;null!=m&&m!=O;)m=m.nextSibling,N++}return N}function J(O,N,m,u,A,B,H,T,k){try{if(b.spinner.stop(),null==N||"image/"==N.substring(0,6))if(null==O&&null!=H||null==n[O]){var v=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?-Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};f.style.backgroundImage="";p.style.display="none";var G=A,I=B;if(A>b.maxImageSize||B>b.maxImageSize){var M=Math.min(1,Math.min(b.maxImageSize/Math.max(1,A)),b.maxImageSize/Math.max(1,B));A*=M;B*=M}G>I?(I=Math.round(100*I/G),G=100):(G=Math.round(100*G/I),I=100);var P=document.createElement("div");P.setAttribute("draggable","true");P.style.display="inline-block";P.style.position="relative";P.style.padding=-"0 12px";P.style.cursor="move";mxUtils.setPrefixedStyle(P.style,"transition","transform .1s ease-in-out");if(null!=O){var S=document.createElement("img");S.setAttribute("src",C.convert(O));S.style.width=G+"px";S.style.height=I+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-I)/2)+"px";S.style.paddingLeft=Math.floor((100-G)/2)+"px";P.appendChild(S)}else if(null!=H){var V=b.stringToCells("<"==H.xml.charAt(0)?H.xml:Graph.decompress(H.xml));0<V.length&&(b.sidebar.createThumb(V,100,100,-P,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),P.firstChild.style.display="inline-block",P.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});-(function(fa,aa,da){mxEvent.addListener(W,"click",function(ha){n[aa]=null;for(var pa=0;pa<Q.length;pa++)if(null!=Q[pa].data&&Q[pa].data==aa||null!=Q[pa].xml&&null!=da&&Q[pa].xml==da.xml){Q.splice(pa,1);break}P.parentNode.removeChild(fa);0==Q.length&&(f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(W,"dblclick",function(ha){mxEvent.consume(ha)})})(P,O,H);P.appendChild(W);P.style.marginBottom="30px";var X=document.createElement("div");-X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=O?(Z={data:O,w:A,h:B,title:k},null!=T&&(Z.aspect=T),n[O]=S,Q.push(Z)):null!=H&&(H.aspect="fixed",Q.push(H),Z=H);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=E&&(E(),E=null,mxEvent.consume(fa))});-v();P.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});V=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,v())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=-E&&(E(),E=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);E=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);v()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(P,"dblclick",-V);f.appendChild(P);mxEvent.addListener(P,"dragstart",function(fa){null==E&&(null==O&&null!=H&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=H.xml&&fa.dataTransfer.setData("Text",H.xml),t=D(fa),mxClient.IS_GC&&(P.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(P,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(P,"dragend",function(fa){"hidden"==W.style.visibility&&-(W.style.visibility="",X.style.visibility="");t=null;mxUtils.setOpacity(P,100);mxUtils.setPrefixedStyle(P.style,"transform",null)})}else F||(F=!0,b.handleError({message:mxResources.get("fileExists")}));else{A=!1;try{if(G=mxUtils.parseXml(O),"mxlibrary"==G.documentElement.nodeName){I=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=I&&0<I.length)for(var Y=0;Y<I.length;Y++)null!=I[Y].xml?J(null,null,0,0,0,0,I[Y]):J(I[Y].data,null,0,0,I[Y].w,I[Y].h,null,"fixed",I[Y].title);A=!0}else if("mxfile"==+g,l,d,q,y,x){function D(P){for(P=document.elementFromPoint(P.clientX,P.clientY);null!=P&&P.parentNode!=f;)P=P.parentNode;var O=null;if(null!=P){var m=f.firstChild;for(O=0;null!=m&&m!=P;)m=m.nextSibling,O++}return O}function J(P,O,m,u,A,B,H,T,k){try{if(b.spinner.stop(),null==O||"image/"==O.substring(0,6))if(null==P&&null!=H||null==n[P]){var v=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?+Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};f.style.backgroundImage="";p.style.display="none";var G=A,I=B;if(A>b.maxImageSize||B>b.maxImageSize){var M=Math.min(1,Math.min(b.maxImageSize/Math.max(1,A)),b.maxImageSize/Math.max(1,B));A*=M;B*=M}G>I?(I=Math.round(100*I/G),G=100):(G=Math.round(100*G/I),I=100);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display="inline-block";N.style.position="relative";N.style.padding=+"0 12px";N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=P){var S=document.createElement("img");S.setAttribute("src",C.convert(P));S.style.width=G+"px";S.style.height=I+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-I)/2)+"px";S.style.paddingLeft=Math.floor((100-G)/2)+"px";N.appendChild(S)}else if(null!=H){var V=b.stringToCells("<"==H.xml.charAt(0)?H.xml:Graph.decompress(H.xml));0<V.length&&(b.sidebar.createThumb(V,100,100,+N,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),N.firstChild.style.display="inline-block",N.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});+(function(fa,aa,da){mxEvent.addListener(W,"click",function(ha){n[aa]=null;for(var pa=0;pa<Q.length;pa++)if(null!=Q[pa].data&&Q[pa].data==aa||null!=Q[pa].xml&&null!=da&&Q[pa].xml==da.xml){Q.splice(pa,1);break}N.parentNode.removeChild(fa);0==Q.length&&(f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(W,"dblclick",function(ha){mxEvent.consume(ha)})})(N,P,H);N.appendChild(W);N.style.marginBottom="30px";var X=document.createElement("div");+X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=P?(Z={data:P,w:A,h:B,title:k},null!=T&&(Z.aspect=T),n[P]=S,Q.push(Z)):null!=H&&(H.aspect="fixed",Q.push(H),Z=H);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=E&&(E(),E=null,mxEvent.consume(fa))});+v();N.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});V=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,v())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=+E&&(E(),E=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);E=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);v()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(N,"dblclick",+V);f.appendChild(N);mxEvent.addListener(N,"dragstart",function(fa){null==E&&(null==P&&null!=H&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=H.xml&&fa.dataTransfer.setData("Text",H.xml),t=D(fa),mxClient.IS_GC&&(N.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(N,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(N,"dragend",function(fa){"hidden"==W.style.visibility&&+(W.style.visibility="",X.style.visibility="");t=null;mxUtils.setOpacity(N,100);mxUtils.setPrefixedStyle(N.style,"transform",null)})}else F||(F=!0,b.handleError({message:mxResources.get("fileExists")}));else{A=!1;try{if(G=mxUtils.parseXml(P),"mxlibrary"==G.documentElement.nodeName){I=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=I&&0<I.length)for(var Y=0;Y<I.length;Y++)null!=I[Y].xml?J(null,null,0,0,0,0,I[Y]):J(I[Y].data,null,0,0,I[Y].w,I[Y].h,null,"fixed",I[Y].title);A=!0}else if("mxfile"==G.documentElement.nodeName){var ba=G.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);V=b.stringToCells(ea);if(0<V.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(V);null!=ca&&J(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}A=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}A||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&-console.log("Error in library dialog: "+fa)}return null}function K(O){O.dataTransfer.dropEffect=null!=t?"move":"copy";O.stopPropagation();O.preventDefault()}function L(O){O.stopPropagation();O.preventDefault();F=!1;z=D(O);if(null!=t)null!=z&&z<f.children.length?(Q.splice(z>t?z-1:z,0,Q.splice(t,1)[0]),f.insertBefore(f.children[t],f.children[z])):(Q.push(Q.splice(t,1)[0]),f.appendChild(f.children[t]));else if(0<O.dataTransfer.files.length)b.importFiles(O.dataTransfer.files,0,0,b.maxImageSize,R(O));-else if(0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")){var N=decodeURIComponent(O.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(N)||/(\.png)($|\?)/i.test(N)||/(\.gif)($|\?)/i.test(N)||/(\.svg)($|\?)/i.test(N))&&b.loadImage(N,function(m){J(N,null,0,0,m.width,m.height);f.scrollTop=f.scrollHeight})}O.stopPropagation();O.preventDefault()}var Q=[];l=document.createElement("div");l.style.height="100%";var c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.height=+console.log("Error in library dialog: "+fa)}return null}function K(P){P.dataTransfer.dropEffect=null!=t?"move":"copy";P.stopPropagation();P.preventDefault()}function L(P){P.stopPropagation();P.preventDefault();F=!1;z=D(P);if(null!=t)null!=z&&z<f.children.length?(Q.splice(z>t?z-1:z,0,Q.splice(t,1)[0]),f.insertBefore(f.children[t],f.children[z])):(Q.push(Q.splice(t,1)[0]),f.appendChild(f.children[t]));else if(0<P.dataTransfer.files.length)b.importFiles(P.dataTransfer.files,0,0,b.maxImageSize,R(P));+else if(0<=mxUtils.indexOf(P.dataTransfer.types,"text/uri-list")){var O=decodeURIComponent(P.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(O)||/(\.png)($|\?)/i.test(O)||/(\.gif)($|\?)/i.test(O)||/(\.svg)($|\?)/i.test(O))&&b.loadImage(O,function(m){J(O,null,0,0,m.width,m.height);f.scrollTop=f.scrollHeight})}P.stopPropagation();P.preventDefault()}var Q=[];l=document.createElement("div");l.style.height="100%";var c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.height="40px";l.appendChild(c);mxUtils.write(c,mxResources.get("filename")+":");null==g&&(g=b.defaultLibraryName+".xml");var e=document.createElement("input");e.setAttribute("value",g);e.style.marginRight="20px";e.style.marginLeft="10px";e.style.width="500px";null==q||q.isRenamable()||e.setAttribute("disabled","true");this.init=function(){if(null==q||q.isRenamable())e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};c.appendChild(e);Editor.enableUncompressedLibraries&&(e.style.width="420px",g=document.createElement("input"),g.setAttribute("type","checkbox"),g.style.marginRight="10px",c.appendChild(g),mxUtils.write(c,mxResources.get("compressed")));var f=document.createElement("div");f.style.borderWidth="1px 0px 1px 0px";f.style.borderColor="#d3d3d3";f.style.borderStyle="solid";f.style.marginTop="6px";f.style.overflow="auto";f.style.height="340px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";0==Q.length&&Graph.fileSupport&&(f.style.backgroundImage=-"url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));l.appendChild(p);var n={},t=null,z=null,E=null;c=function(O){"true"!=mxEvent.getSource(O).getAttribute("contentEditable")&&null!=E&&(E(),E=null,mxEvent.consume(O))};mxEvent.addListener(f,"mousedown",c);mxEvent.addListener(f,"pointerdown",-c);mxEvent.addListener(f,"touchstart",c);var C=new mxUrlConverter,F=!1;if(null!=d)for(c=0;c<d.length;c++)g=d[c],J(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(f,"dragleave",function(O){p.style.cursor="";for(var N=mxEvent.getSource(O);null!=N;){if(N==f||N==p){O.stopPropagation();O.preventDefault();break}N=N.parentNode}});var R=function(O){return function(N,m,u,A,B,H,T,k,v){null!=v&&EditorUi.isVisioFilename(v.name)?b.importVisio(v,mxUtils.bind(this,function(G){J(G,m,u,A,B,H,T,"fixed",-mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(N,v.name)?b.isExternalDataComms()?b.parseFile(v,mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(J(G.responseText,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):-(J(N,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight)}};mxEvent.addListener(f,"dragover",K);mxEvent.addListener(f,"drop",L);mxEvent.addListener(p,"dragover",K);mxEvent.addListener(p,"drop",L);l.appendChild(f);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";b.editor.cancelFirst&&-d.appendChild(c);"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(q,function(O){if(null!=O){var N=b.getSearch("create title mode url drive splash state clibs ui".split(" "));N+=(0==N.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(O);O=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+N,null,null,null,null,"Check out the library I made using @drawio");-b.showDialog(O.container,450,240,!0);O.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(q.getId(),q)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),function(){var O=b.createLibraryDataFromImages(Q),-N=e.value;/(\.xml)$/i.test(N)||(N+=".xml");b.isLocalFileSave()?b.saveLocalFile(O,N,"text/xml",null,null,null!=x?x:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(N)+"&format=xml&xml="+encodeURIComponent(O))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,-"change",function(O){F=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(N,m,u,A,B,H,T,k,v){null!=U.files&&(R(O)(N,m,u,A,B,H,T,k,v),U.type="",U.type="file",U.value="")});f.scrollTop=f.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}g=mxUtils.button(mxResources.get("import"),function(){null!=E&&(E(),E=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=mxUtils.button(mxResources.get("addImages"),-function(){null!=E&&(E(),E=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(O,N,m){F=!1;if(null!=O){if("data:image/"==O.substring(0,11)){var u=O.indexOf(",");0<u&&(O=O.substring(0,u)+";base64,"+O.substring(u+1))}J(O,null,0,0,N,m);f.scrollTop=f.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";d.appendChild(g);this.saveBtnClickHandler=function(O,N,m,u){b.saveLibrary(O,N,m,u)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=E&&+"url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));l.appendChild(p);var n={},t=null,z=null,E=null;c=function(P){"true"!=mxEvent.getSource(P).getAttribute("contentEditable")&&null!=E&&(E(),E=null,mxEvent.consume(P))};mxEvent.addListener(f,"mousedown",c);mxEvent.addListener(f,"pointerdown",+c);mxEvent.addListener(f,"touchstart",c);var C=new mxUrlConverter,F=!1;if(null!=d)for(c=0;c<d.length;c++)g=d[c],J(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(f,"dragleave",function(P){p.style.cursor="";for(var O=mxEvent.getSource(P);null!=O;){if(O==f||O==p){P.stopPropagation();P.preventDefault();break}O=O.parentNode}});var R=function(P){return function(O,m,u,A,B,H,T,k,v){null!=v&&EditorUi.isVisioFilename(v.name)?b.importVisio(v,mxUtils.bind(this,function(G){J(G,m,u,A,B,H,T,"fixed",+mxEvent.isAltDown(P)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(O,v.name)?b.isExternalDataComms()?b.parseFile(v,mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(J(G.responseText,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(P)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):+(J(O,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(P)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight)}};mxEvent.addListener(f,"dragover",K);mxEvent.addListener(f,"drop",L);mxEvent.addListener(p,"dragover",K);mxEvent.addListener(p,"drop",L);l.appendChild(f);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";b.editor.cancelFirst&&+d.appendChild(c);"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(q,function(P){if(null!=P){var O=b.getSearch("create title mode url drive splash state clibs ui".split(" "));O+=(0==O.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(P);P=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+O,null,null,null,null,"Check out the library I made using @drawio");+b.showDialog(P.container,450,240,!0);P.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(q.getId(),q)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),function(){var P=b.createLibraryDataFromImages(Q),+O=e.value;/(\.xml)$/i.test(O)||(O+=".xml");b.isLocalFileSave()?b.saveLocalFile(P,O,"text/xml",null,null,null!=x?x:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(O)+"&format=xml&xml="+encodeURIComponent(P))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,+"change",function(P){F=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(O,m,u,A,B,H,T,k,v){null!=U.files&&(R(P)(O,m,u,A,B,H,T,k,v),U.type="",U.type="file",U.value="")});f.scrollTop=f.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}g=mxUtils.button(mxResources.get("import"),function(){null!=E&&(E(),E=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=mxUtils.button(mxResources.get("addImages"),+function(){null!=E&&(E(),E=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(P,O,m){F=!1;if(null!=P){if("data:image/"==P.substring(0,11)){var u=P.indexOf(",");0<u&&(P=P.substring(0,u)+";base64,"+P.substring(u+1))}J(P,null,0,0,O,m);f.scrollTop=f.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";d.appendChild(g);this.saveBtnClickHandler=function(P,O,m,u){b.saveLibrary(P,O,m,u)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=E&&(E(),E=null);this.saveBtnClickHandler(e.value,Q,q,y)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(c);l.appendChild(d);this.container=l},EditShapeDialog=function(b,g,l,d,q){d=null!=d?d:300;q=null!=q?q:120;var y=document.createElement("table"),x=document.createElement("tbody");y.style.cellPadding="4px";var D=document.createElement("tr");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";mxUtils.write(J,l);D.appendChild(J);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");var K=document.createElement("textarea");K.style.outline="none";K.style.resize="none";K.style.width=d-200+"px";K.style.height=q+"px";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};J.appendChild(K);D.appendChild(J);J=document.createElement("td");l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.top="6px";l.style.width="200px";l.style.height=q+4+"px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);J.appendChild(l);var L=new Graph(l);L.setEnabled(!1);var Q=b.editor.graph.cloneCell(g);L.addCells([Q]);l=L.view.getState(Q);var c="";null!=l.shape&&null!=l.shape.stencil&&(c=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(K,c||"");l=L.getGraphBounds();q=Math.min(160/l.width,(q-40)/l.height);L.view.scaleAndTranslate(q,20/q-l.x,20/q-l.y);D.appendChild(J);x.appendChild(D);D=document.createElement("tr");@@ -12659,7 +12659,7 @@ f.style.width="250px";f.className="dlg_fontName_g";K=document.createElement("td"null,"Font Name")+":");J.appendChild(K);var n=document.createElement("input");"w"==d&&(Editor.enableWebFonts?n.setAttribute("value",g):c.setAttribute("value",g));n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_w";K=document.createElement("td");K.appendChild(n);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontUrl",null,"Font URL")+":");J.appendChild(K);var t=document.createElement("input");t.setAttribute("value",l||"");t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontUrl";K=document.createElement("td");K.appendChild(t);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);this.init=function(){var E=c;"g"==d?E=f:"w"==d&&Editor.enableWebFonts&&(E=n);E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)};J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||K.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();q()});g.className="geBtn";b.editor.cancelFirst&&K.appendChild(g);var z=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var E=c.value;var C="s"}else if(e.checked){E=-f.value;var F=Editor.GOOGLE_FONTS+encodeURIComponent(E).replace(/%20/g,"+");C="g"}else p.checked&&(E=n.value,F=t.value,C="w");var R=E;var U=F,O=C,N=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,m=x.querySelector(".dlg_fontName_"+O);null==m||null!=R&&0!=R.length?(m=x.querySelector(".dlg_fontUrl"),null==m||"w"!=O||N.test(U)?R=!0:(m.style.border="1px solid red",R=!1)):(m.style.border="1px solid red",R=!1);R&&(q(E,F,C),b.hideDialog())});z.className="geBtn gePrimaryBtn";+f.value;var F=Editor.GOOGLE_FONTS+encodeURIComponent(E).replace(/%20/g,"+");C="g"}else p.checked&&(E=n.value,F=t.value,C="w");var R=E;var U=F,P=C,O=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,m=x.querySelector(".dlg_fontName_"+P);null==m||null!=R&&0!=R.length?(m=x.querySelector(".dlg_fontUrl"),null==m||"w"!=P||O.test(U)?R=!0:(m.style.border="1px solid red",R=!1)):(m.style.border="1px solid red",R=!1);R&&(q(E,F,C),b.hideDialog())});z.className="geBtn gePrimaryBtn";mxEvent.addListener(c,"keypress",y);mxEvent.addListener(f,"keypress",y);mxEvent.addListener(n,"keypress",y);mxEvent.addListener(t,"keypress",y);mxEvent.addListener(c,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(f,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(n,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});K.appendChild(z);b.editor.cancelFirst||K.appendChild(g);J.appendChild(K);D.appendChild(J);x.appendChild(D);this.container=x};function AspectDialog(b,g,l,d,q){this.aspect={pageId:g||(b.pages?b.pages[0].getId():null),layerIds:l||[]};g=document.createElement("div");var y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("pages"));g.appendChild(y);l=document.createElement("div");l.className="geAspectDlgList";g.appendChild(l);y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("layers"));g.appendChild(y);y=document.createElement("div");y.className="geAspectDlgList";@@ -12671,7 +12671,7 @@ AspectDialog.prototype.createPageItem=function(b,g,l){var d=document.createElemethis.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var y=q.model;y=y.getChildCells(y.getRoot());for(var x=0;x<y.length;x++)this.createLayerItem(y[x],b,q,l)});mxEvent.addListener(d,"click",g);this.aspect.pageId==b&&g()};AspectDialog.prototype.createLayerItem=function(b,g,l,d){g=l.convertValueToString(b)||mxResources.get("background")||"Background";var q=document.createElement("div");q.setAttribute("data-layer-id",b.id);q.className="geAspectDlgListItem";q.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(g)+"</div>";this.layersContainer.appendChild(q);this.createViewer(q.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=q.className.indexOf("geAspectDlgListItemSelected")?(q.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(q.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(q,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};-var FilePropertiesDialog=function(b,g){function l(C){var F=K;K=function(R,U){try{C(function(){F(R,U)},U)}catch(O){U(O)}}}var d=document.createElement("table"),q=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var y=b.getCurrentFile(),x=null!=y&&null!=y.getTitle()?y.getTitle():b.defaultFilename,D=/(\.png)$/i.test(x),J=/(\.svg)$/i.test(x),K=function(C,F){C()},L=null!=y?y.isLocked():!1;var Q=document.createElement("tr");var c=document.createElement("td");+var FilePropertiesDialog=function(b,g){function l(C){var F=K;K=function(R,U){try{C(function(){F(R,U)},U)}catch(P){U(P)}}}var d=document.createElement("table"),q=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var y=b.getCurrentFile(),x=null!=y&&null!=y.getTitle()?y.getTitle():b.defaultFilename,D=/(\.png)$/i.test(x),J=/(\.svg)$/i.test(x),K=function(C,F){C()},L=null!=y?y.isLocked():!1;var Q=document.createElement("tr");var c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("locked")+":");Q.appendChild(c);var e=document.createElement("input");e.setAttribute("type","checkbox");L&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(e);Q.appendChild(c);q.appendChild(Q);this.init=function(){e.focus()};l(function(C,F){null!=b.fileNode&&L!=e.checked?window.setTimeout(function(){null!=y&&y.setLocked(e.checked);C()},0):C()});if(D||J){x=1;D=0;Q=b.fileNode;null!=Q&&(Q.hasAttribute("scale")&&(x=parseFloat(Q.getAttribute("scale"))),Q.hasAttribute("border")&&(D=parseInt(Q.getAttribute("border"))));Q=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("zoom")+":");Q.appendChild(c);var f=document.createElement("input");f.setAttribute("value",100*x+"%");f.style.marginLeft="4px";f.style.width="100%";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(f);Q.appendChild(c);q.appendChild(Q);Q=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("borderWidth")+":");Q.appendChild(c);var p=document.createElement("input");p.setAttribute("value",D);p.style.marginLeft="4px";p.style.width="100%";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(p);Q.appendChild(c);q.appendChild(Q);@@ -12685,8 +12685,8 @@ x.style.textOverflow="ellipsis",x.style.display="block",x.style.margin="2px 0px"10pt",mxUtils.write(c,mxResources.get("pathFilename")+":"),Q.appendChild(c),x=document.createElement("input"),x.setAttribute("title",y.fileObject.path),x.setAttribute("value",y.fileObject.path),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",c=document.createElement("td"),c.appendChild(x),Q.appendChild(c),q.appendChild(Q));this.init=null!=this.init?this.init:function(){};x=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&K(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});x.className="geBtn gePrimaryBtn";Q=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&c.appendChild(D);c.appendChild(x);b.editor.cancelFirst||c.appendChild(D);Q.appendChild(c);q.appendChild(Q);d.appendChild(q);this.container=d},ConnectionPointsDialog=function(b,g){function l(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function y(A,B,H){A=new mxCell("",new mxGeometry(A,B,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");A.vertex=!0;A.cp=!0;A.constObj=H;return Q.addCell(A)}function x(A){A=Q.getSelectionCells();Q.deleteCells(A)}-function D(){var A=parseInt(O.value)||0;A=0>A?0:100<A?100:A;O.value=A;var B=parseInt(m.value)||0;B=0>B?0:100<B?100:B;m.value=B;var H=parseInt(N.value)||0,T=parseInt(u.value)||0;H=new mxConnectionConstraint(new mxPoint(A/100,B/100),!1,null,H,T);A=Q.getConnectionPoint(f,H);B=Q.getSelectionCell();if(null!=B){B.constObj=H;H=B.geometry.clone();T=Q.view.scale;var k=Q.view.translate;H.x=(A.x-3*T)/T-k.x;H.y=(A.y-3*T)/T-k.y;Q.model.setGeometry(B,H)}}function J(A){if(A.constObj)return{x:A.constObj.point.x,-y:A.constObj.point.y,dx:A.constObj.dx,dy:A.constObj.dy};var B=0,H=0,T=c.geometry,k=mxUtils.format((A.geometry.x+3-T.x)/T.width);A=mxUtils.format((A.geometry.y+3-T.y)/T.height);0>k?(B=k*T.width,k=0):1<k&&(B=(k-1)*T.width,k=1);0>A?(H=A*T.height,A=0):1<A&&(H=(A-1)*T.height,A=1);return{x:k,y:A,dx:parseInt(B),dy:parseInt(H)}}function K(A){if(1==Q.getSelectionCount()){var B=Q.getSelectionCell();A&&(B.constObj=null);A=J(B);O.value=100*A.x;m.value=100*A.y;N.value=A.dx;u.value=A.dy;U.style.visibility=""}else U.style.visibility=+function D(){var A=parseInt(P.value)||0;A=0>A?0:100<A?100:A;P.value=A;var B=parseInt(m.value)||0;B=0>B?0:100<B?100:B;m.value=B;var H=parseInt(O.value)||0,T=parseInt(u.value)||0;H=new mxConnectionConstraint(new mxPoint(A/100,B/100),!1,null,H,T);A=Q.getConnectionPoint(f,H);B=Q.getSelectionCell();if(null!=B){B.constObj=H;H=B.geometry.clone();T=Q.view.scale;var k=Q.view.translate;H.x=(A.x-3*T)/T-k.x;H.y=(A.y-3*T)/T-k.y;Q.model.setGeometry(B,H)}}function J(A){if(A.constObj)return{x:A.constObj.point.x,+y:A.constObj.point.y,dx:A.constObj.dx,dy:A.constObj.dy};var B=0,H=0,T=c.geometry,k=mxUtils.format((A.geometry.x+3-T.x)/T.width);A=mxUtils.format((A.geometry.y+3-T.y)/T.height);0>k?(B=k*T.width,k=0):1<k&&(B=(k-1)*T.width,k=1);0>A?(H=A*T.height,A=0):1<A&&(H=(A-1)*T.height,A=1);return{x:k,y:A,dx:parseInt(B),dy:parseInt(H)}}function K(A){if(1==Q.getSelectionCount()){var B=Q.getSelectionCell();A&&(B.constObj=null);A=J(B);P.value=100*A.x;m.value=100*A.y;O.value=A.dx;u.value=A.dy;U.style.visibility=""}else U.style.visibility="hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.border="1px solid lightGray";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var Q=new Graph(L);Q.transparentBackground=!1;Q.autoExtend=!1;Q.autoScroll=!1;Q.setGridEnabled(!1);Q.setEnabled(!0);Q.setPanning(!0);Q.setConnectable(!1);Q.setTooltips(!1);Q.minFitScale=null;Q.maxFitScale=null;Q.centerZoom=!0;Q.maxFitScale=2;L=g.geometry;var c=new mxCell(g.value,new mxGeometry(0,0,L.width,L.height),g.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");c.vertex=!0;Q.addCell(c);Q.dblClick=function(A,B){if(null!=B&&B!=c)Q.setSelectionCell(B);else{B=mxUtils.convertPoint(Q.container,mxEvent.getClientX(A),mxEvent.getClientY(A));mxEvent.consume(A);A=Q.view.scale;var H=Q.view.translate;Q.setSelectionCell(y((B.x-3*A)/A-H.x,(B.y-3*A)/A-H.y))}};q=new mxKeyHandler(Q);q.bindKey(46,x);q.bindKey(8,x);Q.getRubberband().isForceRubberbandEvent=function(A){return 0==A.evt.button&&(null==A.getCell()||A.getCell()==c)};Q.panningHandler.isForcePanningEvent=function(A){return 2==A.evt.button};var e=Q.isCellSelectable;Q.isCellSelectable=function(A){return A==c?!1:e.apply(this,arguments)};Q.getLinkForCell=function(){return null};var f=Q.view.getState(c);L=Q.getAllConnectionConstraints(f);for(var p=0;null!=L&&p<L.length;p++){var n=Q.getConnectionPoint(f,L[p]);y(n.x-3,n.y-3,L[p])}Q.fit(8);Q.center();p=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),@@ -12694,9 +12694,9 @@ function(){Q.zoomIn()},20);n=b.createToolbarButton(Editor.zoomOutImage,mxResourcz():(Q.setGridEnabled(!Q.isGridEnabled()),Q.refresh())},20);mxEvent.addListener(E,"dblclick",z);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),x,20);mxUtils.setOpacity(C,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(p);L.appendChild(n);L.appendChild(t);L.appendChild(E);L.appendChild(C);d.appendChild(L);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","1");F.setAttribute("value","1");F.style.width="45px";F.style.position="relative";F.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";n=["left","right","top","bottom"];for(p=0;p<n.length;p++)t=n[p],E=document.createElement("option"),mxUtils.write(E,mxResources.get(t)),E.value=t,R.appendChild(E);p=mxUtils.button(mxResources.get("add"),function(){var A=parseInt(F.value);A=1>A?1:100<A?100:A;F.value=A;for(var B=R.value,H=c.geometry,T=[],k=0;k<A;k++){switch(B){case "left":var v=H.x;var G=H.y+(k+1)*H.height/(A+1);break;case "right":v=H.x+H.width;G=H.y+(k+1)*H.height/(A+1);break;case "top":v=H.x+(k+1)*H.width/(A+1);G=H.y;break;case "bottom":v=H.x+(k+1)*H.width/(A+1),G=H.y+H.height}T.push(y(v-3,G-3))}Q.setSelectionCells(T)});p.style.marginLeft="auto";L.appendChild(p);L.appendChild(F);L.appendChild(R);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));-U.appendChild(L);var O=document.createElement("input");O.setAttribute("type","number");O.setAttribute("min","0");O.setAttribute("max","100");O.style.width="45px";O.style.margin="0 4px 0 4px";U.appendChild(O);mxUtils.write(U,"%");var N=document.createElement("input");N.setAttribute("type","number");N.style.width="45px";N.style.margin="0 4px 0 4px";U.appendChild(N);mxUtils.write(U,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";U.appendChild(L);+U.appendChild(L);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("min","0");P.setAttribute("max","100");P.style.width="45px";P.style.margin="0 4px 0 4px";U.appendChild(P);mxUtils.write(U,"%");var O=document.createElement("input");O.setAttribute("type","number");O.style.width="45px";O.style.margin="0 4px 0 4px";U.appendChild(O);mxUtils.write(U,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";U.appendChild(L);var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.setAttribute("max","100");m.style.width="45px";m.style.margin="0 4px 0 4px";U.appendChild(m);mxUtils.write(U,"%");var u=document.createElement("input");u.setAttribute("type","number");u.style.width="45px";u.style.margin="0 4px 0 4px";U.appendChild(u);mxUtils.write(U,"pt");d.appendChild(U);K();Q.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<Q.getSelectionCount()?mxUtils.setOpacity(C,60):-mxUtils.setOpacity(C,10);K()});Q.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(O,"change",D);mxEvent.addListener(m,"change",D);mxEvent.addListener(N,"change",D);mxEvent.addListener(u,"change",D);L=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});L.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var A=Q.model.cells,B=[],H=[],T;for(T in A){var k=A[T];k.cp&&H.push(J(k))}H.sort(function(v,G){return v.x!=G.x?v.x-G.x:v.y!=G.y?v.y-G.y:v.dx!=G.dx?v.dx-+mxUtils.setOpacity(C,10);K()});Q.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(P,"change",D);mxEvent.addListener(m,"change",D);mxEvent.addListener(O,"change",D);mxEvent.addListener(u,"change",D);L=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});L.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var A=Q.model.cells,B=[],H=[],T;for(T in A){var k=A[T];k.cp&&H.push(J(k))}H.sort(function(v,G){return v.x!=G.x?v.x-G.x:v.y!=G.y?v.y-G.y:v.dx!=G.dx?v.dx-G.dx:v.dy-G.dy});for(A=0;A<H.length;A++)0<A&&H[A].x==H[A-1].x&&H[A].y==H[A-1].y&&H[A].dx==H[A-1].dx&&H[A].dy==H[A-1].dy||B.push("["+H[A].x+","+H[A].y+",0,"+H[A].dx+","+H[A].dy+"]");b.editor.graph.setCellStyles("points","["+B.join(",")+"]",[g]);l();b.hideDialog()});p.className="geBtn gePrimaryBtn";n=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[g]);l();b.hideDialog()});n.className="geBtn";t=document.createElement("div");t.style.marginTop="10px";t.style.textAlign="right";b.isOffline()||t.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&t.appendChild(L);t.appendChild(n);t.appendChild(p);b.editor.cancelFirst||t.appendChild(L);d.appendChild(t)};this.destroy=l;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";@@ -12778,33 +12778,33 @@ type:"bool",defVal:!1,isVisible:function(k,v){v=v.editorUi.editor.graph.model;redefVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,v){var G=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||v.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==G||G==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,v){return 0<k.vertices.length&&v.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\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, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#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,[email protected],default,#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,[email protected],default,#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,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';-Editor.createRoughCanvas=function(k){var v=rough.canvas({getContext:function(){return k}});v.draw=function(G){var I=G.sets||[];G=G.options||this.getDefaultOptions();for(var M=0;M<I.length;M++){var P=I[M];switch(P.type){case "path":null!=G.stroke&&this._drawToContext(k,P,G);break;case "fillPath":this._drawToContext(k,P,G);break;case "fillSketch":this.fillSketch(k,P,G)}}};v.fillSketch=function(G,I,M){var P=k.state.strokeColor,S=k.state.strokeWidth,V=k.state.strokeAlpha,W=k.state.dashed,X=M.fillWeight;-0>X&&(X=M.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(M.fill||"");k.setStrokeWidth(X);k.setDashed(!1);this._drawToContext(G,I,M);k.setDashed(W);k.setStrokeWidth(S);k.setStrokeColor(P);k.setStrokeAlpha(V)};v._drawToContext=function(G,I,M){G.begin();for(var P=0;P<I.ops.length;P++){var S=I.ops[P],V=S.data;switch(S.op){case "move":G.moveTo(V[0],V[1]);break;case "bcurveTo":G.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":G.lineTo(V[0],V[1])}}G.end();"fillPath"===I.type&&-M.filled?G.fill():G.stroke()};return v};(function(){function k(P,S,V){this.canvas=P;this.rc=S;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=+Editor.createRoughCanvas=function(k){var v=rough.canvas({getContext:function(){return k}});v.draw=function(G){var I=G.sets||[];G=G.options||this.getDefaultOptions();for(var M=0;M<I.length;M++){var N=I[M];switch(N.type){case "path":null!=G.stroke&&this._drawToContext(k,N,G);break;case "fillPath":this._drawToContext(k,N,G);break;case "fillSketch":this.fillSketch(k,N,G)}}};v.fillSketch=function(G,I,M){var N=k.state.strokeColor,S=k.state.strokeWidth,V=k.state.strokeAlpha,W=k.state.dashed,X=M.fillWeight;+0>X&&(X=M.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(M.fill||"");k.setStrokeWidth(X);k.setDashed(!1);this._drawToContext(G,I,M);k.setDashed(W);k.setStrokeWidth(S);k.setStrokeColor(N);k.setStrokeAlpha(V)};v._drawToContext=function(G,I,M){G.begin();for(var N=0;N<I.ops.length;N++){var S=I.ops[N],V=S.data;switch(S.op){case "move":G.moveTo(V[0],V[1]);break;case "bcurveTo":G.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":G.lineTo(V[0],V[1])}}G.end();"fillPath"===I.type&&+M.filled?G.fill():G.stroke()};return v};(function(){function k(N,S,V){this.canvas=N;this.rc=S;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,k.prototype.fillAndStroke);-this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(P,S){var V=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)V=(V<<5)-V+W.charCodeAt(X)<<0}V={strokeWidth:this.canvas.state.strokeWidth,seed:V,preserveVertices:!0};W=this.rc.getDefaultOptions();V.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:-mxConstants.NONE;P=null;(V.filled=S)?(V.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):V.fill="";V.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);V.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);V.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);V.roughness=mxUtils.getValue(this.shape.style,"jiggle",+this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(N,S){var V=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)V=(V<<5)-V+W.charCodeAt(X)<<0}V={strokeWidth:this.canvas.state.strokeWidth,seed:V,preserveVertices:!0};W=this.rc.getDefaultOptions();V.stroke=N?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:+mxConstants.NONE;N=null;(V.filled=S)?(V.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,N=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):V.fill="";V.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);V.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);V.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);V.roughness=mxUtils.getValue(this.shape.style,"jiggle",W.roughness);V.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);V.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);V.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);V.hachureGap="auto"==S?-1:S;V.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);V.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",-S);V.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);V.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=V.fill&&(null!=P||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(V.fill)))?-"solid":W.fillStyle);V.fillStyle=S;return V};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};-k.prototype.lineTo=function(P,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,P,S),this.lastX=P,this.lastY=S)};k.prototype.moveTo=function(P,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,S),this.lastX=P,this.lastY=S,this.firstX=P,this.firstY=S)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(P,S,V,W){this.passThrough?-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,S,V,W),this.lastX=V,this.lastY=W)};k.prototype.curveTo=function(P,S,V,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,S,V,W,X,Z),this.lastX=X,this.lastY=Z)};k.prototype.arcTo=function(P,S,V,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,P,S,V,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=-6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};k.prototype.rect=function(P,S,V,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,S,V,W,this.getStyle(!0,!0)))};k.prototype.ellipse=function(P,S,V,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+V/2,S+W/2,V,W,this.getStyle(!0,!0)))};k.prototype.roundrect=-function(P,S,V,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(P+X,S),this.lineTo(P+V-X,S),this.quadTo(P+V,S,P+V,S+Z),this.lineTo(P+V,S+W-Z),this.quadTo(P+V,S+W,P+V-X,S+W),this.lineTo(P+X,S+W),this.quadTo(P,S+W,P,S+W-Z),this.lineTo(P,S+Z),this.quadTo(P,S,P+X,S))};k.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in P)this.nextShape.options[S]=-P[S];P.stroke!=mxConstants.NONE&&null!=P.stroke||delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?+S);V.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);V.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=V.fill&&(null!=N||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(V.fill)))?+"solid":W.fillStyle);V.fillStyle=S;return V};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var N=2;N<arguments.length;N+=2)this.lastX=arguments[N-1],this.lastY=arguments[N],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};+k.prototype.lineTo=function(N,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,N,S),this.lastX=N,this.lastY=S)};k.prototype.moveTo=function(N,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,N,S),this.lastX=N,this.lastY=S,this.firstX=N,this.firstY=S)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(N,S,V,W){this.passThrough?+this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,N,S,V,W),this.lastX=V,this.lastY=W)};k.prototype.curveTo=function(N,S,V,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,N,S,V,W,X,Z),this.lastX=X,this.lastY=Z)};k.prototype.arcTo=function(N,S,V,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,N,S,V,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=+6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};k.prototype.rect=function(N,S,V,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(N,S,V,W,this.getStyle(!0,!0)))};k.prototype.ellipse=function(N,S,V,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(N+V/2,S+W/2,V,W,this.getStyle(!0,!0)))};k.prototype.roundrect=+function(N,S,V,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(N+X,S),this.lineTo(N+V-X,S),this.quadTo(N+V,S,N+V,S+Z),this.lineTo(N+V,S+W-Z),this.quadTo(N+V,S+W,N+V-X,S+W),this.lineTo(N+X,S+W),this.quadTo(N,S+W,N,S+W-Z),this.lineTo(N,S+Z),this.quadTo(N,S,N+X,S))};k.prototype.drawPath=function(N){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),N)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in N)this.nextShape.options[S]=+N[S];N.stroke!=mxConstants.NONE&&null!=N.stroke||delete this.nextShape.options.stroke;N.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.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(P){return new k(P,Editor.createRoughCanvas(P),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,-"sketchStyle","rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var G=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,S,V,W,X){null!=P.handJiggle&&P.handJiggle.passThrough||G.apply(this,arguments)};var I=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var S=P.addTolerance,V=!0;null!=this.style&&(V="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==k&&!this.outline){P.save();-var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=P.setStrokeColor;P.setStrokeColor=function(){};var ba=P.setFillColor;P.setFillColor=function(){};V||null==W||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;I.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ba;P.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;P.restore();V&&null!=W&&(P.addTolerance=function(){})}I.apply(this,arguments);P.addTolerance=-S};var M=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,S,V,W,X,Z){null!=P.handJiggle&&P.handJiggle.constructor==k?(P.handJiggle.passThrough=!0,M.apply(this,arguments),P.handJiggle.passThrough=!1):M.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),-{to:"string"})};Editor.extractGraphModel=function(k,v,G){if(null!=k&&"undefined"!==typeof pako){var I=k.ownerDocument.getElementsByTagName("div"),M=[];if(null!=I&&0<I.length)for(var P=0;P<I.length;P++)if("mxgraph"==I[P].getAttribute("class")){M.push(I[P]);break}0<M.length&&(I=M[0].getAttribute("data-mxgraph"),null!=I?(M=JSON.parse(I),null!=M&&null!=M.xml&&(k=mxUtils.parseXml(M.xml),k=k.documentElement)):(M=M[0].getElementsByTagName("div"),0<M.length&&(I=mxUtils.getTextContent(M[0]),I=Graph.decompress(I,+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(N){return new k(N,Editor.createRoughCanvas(N),this)};var v=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(N){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?v.apply(this,arguments):"comic"==mxUtils.getValue(this.style,+"sketchStyle","rough")?this.createComicCanvas(N):this.createRoughCanvas(N)};var G=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(N,S,V,W,X){null!=N.handJiggle&&N.handJiggle.passThrough||G.apply(this,arguments)};var I=mxShape.prototype.paint;mxShape.prototype.paint=function(N){var S=N.addTolerance,V=!0;null!=this.style&&(V="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=N.handJiggle&&N.handJiggle.constructor==k&&!this.outline){N.save();+var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=N.setStrokeColor;N.setStrokeColor=function(){};var ba=N.setFillColor;N.setFillColor=function(){};V||null==W||(this.configurePointerEvents=function(){});N.handJiggle.passThrough=!0;I.apply(this,arguments);N.handJiggle.passThrough=!1;N.setFillColor=ba;N.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;N.restore();V&&null!=W&&(N.addTolerance=function(){})}I.apply(this,arguments);N.addTolerance=+S};var M=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(N,S,V,W,X,Z){null!=N.handJiggle&&N.handJiggle.constructor==k?(N.handJiggle.passThrough=!0,M.apply(this,arguments),N.handJiggle.passThrough=!1):M.apply(this,arguments)}})();Editor.fastCompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),+{to:"string"})};Editor.extractGraphModel=function(k,v,G){if(null!=k&&"undefined"!==typeof pako){var I=k.ownerDocument.getElementsByTagName("div"),M=[];if(null!=I&&0<I.length)for(var N=0;N<I.length;N++)if("mxgraph"==I[N].getAttribute("class")){M.push(I[N]);break}0<M.length&&(I=M[0].getAttribute("data-mxgraph"),null!=I?(M=JSON.parse(I),null!=M&&null!=M.xml&&(k=mxUtils.parseXml(M.xml),k=k.documentElement)):(M=M[0].getElementsByTagName("div"),0<M.length&&(I=mxUtils.getTextContent(M[0]),I=Graph.decompress(I,null,G),0<I.length&&(k=mxUtils.parseXml(I),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(I=k.getAttribute("content"),null!=I&&"<"!=I.charAt(0)&&"%"!=I.charAt(0)&&(I=unescape(window.atob?atob(I):Base64.decode(cont,I))),null!=I&&"%"==I.charAt(0)&&(I=decodeURIComponent(I)),null!=I&&0<I.length)k=mxUtils.parseXml(I).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||v||(M=null,"diagram"==k.nodeName?M=k:"mxfile"==k.nodeName&&(I=k.getElementsByTagName("diagram"),0<I.length&&(M=I[Math.max(0,Math.min(I.length-1,urlParams.page||0))])),null!=M&&(k=Editor.parseDiagramNode(M,G)));null==k||"mxGraphModel"==k.nodeName||v&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,v,G){Editor.validateDiagramNode(k);var I=mxUtils.trim(mxUtils.getTextContent(k)),M=null;0<I.length?(v=Graph.decompress(I,null,v),null!=v&&0<v.length&&(M=mxUtils.parseXml(v).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(M=k[0],G&&(M=Editor.parseDiagramNode(M,v,!1)),v=mxUtils.createXmlDocument(),v.appendChild(v.importNode(M,!0)),M=v.documentElement));return M};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var v=mxUtils.getNodeValue(k),G=null;0<v.length?G=Graph.decompress(v):(k=k.getElementsByTagName("mxGraphModel"),null!=k&&0<k.length&&(G=mxUtils.getXml(k[0])));return G};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var v=new mxCodec,G=new mxGraphModel;k.appendChild(v.encode(G))}return k};Editor.extractGraphModelFromPdf=function(k){var v=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var G=k.indexOf("EmbeddedFile");if(-1<G){var I=k.indexOf("stream",G)+9;if(0<k.substring(G,I).indexOf("application#2Fvnd.jgraph.mxfile")){var M=k.indexOf("endstream",I-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(I,M)),{to:"string"})}}for(G=k.indexOf("/ObjStm");0<G;){I=-k.indexOf("stream",G)+9;M=k.indexOf("endstream",I-1);I=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(I,M)),{to:"string"});M=I.indexOf("/Subject <");if(0<M){G=I.substring(M+14,I.indexOf(">",M));if(null!=G){v=G;G=[];for(I=0;I<v.length;I+=2)M=v.substr(I,2),"00"!=M&&G.push(String.fromCharCode(parseInt(M,16)));v=G.join("")}break}G=k.indexOf("/ObjStm",G+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){G="";M=I=0;for(var P=[],S=null;M<k.length;){var V=k.charCodeAt(M);M+=1;10!=V&&(G+=String.fromCharCode(V));-V=="/Subject (%3Cmxfile".charCodeAt(I)?I++:I=0;if(19==I){var W=k.indexOf("%3C%2Fmxfile%3E",M)+15;M-=9;if(W>M){v=k.substring(M,W);break}}10==V&&("endobj"==G?S=null:"obj"==G.substring(G.length-3,G.length)||"xref"==G||"trailer"==G?(S=[],P[G.split(" ")[0]]=S):null!=S&&S.push(G),G="")}}null==v&&null!=P&&(v=Editor.extractGraphModelFromXref(P));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,G=null;null!=+k.indexOf("stream",G)+9;M=k.indexOf("endstream",I-1);I=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(I,M)),{to:"string"});M=I.indexOf("/Subject <");if(0<M){G=I.substring(M+14,I.indexOf(">",M));if(null!=G){v=G;G=[];for(I=0;I<v.length;I+=2)M=v.substr(I,2),"00"!=M&&G.push(String.fromCharCode(parseInt(M,16)));v=G.join("")}break}G=k.indexOf("/ObjStm",G+1)}}if(null==v&&"%PDF-1.4"==k.substring(0,8)){G="";M=I=0;for(var N=[],S=null;M<k.length;){var V=k.charCodeAt(M);M+=1;10!=V&&(G+=String.fromCharCode(V));+V=="/Subject (%3Cmxfile".charCodeAt(I)?I++:I=0;if(19==I){var W=k.indexOf("%3C%2Fmxfile%3E",M)+15;M-=9;if(W>M){v=k.substring(M,W);break}}10==V&&("endobj"==G?S=null:"obj"==G.substring(G.length-3,G.length)||"xref"==G||"trailer"==G?(S=[],N[G.split(" ")[0]]=S):null!=S&&S.push(G),G="")}}null==v&&null!=N&&(v=Editor.extractGraphModelFromXref(N));null!=v&&(v=decodeURIComponent(v.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return v};Editor.extractGraphModelFromXref=function(k){var v=k.trailer,G=null;null!=v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[1]],null!=v&&(v=/.* \/Subject (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(k=k[v[1]],null!=k&&(k=k.join("\n"),G=k.substring(1,k.length-1))))));return G};Editor.extractParserError=function(k,v){var G=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(G=v||mxResources.get("invalidChars"),v=k[0].getElementsByTagName("div"),0<v.length&&(G=mxUtils.getTextContent(v[0])));return null!=G?mxUtils.trim(G):G};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,G){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,G)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=@@ -12834,38 +12834,38 @@ Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.ma!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var G=function(){I=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var I=null;Editor.doMathJaxRender=function(S){try{null==I?(MathJax.typesetClear([S]),MathJax.typeset([S]),G()):I!=S&&Editor.mathJaxQueue.push(S)}catch(V){MathJax.typesetClear([S]),null!=V.retry?(I=S,V.retry.then(function(){MathJax.typesetPromise([S]).then(G)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+W.toString());G()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());G()})):null!=window.console&&console.log("Error in MathJax.typeset: "+V.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,-arguments);var S=mxUtils.bind(this,function(V,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",k);v[0].parentNode.appendChild(P)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v=-"",G=[""],I=0,M=!0,P;k=$jscomp.makeIterator(k);for(P=k.next();!P.done;P=k.next())P=P.value,'"'===P?(M&&P===v&&(G[I]+=P),M=!M):","===P&&M?P=G[++I]="":G[I]+=P,v=P;return G}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var G="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)++arguments);var S=mxUtils.bind(this,function(V,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var N=document.createElement("script");N.setAttribute("type","text/javascript");N.setAttribute("src",k);v[0].parentNode.appendChild(N)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v=+"",G=[""],I=0,M=!0,N;k=$jscomp.makeIterator(k);for(N=k.next();!N.done;N=k.next())N=N.value,'"'===N?(M&&N===v&&(G[I]+=N),M=!M):","===N&&M?N=G[++I]="":G[I]+=N,v=N;return G}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var G="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+G+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.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(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,G=this;k.convert=function(I){null!=I&&navigator.onLine&&("http://"!=I.substring(0,7)&&"https://"!=I.substring(0,8)||I.substring(0,k.baseUrl.length)==k.baseUrl||G.crossOriginImages&&G.isCorsEnabledForUrl(I)?"chrome-extension://"!=I.substring(0,19)&&(I=v.apply(this,arguments)):I=PROXY_URL+"?url="+encodeURIComponent(I));return I};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+-btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,G,I,M){try{var P=!0,S=window.setTimeout(mxUtils.bind(this,function(){P=!1;v(k)}),this.timeout),V=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(k,v,G,I,!0):v(k)});if(/(\.svg)$/i.test(k)&&!M)mxUtils.get(k,mxUtils.bind(this,function(X){window.clearTimeout(S);P&&(200>X.getStatus()||299<X.getStatus()?V():v(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);-P&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(P)try{I=null!=I&&M?I:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(I,I);X.height=W.height*I;X.width=W.width*I;Z.drawImage(W,0,0);v(X.toDataURL())}catch(Y){v(k)}};W.onerror=function(){window.clearTimeout(S);P&&(null!=G?G():v(k))};W.src=k}}catch(X){null!=G?G():v(k)}};Editor.prototype.convertImages=function(k,v,G,I){function M(){0<P.length?P.shift()():-v(k)}null==I&&(I=this.createImageUrlConverter());var P=[],S=G||{};G=mxUtils.bind(this,function(V,W){V=k.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){P.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=I.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));M()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),M())}else null!=Y&&Z.setAttribute(W,-Y),M()}}catch(ea){M()}}))})(V[X])});G("image","xlink:href");G("img","src");M()};Editor.base64Encode=function(k){for(var v="",G=0,I=k.length,M,P,S;G<I;){M=k.charCodeAt(G++)&255;if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4);v+="==";break}P=k.charCodeAt(G++);if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&-3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);v+="=";break}S=k.charCodeAt(G++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(S&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return v};-Editor.prototype.loadUrl=function(k,v,G,I,M,P,S,V){try{var W=!S&&(I||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=v){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();-Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}P=null!=P?P:"data:image/png;base64,";Y=P+Editor.base64Encode(Y)}v(Y)}}else null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){M&&null!=G&&G({code:App.ERROR_TIMEOUT,+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,G,I,M){try{var N=!0,S=window.setTimeout(mxUtils.bind(this,function(){N=!1;v(k)}),this.timeout),V=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(k,v,G,I,!0):v(k)});if(/(\.svg)$/i.test(k)&&!M)mxUtils.get(k,mxUtils.bind(this,function(X){window.clearTimeout(S);N&&(200>X.getStatus()||299<X.getStatus()?V():v(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);+N&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(N)try{I=null!=I&&M?I:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(I,I);X.height=W.height*I;X.width=W.width*I;Z.drawImage(W,0,0);v(X.toDataURL())}catch(Y){v(k)}};W.onerror=function(){window.clearTimeout(S);N&&(null!=G?G():v(k))};W.src=k}}catch(X){null!=G?G():v(k)}};Editor.prototype.convertImages=function(k,v,G,I){function M(){0<N.length?N.shift()():+v(k)}null==I&&(I=this.createImageUrlConverter());var N=[],S=G||{};G=mxUtils.bind(this,function(V,W){V=k.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){N.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=I.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));M()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),M())}else null!=Y&&Z.setAttribute(W,+Y),M()}}catch(ea){M()}}))})(V[X])});G("image","xlink:href");G("img","src");M()};Editor.base64Encode=function(k){for(var v="",G=0,I=k.length,M,N,S;G<I;){M=k.charCodeAt(G++)&255;if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4);v+="==";break}N=k.charCodeAt(G++);if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&+3)<<4|(N&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&15)<<2);v+="=";break}S=k.charCodeAt(G++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(N&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&15)<<2|(S&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return v};+Editor.prototype.loadUrl=function(k,v,G,I,M,N,S,V){try{var W=!S&&(I||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=v){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();+Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}N=null!=N?N:"data:image/png;base64,";Y=N+Editor.base64Encode(Y)}v(Y)}}else null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){M&&null!=G&&G({code:App.ERROR_TIMEOUT,retry:X})},V)});X()}catch(Z){null!=G&&G(Z)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var G=k.getText(),I=JSON.parse(G);null!=I&&null!=I.error&&null!=I.error.message&&(v=I.error.message+" ("+v+")")}catch(M){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var G=k.split("url(");if(0<G.length){v=[G[0]];k=window.location.pathname;var I=null!=k?k.lastIndexOf("/"):-1;0<=I&&(k=k.substring(0,I+1));I=document.getElementsByTagName("base");-var M=null;null!=I&&0<I.length&&(M=I[0].getAttribute("href"));for(var P=1;P<G.length;P++)if(I=G[P].indexOf(")"),0<I){var S=Editor.trimCssUrl(G[P].substring(0,I));this.graph.isRelativeUrl(S)&&(S=null!=M?M+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":k)+S);v.push('url("'+S+'"'+G[P].substring(I))}else v.push(G[P])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,G){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+-encodeURIComponent(v));G(k,v)};Editor.prototype.embedCssFonts=function(k,v){var G=k.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var M=mxUtils.bind(this,function(){if(0==I){for(var W=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,Z))]);W.push('"'+G[X].substring(Z))}v(W.join(""))}});if(0<G.length){for(k=1;k<G.length;k++){var P=G[k].indexOf(")"),S=null,V=G[k].indexOf("format(",P);0<V&&(S=Editor.trimCssUrl(G[k].substring(V++var M=null;null!=I&&0<I.length&&(M=I[0].getAttribute("href"));for(var N=1;N<G.length;N++)if(I=G[N].indexOf(")"),0<I){var S=Editor.trimCssUrl(G[N].substring(0,I));this.graph.isRelativeUrl(S)&&(S=null!=M?M+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":k)+S);v.push('url("'+S+'"'+G[N].substring(I))}else v.push(G[N])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,G){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="++encodeURIComponent(v));G(k,v)};Editor.prototype.embedCssFonts=function(k,v){var G=k.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var M=mxUtils.bind(this,function(){if(0==I){for(var W=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,Z))]);W.push('"'+G[X].substring(Z))}v(W.join(""))}});if(0<G.length){for(k=1;k<G.length;k++){var N=G[k].indexOf(")"),S=null,V=G[k].indexOf("format(",N);0<V&&(S=Editor.trimCssUrl(G[k].substring(V+7,G[k].indexOf(")",V))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;I++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";-else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;I--;M()}),mxUtils.bind(this,function(ba){I--;M()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[k].substring(0,P)),S)}M()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=-v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var G=[],I=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(G.join(""),k)}),P=0;P<v.length;P++)mxUtils.bind(this,function(S,V){Graph.isCssFontUrl(V)?-null==this.cachedGoogleFonts[V]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;G.push(W+"\n");I--;M()}),mxUtils.bind(this,function(W){I--;G.push("@import url("+V+");\n");M()}))):G.push(this.cachedGoogleFonts[V]+"\n"):G.push('@font-face {font-family: "'+S+'";src: url("'+V+'")}\n')})(v[P].name,v[P].url);M()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),-G=0;G<v.length;G++){var I=mxUtils.getTextContent(v[G]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&k[0].appendChild(v[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var G=mxUtils.getSvgDefs(k),I=v.split("\n");v=[];for(var M=[],P=0;P<I.length;P++)"@import"==I[P].substring(0,7)?v.push(I[P]):M.push(I[P]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");-k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),G.appendChild(k));0<M.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,M.join("\n")),G.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,G){var I=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(I/k,I/v))};Editor.prototype.exportToCanvas=function(k,v,G,I,M,P,S,V,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{P=-null!=P?P:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ha=W?null:Y.background;ha==mxConstants.NONE&&(ha=null);null==ha&&(ha=I);null==ha&&0==W&&(ha="dark"==fa&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,function(pa){try{var na=new Image;na.onload=mxUtils.bind(this,function(){try{var wa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(na,0,0);k(ua,pa)},-0):(ja.drawImage(na,0,0),k(ua,pa))},ua=document.createElement("canvas"),va=parseInt(pa.getAttribute("width")),Ca=parseInt(pa.getAttribute("height"));V=null!=V?V:1;null!=v&&(V=P?Math.min(1,Math.min(3*v/(4*Ca),v/va)):v/va);V=this.getMaxCanvasScale(va,Ca,V);va=Math.ceil(V*va);Ca=Math.ceil(V*Ca);ua.setAttribute("width",va);ua.setAttribute("height",Ca);var ja=ua.getContext("2d");null!=ha&&(ja.beginPath(),ja.rect(0,0,va,Ca),ja.fillStyle=ha,ja.fill());1!=V&&ja.scale(V,V);if(ca){var oa=Y.view,ma=oa.scale;+else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;I--;M()}),mxUtils.bind(this,function(ba){I--;M()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[k].substring(0,N)),S)}M()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=+v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var G=[],I=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(G.join(""),k)}),N=0;N<v.length;N++)mxUtils.bind(this,function(S,V){Graph.isCssFontUrl(V)?+null==this.cachedGoogleFonts[V]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;G.push(W+"\n");I--;M()}),mxUtils.bind(this,function(W){I--;G.push("@import url("+V+");\n");M()}))):G.push(this.cachedGoogleFonts[V]+"\n"):G.push('@font-face {font-family: "'+S+'";src: url("'+V+'")}\n')})(v[N].name,v[N].url);M()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),+G=0;G<v.length;G++){var I=mxUtils.getTextContent(v[G]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&k[0].appendChild(v[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var G=mxUtils.getSvgDefs(k),I=v.split("\n");v=[];for(var M=[],N=0;N<I.length;N++)"@import"==I[N].substring(0,7)?v.push(I[N]):M.push(I[N]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");+k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),G.appendChild(k));0<M.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,M.join("\n")),G.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,G){var I=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(I/k,I/v))};Editor.prototype.exportToCanvas=function(k,v,G,I,M,N,S,V,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{N=+null!=N?N:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ha=W?null:Y.background;ha==mxConstants.NONE&&(ha=null);null==ha&&(ha=I);null==ha&&0==W&&(ha="dark"==fa&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,function(pa){try{var na=new Image;na.onload=mxUtils.bind(this,function(){try{var wa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(na,0,0);k(ua,pa)},+0):(ja.drawImage(na,0,0),k(ua,pa))},ua=document.createElement("canvas"),va=parseInt(pa.getAttribute("width")),Ca=parseInt(pa.getAttribute("height"));V=null!=V?V:1;null!=v&&(V=N?Math.min(1,Math.min(3*v/(4*Ca),v/va)):v/va);V=this.getMaxCanvasScale(va,Ca,V);va=Math.ceil(V*va);Ca=Math.ceil(V*Ca);ua.setAttribute("width",va);ua.setAttribute("height",Ca);var ja=ua.getContext("2d");null!=ha&&(ja.beginPath(),ja.rect(0,0,va,Ca),ja.fillStyle=ha,ja.fill());1!=V&&ja.scale(V,V);if(ca){var oa=Y.view,ma=oa.scale;oa.scale=1;var Aa=btoa(unescape(encodeURIComponent(oa.createSvgGrid(oa.gridColor))));oa.scale=ma;Aa="data:image/svg+xml;base64,"+Aa;var sa=Y.gridSize*oa.gridSteps*V,Ia=Y.getGraphBounds(),xa=oa.translate.x*ma,Ba=oa.translate.y*ma,Fa=xa+(Ia.x-xa)/ma-ba,La=Ba+(Ia.y-Ba)/ma-ba,za=new Image;za.onload=function(){try{for(var Da=-Math.round(sa-mxUtils.mod((xa-Fa)*V,sa)),Ja=-Math.round(sa-mxUtils.mod((Ba-La)*V,sa));Da<va;Da+=sa)for(var Ra=Ja;Ra<Ca;Ra+=sa)ja.drawImage(za,Da/V,Ra/V);wa()}catch(Sa){null!=M&&M(Sa)}};za.onerror=function(Da){null!=M&&M(Da)};za.src=Aa}else wa()}catch(Da){null!=M&&M(Da)}});na.onerror=function(wa){null!=M&&M(wa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ia=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),na.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(wa){null!=M&&M(wa)}});this.embedExtFonts(mxUtils.bind(this,function(wa){try{null!=wa&&this.addFontCss(pa,wa),this.loadFonts(ia)}catch(ua){null!=-M&&M(ua)}}))}catch(wa){null!=M&&M(wa)}}),G,Z)}catch(pa){null!=M&&M(pa)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var y=q,x=0;8>x;x++)y=1==(y&1)?3988292384^y>>>1:y>>>1,Editor.crcTable[q]=y;Editor.updateCRC=function(k,v,G,I){for(var M=0;M<I;M++)k=Editor.crcTable[(k^v.charCodeAt(G+M))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,G=0;G<k.length;G++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(G))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,G,I,M){function P(Z,Y){var ba=-W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=P(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var W=0;if(P(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=M&&M();else if(P(k,4),"IHDR"!=P(k,4))null!=M&&M();else{P(k,17);M=k.substring(0,W);do{var X=S(k);if("IDAT"==P(k,4)){M=k.substring(0,-W-8);"pHYs"==v&&"dpi"==G?(G=Math.round(I/.0254),G=V(G)+V(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+I;I=4294967295;I=Editor.updateCRC(I,v,0,4);I=Editor.updateCRC(I,G,0,G.length);M+=V(G.length)+v+G+V(I^4294967295);M+=k.substring(W-8,k.length);break}M+=k.substring(W-8,W-4+X);P(k,X);P(k,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";+M&&M(ua)}}))}catch(wa){null!=M&&M(wa)}}),G,Z)}catch(pa){null!=M&&M(pa)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var y=q,x=0;8>x;x++)y=1==(y&1)?3988292384^y>>>1:y>>>1,Editor.crcTable[q]=y;Editor.updateCRC=function(k,v,G,I){for(var M=0;M<I;M++)k=Editor.crcTable[(k^v.charCodeAt(G+M))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,G=0;G<k.length;G++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(G))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,G,I,M){function N(Z,Y){var ba=+W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=N(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var W=0;if(N(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=M&&M();else if(N(k,4),"IHDR"!=N(k,4))null!=M&&M();else{N(k,17);M=k.substring(0,W);do{var X=S(k);if("IDAT"==N(k,4)){M=k.substring(0,+W-8);"pHYs"==v&&"dpi"==G?(G=Math.round(I/.0254),G=V(G)+V(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+I;I=4294967295;I=Editor.updateCRC(I,v,0,4);I=Editor.updateCRC(I,G,0,G.length);M+=V(G.length)+v+G+V(I^4294967295);M+=k.substring(W-8,k.length);break}M+=k.substring(W-8,W-4+X);N(k,X);N(k,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var D=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var J=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var G=null;null!=k.editor.graph.getModel().getParent(v)?G=v.getId():null!=k.currentPage&&(G=k.currentPage.getId());return G});if(null!=window.StyleFormatPanel){var K=Format.prototype.init;Format.prototype.init=function(){K.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var L=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?L.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var Q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=Q.apply(this,arguments);var v=this.editorUi,G=v.editor.graph;if(G.isEnabled()){var I=v.getCurrentFile();null!=I&&I.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(S){v.editor.setAutosave(S);v.editor.autosave&&I.isModified()&&I.fileChanged()},{install:function(S){this.listener=function(){S(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&G.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return G.mathEnabled},function(S){v.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(G.mathEnabled)};v.addListener("mathEnabledChanged",-this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(M);if(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var P=v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");P.style.position="absolute";P.style.left="85%";M.appendChild(P)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",+this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(M);if(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var N=v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");N.style.position="absolute";N.style.left="85%";M.appendChild(N)}}return k};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,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize",@@ -12889,31 +12889,31 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispNamestroke:"#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(k,v,G,I){if(null!=v){var M=mxUtils.bind(this,function(S){if(null!=S)if(G)for(var V=0;V<S.length;V++){if("function"!==typeof S[V].isVisible||S[V].isVisible(I,this))v[S[V].name]=S[V]}else for(var W in v){var X=!1;for(V=0;V<S.length;V++)if(S[V].name==W&&S[V].type==v[W].type){X=!0;break}X||delete v[W]}}),P=this.editorUi.editor.graph.view.getState(k);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],-P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),M(P.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{M(JSON.parse(k))}catch(S){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&+function(k,v,G,I){if(null!=v){var M=mxUtils.bind(this,function(S){if(null!=S)if(G)for(var V=0;V<S.length;V++){if("function"!==typeof S[V].isVisible||S[V].isVisible(I,this))v[S[V].name]=S[V]}else for(var W in v){var X=!1;for(V=0;V<S.length;V++)if(S[V].name==W&&S[V].type==v[W].type){X=!0;break}X||delete v[W]}}),N=this.editorUi.editor.graph.view.getState(k);null!=N&&null!=N.shape&&(N.shape.commonCustomPropAdded||(N.shape.commonCustomPropAdded=!0,N.shape.customProperties=N.shape.customProperties||[],+N.cell.vertex?Array.prototype.push.apply(N.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(N.shape.customProperties,Editor.commonEdgeProperties)),M(N.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{M(JSON.parse(k))}catch(S){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var v={},G=k.vertices,I=k.edges,M=0;M<G.length;M++)this.findCommonProperties(G[M],v,0==M,k);for(M=0;M<I.length;M++)this.findCommonProperties(I[M],v,0==G.length&&0==M,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(v).length&&this.container.appendChild(this.addProperties(this.createPanel(),v,k))}};var e=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);e.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,G,I){function M(ja,oa,ma,Aa,sa){if(null!=ma.valueChanged)ma.valueChanged(oa,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ia=[];if(null!=ma.index){for(var xa=[],Ba=ma.parentRow.nextSibling;Ba&&Ba.getAttribute("data-pName")==ja;)xa.push(Ba.getAttribute("data-pValue")),Ba=Ba.nextSibling;ma.index<xa.length?null!=Aa?xa.splice(Aa,1):xa[ma.index]=oa:xa.push(oa);null!=ma.size&&xa.length>ma.size&&(xa=xa.slice(0,ma.size));oa=xa.join(",");null!=ma.countProperty&&(ba.setCellStyles(ma.countProperty,xa.length,ba.getSelectionCells()),sa.push(ma.countProperty),Ia.push(xa.length))}ba.setCellStyles(ja,oa,ba.getSelectionCells());sa.push(ja);Ia.push(oa);if(null!=ma.dependentProps)for(ja=0;ja<ma.dependentProps.length;ja++){var Fa=ma.dependentPropsDefVal[ja],La=ma.dependentPropsVals[ja];if(La.length>oa)La=La.slice(0,oa);else for(var za=La.length;za<oa;za++)La.push(Fa);La=La.join(",");ba.setCellStyles(ma.dependentProps[ja],La,ba.getSelectionCells());sa.push(ma.dependentProps[ja]);Ia.push(La)}if("function"==typeof ma.onChange)ma.onChange(ba,oa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ia,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}-function P(ja,oa,ma){var Aa=mxUtils.getOffset(k,!0),sa=mxUtils.getOffset(ja,!0);oa.style.position="absolute";oa.style.left=sa.x-Aa.x+"px";oa.style.top=sa.y-Aa.y+"px";oa.style.width=ja.offsetWidth+"px";oa.style.height=ja.offsetHeight-(ma?4:0)+"px";oa.style.zIndex=5}function S(ja,oa,ma){function Aa(Ia){if(null==Ia||Ia==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ia)sa.style.background="";else{var xa=mxUtils.getLightDarkColor(Ia);mxUtils.isLightDarkColor(Ia)&&+function N(ja,oa,ma){var Aa=mxUtils.getOffset(k,!0),sa=mxUtils.getOffset(ja,!0);oa.style.position="absolute";oa.style.left=sa.x-Aa.x+"px";oa.style.top=sa.y-Aa.y+"px";oa.style.width=ja.offsetWidth+"px";oa.style.height=ja.offsetHeight-(ma?4:0)+"px";oa.style.zIndex=5}function S(ja,oa,ma){function Aa(Ia){if(null==Ia||Ia==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ia)sa.style.background="";else{var xa=mxUtils.getLightDarkColor(Ia);mxUtils.isLightDarkColor(Ia)&&xa.light!=xa.dark?sa.style.background="linear-gradient(to right bottom, "+xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":sa.style.background=Ia}}var sa=document.createElement("div");sa.style.width="32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Aa(oa);btn=mxUtils.button("",mxUtils.bind(Y,function(Ia){this.editorUi.pickColor(oa,function(xa){M(ja,xa,ma);Aa(xa)});mxEvent.consume(Ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function V(ja,oa,ma,Aa,sa,Ia,xa){null!=oa&&(oa=oa.split(","),ea.push({name:ja,values:oa,type:ma,defVal:Aa,countProperty:sa,parentRow:Ia,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ba){for(var Fa=Ia,La=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==ja)Fa=Fa.nextSibling,La++;else break;var za={type:ma,parentRow:Ia,index:La,isDeletable:!0,defVal:Aa,countProperty:sa};La=Z(ja,"",za,0==La%2,xa);M(ja,Aa,za);Fa.parentNode.insertBefore(La,Fa.nextSibling);mxEvent.consume(Ba)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function W(ja,oa,ma,Aa,sa,Ia,xa){if(0<sa){var Ba=Array(sa);oa=null!=oa?oa.split(","):[];for(var Fa=0;Fa<sa;Fa++)Ba[Fa]=null!=oa[Fa]?oa[Fa]:null!=Aa?Aa:"";ea.push({name:ja,values:Ba,type:ma,defVal:Aa,parentRow:Ia,flipBkg:xa,size:sa})}return document.createElement("div")}function X(ja,oa,ma){var Aa=document.createElement("input");Aa.type="checkbox";Aa.checked="1"==oa;mxEvent.addListener(Aa,"change",function(){M(ja,Aa.checked?"1":"0",ma)});return Aa}function Z(ja,oa,ma,Aa,sa){var Ia=ma.dispName,xa=ma.type,Ba=document.createElement("tr");Ba.className="gePropRow"+(sa?"Dark":"")+(Aa?"Alt":"")+" gePropNonHeaderRow";Ba.setAttribute("data-pName",ja);Ba.setAttribute("data-pValue",oa);Aa=!1;null!=ma.index&&(Ba.setAttribute("data-index",ma.index),Ia=(null!=Ia?Ia:"")+"["+ma.index+"]",Aa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";Ia=mxResources.get(Ia,null,Ia);mxUtils.write(Fa,Ia);Fa.setAttribute("title",Ia);Aa&&(Fa.style.textAlign="right");Ba.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";Fa.setAttribute("title",null!=oa?oa:mxResources.get("none"));if("color"==xa)Fa.appendChild(S(ja,oa,ma));else if("bool"==xa||"boolean"==xa)Fa.appendChild(X(ja,oa,ma));else if("enum"==xa){var La=ma.enumList;for(sa=0;sa<La.length;sa++)if(Ia=La[sa],-Ia.val==oa){mxUtils.write(Fa,mxResources.get(Ia.dispName,null,Ia.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){var za=document.createElement("select"),Da=null;P(Fa,za);for(var Ja=0;Ja<La.length;Ja++){var Ra=La[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));za.appendChild(Sa);null==Ra.val&&(Sa.value="null",Da=Sa)}za.value=null==oa&&null!=Da?"null":oa;k.appendChild(za);mxEvent.addListener(za,+Ia.val==oa){mxUtils.write(Fa,mxResources.get(Ia.dispName,null,Ia.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){var za=document.createElement("select"),Da=null;N(Fa,za);for(var Ja=0;Ja<La.length;Ja++){var Ra=La[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));za.appendChild(Sa);null==Ra.val&&(Sa.value="null",Da=Sa)}za.value=null==oa&&null!=Da?"null":oa;k.appendChild(za);mxEvent.addListener(za,"change",function(){var ab=mxUtils.htmlEntities(za.value);if(za[za.selectedIndex]==Da||"null"==ab.value)ab=null;M(ja,ab,ma)});za.focus();mxEvent.addListener(za,"blur",function(){k.removeChild(za)})}))}else"dynamicArr"==xa?Fa.appendChild(V(ja,oa,ma.subType,ma.subDefVal,ma.countProperty,Ba,sa)):"staticArr"==xa?Fa.appendChild(W(ja,oa,ma.subType,ma.subDefVal,ma.size,Ba,sa)):"readOnly"==xa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=oa,sa.style.borderWidth="0px","id"==ja?(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ba.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",oa),Ba.firstChild.appendChild(sa)):(sa.style.width="96px",Fa.appendChild(sa))):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(oa)),mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){function za(){var Ja=Da.value;Ja=0==Ja.length&&"string"!=xa&&"numbers"!=xa?0:Ja;ma.allowAuto&&-(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",xa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ma.min&&Ja<ma.min?Ja=ma.min:null!=ma.max&&Ja>ma.max&&(Ja=ma.max);var Ra=null;try{Ra="numbers"==xa?Ja.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(Ja):Ja)+"")}catch(Sa){}M(ja,Ra,ma,null,Da)}var Da=document.createElement("input");P(Fa,Da,!0);Da.value=decodeURIComponent(oa);Da.className="gePropEditor";"int"!=xa&&"float"!=xa||ma.allowAuto||(Da.type="number",+(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",xa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ma.min&&Ja<ma.min?Ja=ma.min:null!=ma.max&&Ja>ma.max&&(Ja=ma.max);var Ra=null;try{Ra="numbers"==xa?Ja.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(Ja):Ja)+"")}catch(Sa){}M(ja,Ra,ma,null,Da)}var Da=document.createElement("input");N(Fa,Da,!0);Da.value=decodeURIComponent(oa);Da.className="gePropEditor";"int"!=xa&&"float"!=xa||ma.allowAuto||(Da.type="number",Da.step="int"==xa?"1":"any",null!=ma.min&&(Da.min=parseFloat(ma.min)),null!=ma.max&&(Da.max=parseFloat(ma.max)));k.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ja){13==Ja.keyCode&&za()});Da.focus();mxEvent.addListener(Da,"blur",function(){za()})})));ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(za){M(ja,"",ma,ma.index);mxEvent.consume(za)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Fa.appendChild(sa));Ba.appendChild(Fa);return Ba}var Y=this,ba=this.editorUi.editor.graph,ea=[];k.style.position="relative";k.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var oa="none";for(var ma=k.childNodes.length-1;0<=ma;ma--)try{var Aa=k.childNodes[ma],sa=Aa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||k.removeChild(Aa)}catch(Ia){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",oa="";for(ma=0;ma<ja.length;ma++)ja[ma].style.display=oa};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ha=document.createElement("th");ha.className="gePropHeaderCell";ha.style.paddingLeft="4px";mxUtils.write(ha,mxResources.get("value"));fa.appendChild(ha);ca.appendChild(fa);var pa=ha=!1;fa=null;1==G.vertices.length&&0==G.edges.length?fa=G.vertices[0].id:0==G.vertices.length&&1==G.edges.length&&(fa=G.edges[0].id);null==fa||I||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),{dispName:"id",type:"readOnly"},!0,!1));for(var na in v)if(I=v[na],"function"!=typeof I.isVisible||I.isVisible(G,this)){var ia=null!=I.getValue?I.getValue():null!=G.style[na]?mxUtils.htmlEntities(G.style[na]+""):null!=I.getDefaultValue?I.getDefaultValue(G,this):I.defVal;if("separator"==I.type)pa=!pa;else{if("staticArr"==I.type)I.size=parseInt(G.style[I.sizeProperty]||v[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){var wa=I.dependentProps,ua=[],va=[];for(fa=0;fa<wa.length;fa++){var Ca=G.style[wa[fa]];va.push(v[wa[fa]].subDefVal);ua.push(null!=Ca?Ca.split(","):[])}I.dependentPropsDefVal=va;I.dependentPropsVals=ua}ca.appendChild(Z(na,ia,I,ha,pa));ha=!ha}}for(fa=0;fa<ea.length;fa++)for(I=ea[fa],v=I.parentRow,G=0;G<I.values.length;G++)na=Z(I.name,I.values[G],{type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:G,defVal:I.defVal,countProperty:I.countProperty,size:I.size},0==G%2,I.flipBkg),v.parentNode.insertBefore(na,v.nextSibling),v=na;k.appendChild(ca);da();return k};-StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},G=this.editorUi,I=G.editor.graph,M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.paddingLeft="24px";M.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(M);var P=document.createElement("div");-P.style.whiteSpace="nowrap";P.style.position="relative";P.style.textAlign="center";P.style.width="210px";for(var S=[],V=0;V<this.defaultColorSchemes.length;V++){var W=document.createElement("div");W.style.display="inline-block";W.style.width="6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",-mxUtils.bind(this,function(){X(ea)}))})(V);S.push(W);P.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(I.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=+StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},G=this.editorUi,I=G.editor.graph,M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.paddingLeft="24px";M.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(M);var N=document.createElement("div");+N.style.whiteSpace="nowrap";N.style.position="relative";N.style.textAlign="center";N.style.width="210px";for(var S=[],V=0;V<this.defaultColorSchemes.length;V++){var W=document.createElement("div");W.style.display="inline-block";W.style.width="6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",+mxUtils.bind(this,function(){X(ea)}))})(V);S.push(W);N.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(I.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";I.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ha=mxUtils.button("",mxUtils.bind(this,function(ia){I.getModel().beginUpdate();try{for(var wa=G.getSelectionState().cells,ua=0;ua<wa.length;ua++){var va=I.getModel().getStyle(wa[ua]);null!=da?(mxEvent.isShiftDown(ia)||(va=""==da.fill||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,da.fill),va=""==da.gradient||null==da.gradient?mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ia)||mxClient.IS_MAC&&mxEvent.isMetaDown(ia)||!I.getModel().isVertex(wa[ua])||(va=""==da.font||null==da.font?mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ia)||(va=""==da.stroke||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,da.stroke))):(va=mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(wa[ua])&&@@ -12923,21 +12923,21 @@ ua=0;ua<wa.length;ua++){var va=I.getModel().getStyle(wa[ua]);null!=da?(mxEvent.ina;ha.style.borderRadius="0";M.appendChild(ha);null!=da&&null!=da.gradient&&(pa=ha.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",M.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ha.click()}))});M.innerText="";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(M),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);V=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+V+"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(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+V+"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&&(k.appendChild(Y),k.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));v(Y);v(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(P)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+1<this.defaultColorSchemes.length&&(k.appendChild(Y),k.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));v(Y);v(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(N)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,v){var G=Graph.fontMapping[v];null==G&&Graph.isCssFontUrl(v)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(v))):(null==G&&(G='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+v+'");\n}'),k=document.createElement("style"),mxUtils.write(k,G));return k};Graph.addRecentCustomFont=function(k,v){};Graph.addFont=function(k,v,G){if(null!=k&&0<k.length&&null!=v&&0<v.length){var I=k.toLowerCase();if("helvetica"!=I&&"arial"!=k&&"sans-serif"!=I){var M=Graph.customFontElements[I];null!=M&&M.url!=v&&(M.elt.parentNode.removeChild(M.elt),M=null);null==M?(M=v,"http:"==v.substring(0,5)&&(M=PROXY_URL+"?url="+encodeURIComponent(v)),M={name:k,url:v,elt:Graph.createFontElement(k,M)},Graph.customFontElements[I]=M,v=document.getElementsByTagName("head")[0],null!=G&&("link"==M.elt.nodeName.toLowerCase()?(M.elt.onload=G,M.elt.onerror=G):G()),null!=v&&v.appendChild(M.elt)):null!=G&&G()}else null!=G&&G()}else null!=G&&G();return k};Graph.getFontUrl=function(k,v){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(v=k.url);return v};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var v=0;v<k.length;v++){var G=k[v].getAttribute("data-font-src");if(null!=G){var I="FONT"==k[v].nodeName?k[v].getAttribute("face"):k[v].style.fontFamily;null!=I&&Graph.addFont(I,G)}}};Graph.processFontStyle=function(k){if(null!=k){var v=mxUtils.getValue(k,"fontSource",null);if(null!=v){var G=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=G)try{Graph.addFont(G,decodeURIComponent(v))}catch(I){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var f=Graph.prototype.init;Graph.prototype.init=function(){function k(M){v=M}f.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var v=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(M){v=null});this.isMouseInsertPoint=function(){return null!=-v};var G=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):G.apply(this,arguments)};var I=this.layoutManager.getLayout;this.layoutManager.getLayout=function(M){var P=this.graph.getCellStyle(M);if(null!=P&&"rack"==P.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=P.marginLeft||0;S.marginRight=P.marginRight||0;S.marginTop=-P.marginTop||0;S.marginBottom=P.marginBottom||0;S.allowGaps=P.allowGaps||0;S.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return I.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(p.apply(this,arguments))};var n=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,G,I,M,P,S,V,W,X,-Z,Y){n.apply(this,arguments);Graph.processFontAttributes(Y)};var t=mxText.prototype.redraw;mxText.prototype.redraw=function(){t.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,G,I){function M(){for(var fa=V.getSelectionCells(),aa=[],da=0;da<fa.length;da++)V.isCellVisible(fa[da])&&aa.push(fa[da]);V.setSelectionCells(aa)}function P(fa){V.setHiddenTags(fa?[]:W.slice());M();V.refresh()}function S(fa,+v};var G=this.getInsertPoint;this.getInsertPoint=function(){return null!=v?this.getPointForEvent(v):G.apply(this,arguments)};var I=this.layoutManager.getLayout;this.layoutManager.getLayout=function(M){var N=this.graph.getCellStyle(M);if(null!=N&&"rack"==N.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=N.rackUnitSize?parseFloat(N.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=N.marginLeft||0;S.marginRight=N.marginRight||0;S.marginTop=+N.marginTop||0;S.marginBottom=N.marginBottom||0;S.allowGaps=N.allowGaps||0;S.horizontal="1"==mxUtils.getValue(N,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return I.apply(this,arguments)};this.updateGlobalUrlVariables()};var p=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,v){return Graph.processFontStyle(p.apply(this,arguments))};var n=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,v,G,I,M,N,S,V,W,X,+Z,Y){n.apply(this,arguments);Graph.processFontAttributes(Y)};var t=mxText.prototype.redraw;mxText.prototype.redraw=function(){t.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,v,G,I){function M(){for(var fa=V.getSelectionCells(),aa=[],da=0;da<fa.length;da++)V.isCellVisible(fa[da])&&aa.push(fa[da]);V.setSelectionCells(aa)}function N(fa){V.setHiddenTags(fa?[]:W.slice());M();V.refresh()}function S(fa,aa){Z.innerText="";if(0<fa.length){var da=document.createElement("table");da.setAttribute("cellpadding","2");da.style.boxSizing="border-box";da.style.tableLayout="fixed";da.style.width="100%";var ha=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var pa=0;pa<fa.length;pa++)(function(na){function ia(){var oa=V.getCellsForTags([na],null,null,!0);V.isEnabled()?V.setSelectionCells(oa):V.highlightCells(oa,null,null,70)}var wa=0>mxUtils.indexOf(V.hiddenTags,na),ua=document.createElement("tr"),va=document.createElement("td");va.style.align="center";va.style.width="16px";var Ca=document.createElement("img");Ca.setAttribute("src",wa?Editor.visibleImage:Editor.hiddenImage);Ca.setAttribute("title",mxResources.get(wa?"hideIt":"show",[na]));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter="invert(100%)";va.appendChild(Ca);mxEvent.addListener(Ca,"click",function(oa){mxEvent.isShiftDown(oa)?-P(0<=mxUtils.indexOf(V.hiddenTags,na)):(V.toggleHiddenTag(na),M(),V.refresh());mxEvent.consume(oa)});ua.appendChild(va);va=document.createElement("td");va.style.align="center";va.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.selectImage);Ca.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter=-"invert(100%)";mxEvent.addListener(Ca,"click",function(oa){P(!0);ia();mxEvent.consume(oa)});va.appendChild(Ca);ua.appendChild(va);va=document.createElement("td");va.style.overflow="hidden";va.style.whiteSpace="nowrap";va.style.textOverflow="ellipsis";va.style.verticalAlign="middle";va.style.cursor="pointer";va.setAttribute("title",na);a=document.createElement("a");mxUtils.write(a,na);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,wa?100:40);va.appendChild(a);mxEvent.addListener(va,-"click",function(oa){if(mxEvent.isShiftDown(oa))P(!0),ia();else if(wa&&0<V.hiddenTags.length)P(!0);else{var ma=W.slice(),Aa=mxUtils.indexOf(ma,na);ma.splice(Aa,1);V.setHiddenTags(ma);M();V.refresh()}mxEvent.consume(oa)});ua.appendChild(va);if(V.isEnabled()){va=document.createElement("td");va.style.verticalAlign="middle";va.style.textAlign="center";va.style.width="18px";if(null==aa){va.style.align="center";va.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.trashImage);+N(0<=mxUtils.indexOf(V.hiddenTags,na)):(V.toggleHiddenTag(na),M(),V.refresh());mxEvent.consume(oa)});ua.appendChild(va);va=document.createElement("td");va.style.align="center";va.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.selectImage);Ca.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter=+"invert(100%)";mxEvent.addListener(Ca,"click",function(oa){N(!0);ia();mxEvent.consume(oa)});va.appendChild(Ca);ua.appendChild(va);va=document.createElement("td");va.style.overflow="hidden";va.style.whiteSpace="nowrap";va.style.textOverflow="ellipsis";va.style.verticalAlign="middle";va.style.cursor="pointer";va.setAttribute("title",na);a=document.createElement("a");mxUtils.write(a,na);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,wa?100:40);va.appendChild(a);mxEvent.addListener(va,+"click",function(oa){if(mxEvent.isShiftDown(oa))N(!0),ia();else if(wa&&0<V.hiddenTags.length)N(!0);else{var ma=W.slice(),Aa=mxUtils.indexOf(ma,na);ma.splice(Aa,1);V.setHiddenTags(ma);M();V.refresh()}mxEvent.consume(oa)});ua.appendChild(va);if(V.isEnabled()){va=document.createElement("td");va.style.verticalAlign="middle";va.style.textAlign="center";va.style.width="18px";if(null==aa){va.style.align="center";va.style.width="16px";Ca=document.createElement("img");Ca.setAttribute("src",Editor.trashImage);Ca.setAttribute("title",mxResources.get("removeIt",[na]));mxUtils.setOpacity(Ca,wa?75:25);Ca.className="geAdaptiveAsset";Ca.style.verticalAlign="middle";Ca.style.cursor="pointer";Ca.style.width="16px";if(v||Editor.isDarkMode())Ca.style.filter="invert(100%)";mxEvent.addListener(Ca,"click",function(oa){var ma=mxUtils.indexOf(W,na);0<=ma&&W.splice(ma,1);V.removeTagsForCells(V.model.getDescendants(V.model.getRoot()),[na]);V.refresh();mxEvent.consume(oa)});va.appendChild(Ca)}else{var ja=document.createElement("input");ja.setAttribute("type","checkbox");ja.style.margin="0px";ja.defaultChecked=null!=aa&&0<=mxUtils.indexOf(aa,na);ja.checked=ja.defaultChecked;ja.style.background="transparent";ja.setAttribute("title",mxResources.get(ja.defaultChecked?"removeIt":"add",[na]));mxEvent.addListener(ja,"change",function(oa){ja.checked?V.addTagsForCells(V.getSelectionCells(),[na]):V.removeTagsForCells(V.getSelectionCells(),[na]);mxEvent.consume(oa)});va.appendChild(ja)}ua.appendChild(va)}ha.appendChild(ua)})(fa[pa]);da.appendChild(ha);Z.appendChild(da)}}var V=this,W=V.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);V.addListener(mxEvent.ROOT,function(){W=V.hiddenTags.slice()});@@ -12945,37 +12945,37 @@ var Y=mxUtils.bind(this,function(fa,aa){if(k()){fa=V.getAllTags();for(aa=0;aa<fa"0px";ba.style.right="0px";ba.style.height="26px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(V.isEnabled()){Z.style.bottom="34px";var ea=document.createElement("a");ea.className="geToolbarButton geAdaptiveAsset geToggleItem";ea.style.width="16px";ea.style.height="18px";ea.style.backgroundPosition="center center";ea.style.backgroundRepeat="no-repeat";ea.style.backgroundSize="20px";ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(fa){V.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=V.hiddenTags.slice());M();V.refresh();mxEvent.consume(fa)});ba.appendChild(ca);null!=G&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),mxEvent.addListener(ea,"click",function(fa){G(W,function(aa){W=aa;Y()});mxEvent.consume(fa)}),ba.appendChild(ea));X.appendChild(ba)}null!=I&&ba.appendChild(I);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var G=Graph.customFontElements[v];k.push({name:G.name,url:G.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var G=Editor.guid();document.execCommand("fontname",!1,G);for(var I=-this.cellEditor.textarea.getElementsByTagName("font"),M=!1,P=0;P<I.length;P++)I[P].getAttribute("face")==G&&(M=!0,I[P].setAttribute("face",k),null!=v?I[P].setAttribute("data-font-src",v):I[P].removeAttribute("data-font-src"));M||document.execCommand("fontname",!1,k)};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;+this.cellEditor.textarea.getElementsByTagName("font"),M=!1,N=0;N<I.length;N++)I[N].getAttribute("face")==G&&(M=!0,I[N].setAttribute("face",k),null!=v?I[N].setAttribute("data-font-src",v):I[N].removeAttribute("data-font-src"));M||document.execCommand("fontname",!1,k)};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var E=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=E.apply(this,arguments);-null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,G,I,M,P,S,V,W,X,Z,Y,ba,ea,ca,fa){var aa=C.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");+null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,G,I,M,N,S,V,W,X,Z,Y,ba,ea,ca,fa){var aa=C.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");null==da&&(da="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ha=this.getCustomFonts();if(Z&&0<ha.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var na="",ia="",wa=0;wa<ha.length;wa++){var ua=ha[wa].name,va=ha[wa].url;Graph.isCssFontUrl(va)?na+="@import url("+Graph.rewriteGoogleFontUrl(va)+");\n":ia+='@font-face {\nfont-family: "'+ua+'";\nsrc: url("'+va+'");\n}\n'}da.appendChild(pa.createTextNode(na+ia));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),null!=da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var F=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){F.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=0};var U=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return U.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var G=k.view.scale,I=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?-new mxRectangle(k.x+k.width-4*G,k.y+4*G,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==I&&v.scale==G||(v.bounds=k,v.value=I,v.scale=G,v.redraw())}};var O=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();O.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var N=-Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){N.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,G){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 I=!1,M=0,P=0,S=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,function(){I&&(I=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(P<k.length){var Z=this.stoppingCustomActions,Y=k[P++],ba=[];if(null!=Y.open)if(V(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,+new mxRectangle(k.x+k.width-4*G,k.y+4*G,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==I&&v.scale==G||(v.bounds=k,v.value=I,v.scale=G,v.redraw())}};var P=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();P.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var O=+Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){O.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,G){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 I=!1,M=0,N=0,S=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,function(){I&&(I=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(N<k.length){var Z=this.stoppingCustomActions,Y=k[N++],ba=[];if(null!=Y.open)if(V(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,G))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),M++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),V());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),1);this.setCellsVisible(ea,!0)}null!=Y.hide&&(S(),ea=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ea=[];null!=Y.select&&this.isEnabled()&&(ea=this.getCellsForAction(Y.select),this.setSelectionCells(ea));null!=Y.highlight&&(ea=this.getCellsForAction(Y.highlight),this.highlightCells(ea,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(ea=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);null!=G&&null!=Y.explore&&Graph.exploreFromCell(this,G,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ca=Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var fa=this.getAllTags();for(ea=0;ea<fa.length;ea++)0>mxUtils.indexOf(Y.tags.visible,fa[ea])&&0>mxUtils.indexOf(ca,fa[ea])&&ca.push(fa[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(M++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==M?X():V()}else this.stoppingCustomActions=-this.executingCustomActions=!1,V(),null!=v&&v()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var G=this.getLinkForCell(v);null!=G&&"data:action/json,"==G.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,G));if(this.isHtmlLabel(v)){var I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var M=I.getElementsByTagName("a"),P=!1,S=0;S<M.length;S++)G=M[S].getAttribute("href"),null!=G&&"data:action/json,"==G.substring(0,17)&&(M[S].setAttribute("href",-this.updateCustomLink(k,G)),P=!0);P&&this.labelChanged(v,I.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var G=JSON.parse(v.substring(17));null!=G.actions&&(this.updateCustomLinkActions(k,G.actions),v="data:action/json,"+JSON.stringify(G))}catch(I){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var G=0;G<v.length;G++){var I=v[G],M;for(M in I)this.updateCustomLinkAction(k,I[M],"cells"),this.updateCustomLinkAction(k,I[M],-"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,G){if(null!=v&&null!=v[G]){for(var I=[],M=0;M<v[G].length;M++)if("*"==v[G][M])I.push(v[G][M]);else{var P=k[v[G][M]];null!=P?""!=P&&I.push(P):I.push(v[G][M])}v[G]=I}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,v));if(null!=k.excludeCells){for(var G=[],I=0;I<v.length;I++)0>k.excludeCells.indexOf(v[I].id)&&G.push(v[I]);v=G}return v};Graph.prototype.getCellsById=-function(k){var v=[];if(null!=k)for(var G=0;G<k.length;G++)if("*"==k[G]){var I=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(P){return P!=I},I))}else{var M=this.model.getCell(k[G]);null!=M&&v.push(M)}return v};var m=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return m.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};+this.executingCustomActions=!1,V(),null!=v&&v()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,v){var G=this.getLinkForCell(v);null!=G&&"data:action/json,"==G.substring(0,17)&&this.setLinkForCell(v,this.updateCustomLink(k,G));if(this.isHtmlLabel(v)){var I=document.createElement("div");I.innerHTML=Graph.sanitizeHtml(this.getLabel(v));for(var M=I.getElementsByTagName("a"),N=!1,S=0;S<M.length;S++)G=M[S].getAttribute("href"),null!=G&&"data:action/json,"==G.substring(0,17)&&(M[S].setAttribute("href",+this.updateCustomLink(k,G)),N=!0);N&&this.labelChanged(v,I.innerHTML)}};Graph.prototype.updateCustomLink=function(k,v){if("data:action/json,"==v.substring(0,17))try{var G=JSON.parse(v.substring(17));null!=G.actions&&(this.updateCustomLinkActions(k,G.actions),v="data:action/json,"+JSON.stringify(G))}catch(I){}return v};Graph.prototype.updateCustomLinkActions=function(k,v){for(var G=0;G<v.length;G++){var I=v[G],M;for(M in I)this.updateCustomLinkAction(k,I[M],"cells"),this.updateCustomLinkAction(k,I[M],+"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,v,G){if(null!=v&&null!=v[G]){for(var I=[],M=0;M<v[G].length;M++)if("*"==v[G][M])I.push(v[G][M]);else{var N=k[v[G][M]];null!=N?""!=N&&I.push(N):I.push(v[G][M])}v[G]=I}};Graph.prototype.getCellsForAction=function(k,v){v=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,v));if(null!=k.excludeCells){for(var G=[],I=0;I<v.length;I++)0>k.excludeCells.indexOf(v[I].id)&&G.push(v[I]);v=G}return v};Graph.prototype.getCellsById=+function(k){var v=[];if(null!=k)for(var G=0;G<k.length;G++)if("*"==k[G]){var I=this.model.getRoot();v=v.concat(this.model.filterDescendants(function(N){return N!=I},I))}else{var M=this.model.getCell(k[G]);null!=M&&v.push(M)}return v};var m=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return m.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var v=mxUtils.indexOf(this.hiddenTags,k);0>v?this.hiddenTags.push(k):0<=v&&this.hiddenTags.splice(v,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var v=0;v<k.length;v++)if(0>mxUtils.indexOf(this.hiddenTags,k[v]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,v,G,-I){var M=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var P=0,S={},V=0;V<k.length;V++)0<k[V].length&&(S[k[V]]=!0,P++);for(V=0;V<v.length;V++)if(G&&this.model.getParent(v[V])==this.model.root||this.model.isVertex(v[V])||this.model.isEdge(v[V])){var W=this.getTagsForCell(v[V]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=k.length)){for(var Z=X=0;Z<W.length&&X<P;Z++)null!=S[W[Z]]&&X++;X=X==P}X&&(1!=I||this.isCellVisible(v[V]))&&M.push(v[V])}}return M};Graph.prototype.getAllTags=-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,G=[],I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);G=[];if(0<M.length){M=M.split(" ");for(var P={},S=0;S<M.length;S++)if(null==v||null!=v[M[S]])P[M[S]]=!0,G.push(M[S]);v=P}else return[]}return G};Graph.prototype.getTagsForCells=function(k){for(var v=[],G={},I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);if(0<M.length){M=M.split(" ");for(var P=-0;P<M.length;P++)null==G[M[P]]&&(G[M[P]]=!0,v.push(M[P]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){for(var I=this.getTagsForCell(k[G]),M=I.split(" "),P=!1,S=0;S<v.length;S++){var V=mxUtils.trim(v[S]);""!=V&&0>mxUtils.indexOf(M,V)&&(I=0<I.length?I+" "+V:V,P=!0)}P&&this.setAttributeForCell(k[G],"tags",I)}}finally{this.model.endUpdate()}}};-Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){var I=this.getTagsForCell(k[G]);if(0<I.length){for(var M=I.split(" "),P=!1,S=0;S<v.length;S++){var V=mxUtils.indexOf(M,v[S]);0<=V&&(M.splice(V,1),P=!0)}P&&this.setAttributeForCell(k[G],"tags",M.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};-Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var G=0;G<k.length;G++)this.model.setVisible(k[G],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,G,I){for(var M=0;M<k.length;M++)this.highlightCell(k[M],v,G,I)};Graph.prototype.highlightCell=function(k,v,G,I,M){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;G=null!=G?G:1E3;k=this.view.getState(k);var P=null;null!=k&&(M=null!=M?M:4,M=Math.max(M+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,-1)+M),P=new mxCellHighlight(this,v,M,!1),null!=I&&(P.opacity=I),P.highlight(k),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},G));return P};Graph.prototype.addSvgShadow=function(k,v,G,I){G=null!=G?G:!1;I=null!=I?I:!0;var M=k.ownerDocument,P=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"filter"):M.createElement("filter");P.setAttribute("id",-this.shadowId);var S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):M.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");P.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feOffset"):M.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",-"offsetBlur");P.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feFlood"):M.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");P.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feComposite"):M.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");-S.setAttribute("result","offsetBlur");P.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feBlend"):M.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");P.appendChild(S);S=k.getElementsByTagName("defs");0==S.length?(M=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"defs"):M.createElement("defs"),null!=k.firstChild?k.insertBefore(M,k.firstChild):k.appendChild(M)):M=S[0];M.appendChild(P);G||(v=null!=v?v:k.getElementsByTagName("g")[0],-null!=v&&(v.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&I&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+6,h=parseFloat(v[3])+6,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(k,v){mxClient.IS_SVG&&!mxClient.IS_SF&&(v=+I){var M=[];if(null!=k){v=null!=v?v:this.model.getDescendants(this.model.getRoot());for(var N=0,S={},V=0;V<k.length;V++)0<k[V].length&&(S[k[V]]=!0,N++);for(V=0;V<v.length;V++)if(G&&this.model.getParent(v[V])==this.model.root||this.model.isVertex(v[V])||this.model.isEdge(v[V])){var W=this.getTagsForCell(v[V]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=k.length)){for(var Z=X=0;Z<W.length&&X<N;Z++)null!=S[W[Z]]&&X++;X=X==N}X&&(1!=I||this.isCellVisible(v[V]))&&M.push(v[V])}}return M};Graph.prototype.getAllTags=+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var v=null,G=[],I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);G=[];if(0<M.length){M=M.split(" ");for(var N={},S=0;S<M.length;S++)if(null==v||null!=v[M[S]])N[M[S]]=!0,G.push(M[S]);v=N}else return[]}return G};Graph.prototype.getTagsForCells=function(k){for(var v=[],G={},I=0;I<k.length;I++){var M=this.getTagsForCell(k[I]);if(0<M.length){M=M.split(" ");for(var N=+0;N<M.length;N++)null==G[M[N]]&&(G[M[N]]=!0,v.push(M[N]))}}return v};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){for(var I=this.getTagsForCell(k[G]),M=I.split(" "),N=!1,S=0;S<v.length;S++){var V=mxUtils.trim(v[S]);""!=V&&0>mxUtils.indexOf(M,V)&&(I=0<I.length?I+" "+V:V,N=!0)}N&&this.setAttributeForCell(k[G],"tags",I)}}finally{this.model.endUpdate()}}};+Graph.prototype.removeTagsForCells=function(k,v){if(0<k.length&&0<v.length){this.model.beginUpdate();try{for(var G=0;G<k.length;G++){var I=this.getTagsForCell(k[G]);if(0<I.length){for(var M=I.split(" "),N=!1,S=0;S<v.length;S++){var V=mxUtils.indexOf(M,v[S]);0<=V&&(M.splice(V,1),N=!0)}N&&this.setAttributeForCell(k[G],"tags",M.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var v=0;v<k.length;v++)this.model.setVisible(k[v],!this.model.isVisible(k[v]))}finally{this.model.endUpdate()}};+Graph.prototype.setCellsVisible=function(k,v){this.model.beginUpdate();try{for(var G=0;G<k.length;G++)this.model.setVisible(k[G],v)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,v,G,I){for(var M=0;M<k.length;M++)this.highlightCell(k[M],v,G,I)};Graph.prototype.highlightCell=function(k,v,G,I,M){v=null!=v?v:mxConstants.DEFAULT_VALID_COLOR;G=null!=G?G:1E3;k=this.view.getState(k);var N=null;null!=k&&(M=null!=M?M:4,M=Math.max(M+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,+1)+M),N=new mxCellHighlight(this,v,M,!1),null!=I&&(N.opacity=I),N.highlight(k),window.setTimeout(function(){null!=N.shape&&(mxUtils.setPrefixedStyle(N.shape.node.style,"transition","all 1200ms ease-in-out"),N.shape.node.style.opacity=0);window.setTimeout(function(){N.destroy()},1200)},G));return N};Graph.prototype.addSvgShadow=function(k,v,G,I){G=null!=G?G:!1;I=null!=I?I:!0;var M=k.ownerDocument,N=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"filter"):M.createElement("filter");N.setAttribute("id",+this.shadowId);var S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):M.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");N.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feOffset"):M.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",+"offsetBlur");N.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feFlood"):M.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");N.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feComposite"):M.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");+S.setAttribute("result","offsetBlur");N.appendChild(S);S=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"feBlend"):M.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");N.appendChild(S);S=k.getElementsByTagName("defs");0==S.length?(M=null!=M.createElementNS?M.createElementNS(mxConstants.NS_SVG,"defs"):M.createElement("defs"),null!=k.firstChild?k.insertBefore(M,k.firstChild):k.appendChild(M)):M=S[0];M.appendChild(N);G||(v=null!=v?v:k.getElementsByTagName("g")[0],+null!=v&&(v.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&I&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),v=k.getAttribute("viewBox"),null!=v&&0<v.length&&(v=v.split(" "),3<v.length&&(w=parseFloat(v[2])+6,h=parseFloat(v[3])+6,k.setAttribute("viewBox",v[0]+" "+v[1]+" "+w+" "+h))))));return N};Graph.prototype.setShadowVisible=function(k,v){mxClient.IS_SVG&&!mxClient.IS_SF&&(v=null!=v?v:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),v&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),v=0;do var G=this.model.getChildAt(this.model.root,v);while(v++<k&&"1"==mxUtils.getValue(this.getCellStyle(G),"locked","0"));null!=G&&this.setDefaultParent(G)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+@@ -12989,33 +12989,33 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT[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"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=-[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var u=mxMarker.createMarker;mxMarker.createMarker=function(k,v,G,I,M,P,S,V,W,X){if(null!=G&&null==mxMarker.markers[G]){var Z=this.getPackageForType(G);null!=Z&&mxStencilRegistry.getStencil(Z)}return u.apply(this,arguments)};var A=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,-v,G,I,M,P){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return A.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,G){function I(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function M(za){k.lastPrintPagesRadioChecked=Y.checked;k.lastPrintSelectionOnlyChecked=fa.checked;k.lastPrintCropRadioChecked=+[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var v=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?v="mxgraph.er":"sysML"==k.substring(0,5)&&(v="mxgraph.sysml"));return v};var u=mxMarker.createMarker;mxMarker.createMarker=function(k,v,G,I,M,N,S,V,W,X){if(null!=G&&null==mxMarker.markers[G]){var Z=this.getPackageForType(G);null!=Z&&mxStencilRegistry.getStencil(Z)}return u.apply(this,arguments)};var A=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,+v,G,I,M,N){"1"==mxUtils.getValue(v.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(v.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return A.apply(this,arguments)};PrintDialog.prototype.create=function(k,v,G){function I(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function M(za){k.lastPrintPagesRadioChecked=Y.checked;k.lastPrintSelectionOnlyChecked=fa.checked;k.lastPrintCropRadioChecked=da.checked;k.lastPrintFitRadioChecked=ha.checked;Y.checked&&ba.value<ea.value?(k.lastPrintPagesFromInput=ba.value,k.lastPrintPagesToInput=ea.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);sa.value=Math.max(1,Math.min(1600,parseInt(sa.value)))+"%";k.lastPrintZoom=sa.value;k.lastPrintBorder=Aa.value;k.lastPrintGrid=Ia.checked;k.lastPrintTransparent=xa.checked;k.lastPrintInclude=Ba.checked;k.lastPrintSheetsAcross=oa.value;k.lastPrintSheetsDown=ma.value;var Da={};Da.border=parseInt(Aa.value);-Da.scale=parseInt(sa.value)/100;Da.grid=Ia.checked;Da.transparent=xa.checked;Da.includeCopy=Ba.checked;Da.sheetsAcross=parseInt(oa.value);Da.sheetsDown=parseInt(ma.value);Da.pagesFrom=parseInt(ba.value);Da.pagesTo=parseInt(ea.value);Da.allPages=Z.checked;Da.selection=fa.checked;Da.pageView=aa.checked;Da.crop=da.checked;Da.fit=ha.checked;return null!=G?G(!za,Da):k.print(!za,Da)}var P=k.editor.graph,S=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign=+Da.scale=parseInt(sa.value)/100;Da.grid=Ia.checked;Da.transparent=xa.checked;Da.includeCopy=Ba.checked;Da.sheetsAcross=parseInt(oa.value);Da.sheetsDown=parseInt(ma.value);Da.pagesFrom=parseInt(ba.value);Da.pagesTo=parseInt(ea.value);Da.allPages=Z.checked;Da.selection=fa.checked;Da.pageView=aa.checked;Da.crop=da.checked;Da.fit=ha.checked;return null!=G?G(!za,Da):k.print(!za,Da)}var N=k.editor.graph,S=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";V.style.marginTop="0px";mxUtils.write(V,v||mxResources.get("print"));S.appendChild(V);var W=1,X=1;V=document.createElement("div");V.style.whiteSpace="nowrap";var Z=document.createElement("input");Z.style.marginRight="8px";Z.style.marginBottom="8px";Z.setAttribute("type","radio");Z.setAttribute("name","pages-printdialog");V.appendChild(Z);v=document.createElement("span");mxUtils.write(v,mxResources.get("allPages"));mxEvent.addListener(v,"click",function(){Z.checked=!0});V.appendChild(v);mxUtils.br(V);var Y=Z.cloneNode(!0);V.appendChild(Y);v=document.createElement("span");mxUtils.write(v,mxResources.get("pages")+":");V.appendChild(v);mxEvent.addListener(v,"click",function(){Y.checked=!0});var ba=document.createElement("input");ba.style.margin="0 4px";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="40px";V.appendChild(ba);v=document.createElement("span");mxUtils.write(v,mxResources.get("to"));V.appendChild(v);var ea=ba.cloneNode(!0);V.appendChild(ea);mxEvent.addListener(ba,"focus",function(){Y.checked=!0});mxEvent.addListener(ea,"focus",function(){Y.checked=!0});mxEvent.addListener(ba,"change",I);mxEvent.addListener(ea,"change",I);if(null!=k.pages&&(X=k.pages.length,null!=k.currentPage))for(var ca=0;ca<X;ca++)if(k.currentPage==k.pages[ca]){W=ca+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(ba.value=Math.min(X,Math.max(1,k.lastPrintPagesFromInput)),ea.value=Math.min(X,Math.max(1,k.lastPrintPagesToInput))):(ba.value=W,ea.value=W);ba.setAttribute("max",X);ea.setAttribute("max",X);ca=mxUtils.button(mxResources.get("currentPage"),function(za){ba.value=W;ea.value=W;Y.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";V.appendChild(ca);1<X&&S.appendChild(V);V=document.createElement("div");V.style.borderBottom="1px solid lightGray";V.style.paddingBottom="12px";-V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";P.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");P.isEnabled()&&(V.appendChild(fa),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),V.appendChild(v));(P.isEnabled()||1<X)&&S.appendChild(V);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?Y.checked=-!0:!P.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;P.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){fa.checked=!fa.checked});P=document.createElement("div");P.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");P.appendChild(aa);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));P.appendChild(v);-mxEvent.addListener(P,"click",function(){aa.checked=!0});S.appendChild(P);P=document.createElement("div");P.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");P.appendChild(da);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));P.appendChild(v);mxEvent.addListener(P,"click",function(){da.checked=!0});S.appendChild(P);P=document.createElement("div");-P.style.whiteSpace="nowrap";var ha=document.createElement("input");ha.style.marginBottom="8px";ha.style.marginRight="8px";ha.setAttribute("type","radio");ha.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ha);P.appendChild(v);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),-na=pa.cloneNode(!0),ia=document.createElement("td"),wa=ia.cloneNode(!0),ua=ia.cloneNode(!0),va=ia.cloneNode(!0),Ca=ia.cloneNode(!0),ja=ia.cloneNode(!0);ia.style.textAlign="right";va.style.textAlign="right";mxUtils.write(ia,mxResources.get("fitTo"));mxEvent.addListener(P,"click",function(za){mxEvent.getSource(za)!=ha&&(ha.checked=!ha.checked)});var oa=document.createElement("input");oa.style.margin="0 2px";oa.style.boxSizing="border-box";oa.setAttribute("value",k.lastPrintSheetsAcross||"1");oa.setAttribute("min",+V.style.marginBottom="12px";V.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";N.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");N.isEnabled()&&(V.appendChild(fa),v=document.createElement("span"),mxUtils.write(v,mxResources.get("selectionOnly")),V.appendChild(v));(N.isEnabled()||1<X)&&S.appendChild(V);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?Y.checked=+!0:!N.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;N.isSelectionEmpty()||mxEvent.addListener(v,"click",function(){fa.checked=!fa.checked});N=document.createElement("div");N.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");N.appendChild(aa);v=document.createElement("span");mxUtils.write(v,mxResources.get("pageView"));N.appendChild(v);+mxEvent.addListener(N,"click",function(){aa.checked=!0});S.appendChild(N);N=document.createElement("div");N.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");N.appendChild(da);v=document.createElement("span");mxUtils.write(v,mxResources.get("crop"));N.appendChild(v);mxEvent.addListener(N,"click",function(){da.checked=!0});S.appendChild(N);N=document.createElement("div");+N.style.whiteSpace="nowrap";var ha=document.createElement("input");ha.style.marginBottom="8px";ha.style.marginRight="8px";ha.setAttribute("type","radio");ha.setAttribute("name","printSize");v=document.createElement("div");v.style.display="inline-block";v.style.verticalAlign="top";v.style.paddingTop="2px";v.appendChild(ha);N.appendChild(v);V=document.createElement("table");V.style.display="inline-block";V.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),+na=pa.cloneNode(!0),ia=document.createElement("td"),wa=ia.cloneNode(!0),ua=ia.cloneNode(!0),va=ia.cloneNode(!0),Ca=ia.cloneNode(!0),ja=ia.cloneNode(!0);ia.style.textAlign="right";va.style.textAlign="right";mxUtils.write(ia,mxResources.get("fitTo"));mxEvent.addListener(N,"click",function(za){mxEvent.getSource(za)!=ha&&(ha.checked=!ha.checked)});var oa=document.createElement("input");oa.style.margin="0 2px";oa.style.boxSizing="border-box";oa.setAttribute("value",k.lastPrintSheetsAcross||"1");oa.setAttribute("min","1");oa.setAttribute("type","number");oa.style.width="40px";wa.appendChild(oa);v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsAcross"));ua.appendChild(v);mxUtils.write(va,mxResources.get("fitToBy"));var ma=oa.cloneNode(!0);ma.setAttribute("value",k.lastPrintSheetsDown||"1");Ca.appendChild(ma);mxEvent.addListener(oa,"click",function(za){ha.checked=!0;mxEvent.consume(za)});mxEvent.addListener(ma,"click",function(za){ha.checked=!0;mxEvent.consume(za)});k.lastPrintCropRadioChecked?-da.checked=!0:k.lastPrintFitRadioChecked?ha.checked=!0:aa.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));ja.appendChild(v);pa.appendChild(ia);pa.appendChild(wa);pa.appendChild(ua);na.appendChild(va);na.appendChild(Ca);na.appendChild(ja);ca.appendChild(pa);ca.appendChild(na);V.appendChild(ca);P.appendChild(V);S.appendChild(P);P=document.createElement("div");P.style.borderTop="1px solid lightGray";P.style.whiteSpace="nowrap";P.style.paddingTop="12px";-P.style.marginTop="12px";P.style.paddingLeft="8px";mxUtils.write(P,mxResources.get("borderWidth")+":");var Aa=document.createElement("input");Aa.setAttribute("type","number");Aa.setAttribute("min","0");Aa.style.width="40px";Aa.style.marginLeft="4px";Aa.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;P.appendChild(Aa);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");P.appendChild(v);var sa=document.createElement("input");-sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";P.appendChild(sa);mxUtils.br(P);var Ia=document.createElement("input");Ia.setAttribute("type","checkbox");Ia.style.marginTop="12px";Ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;P.appendChild(Ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));P.appendChild(v);mxEvent.addListener(v,"click",function(za){Ia.checked=!0;-mxEvent.consume(za)});var xa=document.createElement("input");xa.setAttribute("type","checkbox");xa.style.marginTop="10px";xa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=G&&(P.appendChild(xa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),P.appendChild(v),mxEvent.addListener(v,"click",function(za){xa.checked=!0;mxEvent.consume(za)}));var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");-Ba.style.marginTop="10px";Ba.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==G||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(P),P.appendChild(Ba),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),P.appendChild(v),mxEvent.addListener(v,"click",function(za){Ba.checked=!0;mxEvent.consume(za)}));S.appendChild(P);v=document.createElement("div");v.style.marginTop="40px";v.style.textAlign=-"right";v.style.whiteSpace="nowrap";k.isOffline()||null!=G||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));P=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});P.className="geBtn";k.editor.cancelFirst&&v.appendChild(P);PrintDialog.previewEnabled&&null==G&&(V=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),M(!1)}catch(za){k.handleError(za)}}),V.className="geBtn",v.appendChild(V));V=mxUtils.button(mxResources.get(null!=G?"export":-PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),M(!0)}catch(za){k.handleError(za)}});V.className="geBtn gePrimaryBtn";v.appendChild(V);k.editor.cancelFirst||v.appendChild(P);S.appendChild(v);if(k.editor.isChromelessView()){var Fa=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};k.addListener("darkModeChanged",Fa);Fa();var La=function(za,Da){za=Da.getProperty("dialog");S.parentNode==+da.checked=!0:k.lastPrintFitRadioChecked?ha.checked=!0:aa.checked=!0;v=document.createElement("span");mxUtils.write(v,mxResources.get("fitToSheetsDown"));ja.appendChild(v);pa.appendChild(ia);pa.appendChild(wa);pa.appendChild(ua);na.appendChild(va);na.appendChild(Ca);na.appendChild(ja);ca.appendChild(pa);ca.appendChild(na);V.appendChild(ca);N.appendChild(V);S.appendChild(N);N=document.createElement("div");N.style.borderTop="1px solid lightGray";N.style.whiteSpace="nowrap";N.style.paddingTop="12px";+N.style.marginTop="12px";N.style.paddingLeft="8px";mxUtils.write(N,mxResources.get("borderWidth")+":");var Aa=document.createElement("input");Aa.setAttribute("type","number");Aa.setAttribute("min","0");Aa.style.width="40px";Aa.style.marginLeft="4px";Aa.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;N.appendChild(Aa);v=document.createElement("span");v.style.marginLeft="8px";mxUtils.write(v,mxResources.get("zoom")+":");N.appendChild(v);var sa=document.createElement("input");+sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";N.appendChild(sa);mxUtils.br(N);var Ia=document.createElement("input");Ia.setAttribute("type","checkbox");Ia.style.marginTop="12px";Ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;N.appendChild(Ia);v=document.createElement("span");v.style.marginLeft="4px";v.style.marginRight="8px";mxUtils.write(v,mxResources.get("grid"));N.appendChild(v);mxEvent.addListener(v,"click",function(za){Ia.checked=!0;+mxEvent.consume(za)});var xa=document.createElement("input");xa.setAttribute("type","checkbox");xa.style.marginTop="10px";xa.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=G&&(N.appendChild(xa),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("transparentBackground")),N.appendChild(v),mxEvent.addListener(v,"click",function(za){xa.checked=!0;mxEvent.consume(za)}));var Ba=document.createElement("input");Ba.setAttribute("type","checkbox");+Ba.style.marginTop="10px";Ba.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==G||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(N),N.appendChild(Ba),v=document.createElement("span"),v.style.marginLeft="4px",mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram")),N.appendChild(v),mxEvent.addListener(v,"click",function(za){Ba.checked=!0;mxEvent.consume(za)}));S.appendChild(N);v=document.createElement("div");v.style.marginTop="40px";v.style.textAlign=+"right";v.style.whiteSpace="nowrap";k.isOffline()||null!=G||v.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));N=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});N.className="geBtn";k.editor.cancelFirst&&v.appendChild(N);PrintDialog.previewEnabled&&null==G&&(V=mxUtils.button(mxResources.get("preview"),function(){try{k.hideDialog(),M(!1)}catch(za){k.handleError(za)}}),V.className="geBtn",v.appendChild(V));V=mxUtils.button(mxResources.get(null!=G?"export":+PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),M(!0)}catch(za){k.handleError(za)}});V.className="geBtn gePrimaryBtn";v.appendChild(V);k.editor.cancelFirst||v.appendChild(N);S.appendChild(v);if(k.editor.isChromelessView()){var Fa=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};k.addListener("darkModeChanged",Fa);Fa();var La=function(za,Da){za=Da.getProperty("dialog");S.parentNode==za.container&&(k.editor.removeListener(La),k.removeListener(Fa))};k.editor.addListener("hideDialog",La)}this.container=S};var B=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 k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else B.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),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 H=document.createElement("canvas"),T=new Image;T.onload=function(){try{H.getContext("2d").drawImage(T,0,0);var k=H.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(v){}};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(k){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousAdaptiveColors=d.adaptiveColors;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.13";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.15";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -13035,10 +13035,10 @@ e,f)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalDatEditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var e=this.editor.graph;e.mathEnabled=c;null!=e.view.backgroundImage&&(e.view.backgroundImage.destroy(),e.view.backgroundImage=null);this.editor.updateGraphComponents();e.refresh();e.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,e,f){var p=null==c||null==e;f=null!=f?f:24;var n=new Spinner({lines:12,length:f,width:Math.round(f/3),radius:Math.round(f/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=this.timeout,z=n.spin,E=null,C=null,F=mxUtils.bind(this,function(U){null!=U&&U()});n.spin=function(U,O,N,m){m=null!=m?m:t;var u=!1;if(!this.active){var A=Date.now();null!=N&&(E=window.setTimeout(function(){n.stop();E=null;N({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})},m));z.call(this,U);this.active=!0;null!=O&&(p&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=this.timeout,z=n.spin,E=null,C=null,F=mxUtils.bind(this,function(U){null!=U&&U()});n.spin=function(U,P,O,m){m=null!=m?m:t;var u=!1;if(!this.active){var A=Date.now();null!=O&&(E=window.setTimeout(function(){n.stop();E=null;O({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})},m));z.call(this,U);this.active=!0;null!=P&&(p&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),u=document.createElement("div"),u.className="geSpinnerStatus",u.style.position="absolute",u.style.whiteSpace="nowrap",u.style.background="#4B4243",u.style.color="white",u.style.fontFamily=Editor.defaultHtmlFont,u.style.fontSize="9pt",u.style.padding="6px",u.style.paddingLeft="10px",u.style.paddingRight="10px",u.style.zIndex=2E9,u.style.left=Math.max(0,c)+"px",u.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(u.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(u.style,"transform",-"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(u.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),u.innerHTML=mxUtils.htmlEntities(O),U.appendChild(u),n.status=u);this.pause=mxUtils.bind(this,function(){var B=F;this.active&&(m=Math.max(0,m-(Date.now()-A)),B=mxUtils.bind(this,function(H){this.spin(U,O,N,m);if(null!=H)try{H(),C=mxUtils.bind(this,function(){this.spin(U,O,N,m);try{H()}catch(T){null!=N&&N(T)}})}catch(T){null!=-N&&N(T)}}));this.stop();return B});u=!0}return u};var R=n.stop;n.stop=function(){R.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=n.status&&null!=n.status.parentNode&&n.status.parentNode.removeChild(n.status),n.status=null)};n.pause=function(){return F};return n};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),f=this.editor.extractGraphModel(e.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(p){}return!1};+"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(u.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=P.substring(P.length-3,P.length)&&"!"!=P.charAt(P.length-1)&&(P+="..."),u.innerHTML=mxUtils.htmlEntities(P),U.appendChild(u),n.status=u);this.pause=mxUtils.bind(this,function(){var B=F;this.active&&(m=Math.max(0,m-(Date.now()-A)),B=mxUtils.bind(this,function(H){this.spin(U,P,O,m);if(null!=H)try{H(),C=mxUtils.bind(this,function(){this.spin(U,P,O,m);try{H()}catch(T){null!=O&&O(T)}})}catch(T){null!=+O&&O(T)}}));this.stop();return B});u=!0}return u};var R=n.stop;n.stop=function(){R.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=n.status&&null!=n.status.parentNode&&n.status.parentNode.removeChild(n.status),n.status=null)};n.pause=function(){return F};return n};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),f=this.editor.extractGraphModel(e.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(p){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var f=e.getFunction,p=this.editor.graph,n=this;e.getFunction=function(t){if(p.isSelectionEmpty()&&null!=n.pages&&0<n.pages.length){var z=n.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<z&&n.movePage(z,z-1)};if(38==t.keyCode)return function(){0<z&&n.movePage(z,0)};if(39==t.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,z+1)};if(40==t.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,n.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&@@ -13047,11 +13047,11 @@ arguments):null}}return e};var g=EditorUi.prototype.extractGraphModelFromHtml;Ede=null!=t?mxUtils.getXml(t):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,e){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",e);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var f=null!=c?this.editor.extractGraphModel(c,!0):null;null!=f&&(c=f);if(null!=c){f=this.editor.graph;f.model.beginUpdate();try{var p=null!=this.pages?this.pages.slice():null,n=c.getElementsByTagName("diagram");if(1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var t=n.length-1;0<=t;t--){var z=this.updatePageRoot(new DiagramPage(n[t]));null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,z,0==t?z:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=p)for(t=0;t<p.length;t++)f.model.execute(new ChangePage(this,-p[t],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(e)}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,f,p,n,t,z,E,C,F,R,U,O){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;C=null!=C?C:!0;R=null!=R?R:!Editor.defaultCompressed;var N=null;if(null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER)var m="_blank";else N=m=p;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(R){var A=c.ownerDocument.createElement("diagram");A.setAttribute("name",+p[t],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(e)}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,f,p,n,t,z,E,C,F,R,U,P){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;C=null!=C?C:!0;R=null!=R?R:!Editor.defaultCompressed;var O=null;if(null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER)var m="_blank";else O=m=p;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(R){var A=c.ownerDocument.createElement("diagram");A.setAttribute("name",mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());A.appendChild(c)}else{A=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(A);if(Graph.decompress(u)!=A)return A;A=c.ownerDocument.createElement("diagram");A.setAttribute("name",mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());mxUtils.setTextContent(A,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(A)}F?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),u.removeAttribute("modified"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),u.removeAttribute("etag"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("agent",-null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=O&&(u=u.cloneNode(!0),u.setAttribute("border",O));c=R?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!t&&!n&&(z||null!=f&&/(\.html)$/i.test(f.getTitle())))c=this.getHtml2(mxUtils.getXml(u),e,null!=f?f.getTitle():null,m,N);else if(t||-!n&&null!=f&&/(\.svg)$/i.test(f.getTitle()))null==f||f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER||(p=null),f=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,e,p,null,E,C,N,null,null,f.scale,f.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,f,p){c=null!=c?c:!0;e=null!=e?e:!1;f=null!=f?f:!Editor.defaultCompressed;var n=this.editor.getGraphXml(c,p);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(C){var F=C.getElementsByTagName("mxGraphModel"),+null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=P&&(u=u.cloneNode(!0),u.setAttribute("border",P));c=R?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!t&&!n&&(z||null!=f&&/(\.html)$/i.test(f.getTitle())))c=this.getHtml2(mxUtils.getXml(u),e,null!=f?f.getTitle():null,m,O);else if(t||+!n&&null!=f&&/(\.svg)$/i.test(f.getTitle()))null==f||f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER||(p=null),f=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,e,p,null,E,C,O,null,null,f.scale,f.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,f,p){c=null!=c?c:!0;e=null!=e?e:!1;f=null!=f?f:!Editor.defaultCompressed;var n=this.editor.getGraphXml(c,p);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(C){var F=C.getElementsByTagName("mxGraphModel"),R=0<F.length?F[0]:null;F=C;null==R&&f?(R=mxUtils.getNodeValue(C),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(F=C.cloneNode(!1),F.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||f?F=C.cloneNode(!0):(F=C.cloneNode(!1),mxUtils.setTextContent(F,Graph.compressNode(R)));n.appendChild(F)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(n),n=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var t=this.pages[e],z=t.node;if(t!=this.currentPage)if(t.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,E,null,p);EditorUi.removeChildNodes(z);z.appendChild(E);delete t.needsUpdate}else p&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&null!=t.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),E=E.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,E,null,p),z=z.cloneNode(!1),z.appendChild(E)));c(z)}return n};EditorUi.prototype.anonymizeString=function(c,e){for(var f=[],p=0;p<c.length;p++){var n=c.charAt(p);0<=EditorUi.ignoredAnonymizedChars.indexOf(n)?@@ -13061,9 +13061,9 @@ null!=z[E].xmlValue&&(z[E].xmlValue="["+z[E].xmlValue.length+"]"),null!=z[E].stye){if(null!=c.attributes)for(var f=0;f<c.attributes.length;f++)"as"!=c.attributes[f].name&&c.setAttribute(c.attributes[f].name,this.anonymizeString(c.attributes[f].value,e));if(null!=c.childNodes)for(f=0;f<c.childNodes.length;f++)this.anonymizeAttributes(c.childNodes[f],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var f=0;f<e.length;f++)null!=e[f].getAttribute("value")&&e[f].setAttribute("value","["+e[f].getAttribute("value").length+"]"),null!=e[f].getAttribute("xmlValue")&&e[f].setAttribute("xmlValue","["+e[f].getAttribute("xmlValue").length+"]"),null!=e[f].getAttribute("style")&&e[f].setAttribute("style","["+e[f].getAttribute("style").length+"]"),null!=e[f].parentNode&&"root"!=e[f].parentNode.nodeName&&null!=e[f].parentNode.parentNode&&(e[f].setAttribute("id",e[f].parentNode.getAttribute("id")),e[f].parentNode.parentNode.replaceChild(e[f],e[f].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(f){this.spinner.stop();e.handleFileError(f,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),-mxUtils.bind(this,function(f){e.handleFileError(f,!0)}))))};EditorUi.prototype.getFileData=function(c,e,f,p,n,t,z,E,C,F,R,U,O){n=null!=n?n:!0;t=null!=t?t:!1;F=null!=F?F:!Editor.defaultCompressed;var N=this.editor.graph;if((e||!c&&null!=C&&/(\.svg)$/i.test(C.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var m=N.getGlobalVariable;N=this.createTemporaryGraph(N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var u=-null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&N.setBackgroundImage(u.viewState.backgroundImage);N.getGlobalVariable=function(A){return"page"==A&&null!=u?u.getName():"pagenumber"==A?1:m.apply(this,arguments)};document.body.appendChild(N.container);null!=u&&N.model.setRoot(u.root)}z=null!=z?z:this.getXmlFileData(n,t,F,R);C=null!=C?C:this.getCurrentFile();c=this.createFileData(z,N,C,window.location.href,-c,e,f,p,n,E,F,U,O);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,f,p,n,t){t=null!=t?t:!0;var z=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=t?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var C=e.view.scale;t=Math.floor(z.x/C-e.view.translate.x);C=Math.floor(z.y/C-e.view.translate.y);z=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(E=EditorUi.drawHost+"/embed.js?s="+e));+mxUtils.bind(this,function(f){e.handleFileError(f,!0)}))))};EditorUi.prototype.getFileData=function(c,e,f,p,n,t,z,E,C,F,R,U,P){n=null!=n?n:!0;t=null!=t?t:!1;F=null!=F?F:!Editor.defaultCompressed;var O=this.editor.graph;if((e||!c&&null!=C&&/(\.svg)$/i.test(C.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var m=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var u=+null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&O.setBackgroundImage(u.viewState.backgroundImage);O.getGlobalVariable=function(A){return"page"==A&&null!=u?u.getName():"pagenumber"==A?1:m.apply(this,arguments)};document.body.appendChild(O.container);null!=u&&O.model.setRoot(u.root)}z=null!=z?z:this.getXmlFileData(n,t,F,R);C=null!=C?C:this.getCurrentFile();c=this.createFileData(z,O,C,window.location.href,+c,e,f,p,n,E,F,U,P);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return c};EditorUi.prototype.getHtml=function(c,e,f,p,n,t){t=null!=t?t:!0;var z=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=t?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var C=e.view.scale;t=Math.floor(z.x/C-e.view.translate.x);C=Math.floor(z.y/C-e.view.translate.y);z=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(E=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",t);c.setAttribute("y0",C)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=p&&c.setAttribute("edit",p));null!=n&&(n=n.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";p=Graph.compress(c);Graph.decompress(p)!=c&&(p=encodeURIComponent(c));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=f?"<title>"+mxUtils.htmlEntities(f)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+p+"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,f,p,n){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=n&&(n=n.replace(/&/g,"&"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,@@ -13073,20 +13073,20 @@ function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPagef={},0<c.length)){var p=this.getHashObject(),n=null;this.fileNode=e;this.pages=[];for(var t=0;t<c.length;t++){null==c[t].getAttribute("id")&&c[t].setAttribute("id",t);e=new DiagramPage(c[t]);null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[t+1]));this.pages.push(e);if(null==p.pageId&&null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]||null!=p.pageId&&e.getId()==p.pageId)n=e;if(null==f[e.getId()])f[e.getId()]=e;else throw Error(e.getId()+": Duplicate page ID");}this.currentPage=null!=n?n:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var z=decodeURIComponent(urlParams["layer-ids"]).split(" ");e={};for(t=0;t<z.length;t++)e[z[t]]=!0;var E=this.editor.graph.getModel(),C=E.getChildren(E.root);for(t=0;t<C.length;t++){var F=C[t];E.setVisible(F,e[F.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=-e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u){try{p=null!=p?p:this.editor.graph.isSelectionEmpty();var A=this.getBaseFilename(!n),B=A+("xml"==c||"pdf"==c&&R?".drawio":"")+"."+c;+e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u){try{p=null!=p?p:this.editor.graph.isSelectionEmpty();var A=this.getBaseFilename(!n),B=A+("xml"==c||"pdf"==c&&R?".drawio":"")+"."+c;if("xml"==c){var H=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,p,n,null,null,null,e);this.saveData(B,c,H,"text/xml")}else if("html"==c)H=this.getHtml2(this.getFileData(!0),this.editor.graph,A),this.saveData(B,c,H,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?B=A+".png":"jpeg"==c&&(B=A+".jpg"),this.saveRequest(B,c,mxUtils.bind(this,function(I,M){try{return this.createDownloadRequest(I,c,p,M,z,n,E,C,F,R,U,void 0,-void 0,!t,O,N,m,u)}catch(P){this.handleError(P)}}));else{var T=null,k=mxUtils.bind(this,function(I){I.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==c){var v=this.editor.graph.background;if(z||v==mxConstants.NONE)v=null;var G=this.editor.graph.getSvg(v,null,null,null,null,p);f&&this.editor.graph.addSvgShadow(G);this.editor.convertImages(G,-mxUtils.bind(this,mxUtils.bind(this,function(I){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(I))})))}else B=A+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(I){this.spinner.stop();k(I)}),p)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u,A,B){c=this.downloadRequestBuilder(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u,A,B);e="";for(var H in c)f=c[H],null!=f&&(e+=H+"="+encodeURIComponent(f)+-"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u,A,B){var H=this.editor.graph,T=H.getGraphBounds();f=this.getFileData(!0,null,null,null,f,0==t?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var k=null,v=null,G=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||f.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};F=F?"1":"0";"pdf"==e&&(null!=R?(k=R.from,v=R.to):0==t&&(G=+void 0,!t,P,O,m,u)}catch(N){this.handleError(N)}}));else{var T=null,k=mxUtils.bind(this,function(I){I.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==c){var v=this.editor.graph.background;if(z||v==mxConstants.NONE)v=null;var G=this.editor.graph.getSvg(v,null,null,null,null,p);f&&this.editor.graph.addSvgShadow(G);this.editor.convertImages(G,+mxUtils.bind(this,mxUtils.bind(this,function(I){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(I))})))}else B=A+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(I){this.spinner.stop();k(I)}),p)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u,A,B){c=this.downloadRequestBuilder(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u,A,B);e="";for(var H in c)f=c[H],null!=f&&(e+=H+"="+encodeURIComponent(f)++"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u,A,B){var H=this.editor.graph,T=H.getGraphBounds();f=this.getFileData(!0,null,null,null,f,0==t?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var k=null,v=null,G=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||f.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};F=F?"1":"0";"pdf"==e&&(null!=R?(k=R.from,v=R.to):0==t&&(G="1"));"xmlpng"==e&&(F="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){k=t;break}t=H.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!n?n||null!=t&&t!=mxConstants.NONE||(t="#ffffff"):t=mxConstants.NONE;n={globalVars:H.getExportVariables()};C&&(n.grid={size:H.gridSize,steps:H.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==e?mxGraphView.prototype.defaultGridColor:H.view.gridColor});Graph.translateDiagram&&-(n.diagramLanguage=Graph.diagramLanguage);return{format:e,from:k,to:v,allPages:G,bg:null!=t?t:mxConstants.NONE,base64:p,embedXml:F,xml:f,filename:null!=c?c:"",extras:JSON.stringify(n),scale:z,border:E,pageMargin:m,w:U&&isFinite(U)?U:null,h:O&&isFinite(O)?O:null,crop:null!=N&&N?"1":"0",fit:null!=u&&u?"1":"0",sheetsAcross:A,sheetsDown:B}};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));+(n.diagramLanguage=Graph.diagramLanguage);return{format:e,from:k,to:v,allPages:G,bg:null!=t?t:mxConstants.NONE,base64:p,embedXml:F,xml:f,filename:null!=c?c:"",extras:JSON.stringify(n),scale:z,border:E,pageMargin:m,w:U&&isFinite(U)?U:null,h:P&&isFinite(P)?P:null,crop:null!=O&&O?"1":"0",fit:null!=u&&u?"1":"0",sheetsAcross:A,sheetsDown:B}};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var e=c.indexOf("#");0<=e&&(c=c.substring(0,e))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,e={};if(null!=c&&0<c.length){var f=c.lastIndexOf("#");if(0<f){c=decodeURIComponent(c.substring(f+1));try{e=JSON.parse(c)}catch(p){}}}return e};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var e=window.location.hash;if(null==e||""==e)e="#";var f=e.lastIndexOf("#");0<f&&(e=e.substring(0,f));try{null==c||mxUtils.isEmptyObject(c)||(e=e+"#"+encodeURIComponent(JSON.stringify(c)))}catch(p){}0<f&&0<e.lastIndexOf("#")?window.location.hash=e:window.location.replace(e)}};EditorUi.prototype.loadDescriptor=function(c,e,f){var p=window.location.hash,n=mxUtils.bind(this,function(z){var E=null!=c.data?c.data:"";null!=z&&0<z.length&&-(0<E.length&&(E+="\n"),E+=z);z=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return p};this.fileLoaded(z);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var C=null!=c.interval?parseInt(c.interval):6E4,F=null,R=mxUtils.bind(this,function(){var O=this.currentPage;-mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(N){O===this.currentPage&&(200<=N.getStatus()&&300>=N.getStatus()?(this.updateDiagram(N.getText()),U()):this.handleError({message:mxResources.get("error")+" "+N.getStatus()}))}),mxUtils.bind(this,function(N){this.handleError(N)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(F);F=window.setTimeout(R,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();+(0<E.length&&(E+="\n"),E+=z);z=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return p};this.fileLoaded(z);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(P){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var C=null!=c.interval?parseInt(c.interval):6E4,F=null,R=mxUtils.bind(this,function(){var P=this.currentPage;+mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){P===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),U()):this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(F);F=window.setTimeout(R,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();R()}));U();R()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var t=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(t,mxUtils.bind(this,function(z){n(z)}),mxUtils.bind(this,function(z){null!=f&&f(z)}))}else n("")};EditorUi.prototype.updateDiagram=function(c){function e(T){var k=new mxCellOverlay(T.image||n.warningImage,T.tooltip,T.align,T.valign,T.offset);k.addListener(mxEvent.CLICK,function(v,G){p.alert(T.tooltip)});return k}var f=null,p=this;if(null!=c&&0<c.length&&(f=mxUtils.parseXml(c),c=null!=f?f.documentElement:null,null!=c&&"updates"==c.nodeName)){var n=this.editor.graph,t=n.getModel();t.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=t.getCell(c.getAttribute("id"));if(null!=E){try{var C=c.getAttribute("value");if(null!=C){var F=mxUtils.parseXml(C).documentElement;if(null!=F)if("1"==F.getAttribute("replace-value"))t.setValue(E,F);else for(var R=F.attributes,U=0;U<R.length;U++)n.setAttributeForCell(E,R[U].nodeName,0<R[U].nodeValue.length?-R[U].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+E.id+": "+T)}try{var O=c.getAttribute("style");null!=O&&n.model.setStyle(E,O)}catch(T){null!=window.console&&console.log("Error in style for "+E.id+": "+T)}try{var N=c.getAttribute("icon");if(null!=N){var m=0<N.length?JSON.parse(N):null;null!=m&&m.append||n.removeCellOverlays(E);null!=m&&n.addCellOverlay(E,e(m))}}catch(T){null!=window.console&&console.log("Error in icon for "+E.id+": "+T)}try{var u=c.getAttribute("geometry");+R[U].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+E.id+": "+T)}try{var P=c.getAttribute("style");null!=P&&n.model.setStyle(E,P)}catch(T){null!=window.console&&console.log("Error in style for "+E.id+": "+T)}try{var O=c.getAttribute("icon");if(null!=O){var m=0<O.length?JSON.parse(O):null;null!=m&&m.append||n.removeCellOverlays(E);null!=m&&n.addCellOverlay(E,e(m))}}catch(T){null!=window.console&&console.log("Error in icon for "+E.id+": "+T)}try{var u=c.getAttribute("geometry");if(null!=u){u=JSON.parse(u);var A=n.getCellGeometry(E);if(null!=A){A=A.clone();for(key in u){var B=parseFloat(u[key]);"dx"==key?A.x+=B:"dy"==key?A.y+=B:"dw"==key?A.width+=B:"dh"==key?A.height+=B:A[key]=parseFloat(u[key])}n.model.setGeometry(E,A)}}}catch(T){null!=window.console&&console.log("Error in icon for "+E.id+": "+T)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,t)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(n.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))n.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{t.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0,z)}return f};EditorUi.prototype.getCopyFilename=function(c,e){var f=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var p=f.lastIndexOf(".");0<=p&&(c=f.substring(p),f=f.substring(0,p));if(e){e=f;var n=new Date;f=n.getFullYear();p=n.getMonth()+1;var t=n.getDate(),z=n.getHours(),E=n.getMinutes();n=n.getSeconds();f=e+(" "+(f+"-"+p+"-"+t+"-"+z+"-"+E+"-"+n))}return f=mxResources.get("copyOf",[f])+c};EditorUi.prototype.logIfModified=function(c,e){try{null!=c&&e&&EditorUi.debug("File.closed",[c])}catch(f){}};EditorUi.prototype.fileLoaded=function(c,e,f){var p=@@ -13107,14 +13107,14 @@ function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):thithis.openLibraries);break}n={file:c,images:e,title:f,expand:p};this.openLibraries.push(n)}else this.scratchpad=c;t=this.sidebar.palettes[c.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var z=null,E=mxUtils.bind(this,function(B,H){0==B.length&&c.isEditable()?(null==z&&(z=document.createElement("div"),z.className="geDropTarget",mxUtils.write(z,mxResources.get("dragElementsHere"))),H.appendChild(z)):this.addLibraryEntries(B,H)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==f&&(f=c.getTitle(),null!=f&&/(\.xml)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf("."))));var C=this.sidebar.addPalette(c.getHash(),f,null!=p?p:!0,mxUtils.bind(this,function(B){E(e,B)}));null!=n&&(n.div=C);this.repositionLibrary(t,"L.scratchpad"!=c.getHash());p=C.parentNode.previousSibling;f=p.getAttribute("title");null!=f&&0<f.length&&".scratchpad"!=c.title&&p.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+f);var F=document.createElement("div");F.style.backgroundColor="inherit";p.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)F.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,-function(B){if(!mxEvent.isConsumed(B)){var H=mxUtils.bind(this,function(){null!=n&&mxUtils.remove(n,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(B)}}));if(c.isEditable()){var O=this.editor.graph,N=null;f=mxUtils.bind(this,function(B){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(B)});var m=mxUtils.bind(this,function(B){c.setModified(!0);-c.isAutosave()?(null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N),N=R.cloneNode(!1),N.setAttribute("src",Editor.spinImage),N.setAttribute("title",mxResources.get("saving")),N.style.cursor="default",N.style.marginRight="2px",N.style.marginTop="-2px",F.insertBefore(N,F.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N)})):null==U&&(U=R.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),-F.insertBefore(U,F.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==U||c.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(B,H,T,k){B=O.cloneCells(mxUtils.sortCells(O.model.getTopmostCells(B)));for(var v=0;v<B.length;v++){var G=O.getCellGeometry(B[v]);null!=G&&G.translate(-H.x,-H.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(B,-H.width,H.height,k||"",!0,null,!1));B=mxUtils.getXml(this.editor.graph.encodeCells(B));Editor.defaultCompressed&&(B=Graph.compress(B));H={xml:B,w:H.width,h:H.height};null!=k&&(H.title=k);e.push(H);m(T);null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)}),A=mxUtils.bind(this,function(B){if(O.isSelectionEmpty())O.getRubberband().isActive()?(O.getRubberband().execute(B),O.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),-mxResources.get("ok"));else{var H=O.getSelectionCells(),T=O.view.getBounds(H);if(null!=T&&0<T.width&&0<T.height){var k=O.view.scale;T.x/=k;T.y/=k;T.width/=k;T.height/=k;T.x-=O.view.translate.x;T.y-=O.view.translate.y;u(H,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(B)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.panningManager&&null!=O.graphHandler.first&&(O.graphHandler.suspend(),-null!=O.graphHandler.hint&&(O.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="light-dark(#fefefe, #000000)",C.style.cursor="copy",O.panningManager.stop(),O.autoScroll=!1,mxEvent.consume(B))}),mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.panningManager&&null!=O.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,O.panningManager.stop(),O.graphHandler.reset(),O.isMouseDown=!1,O.autoScroll=!0,A(B),mxEvent.consume(B))}));mxEvent.addListener(C,-"mouseleave",mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.graphHandler.first&&(O.graphHandler.resume(),null!=O.graphHandler.hint&&(O.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",O.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(B){C.style.backgroundColor="light-dark(#fefefe, #000000)";B.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()})),-mxEvent.addListener(C,"drop",mxUtils.bind(this,function(B){C.style.cursor="";C.style.backgroundColor="";0<B.dataTransfer.files.length&&this.importFiles(B.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,T,k,v,G,I,M,P,S){if(null!=H&&"image/"==T.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,G,I),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,G,I),B,mxEvent.isAltDown(B)?+function(B){if(!mxEvent.isConsumed(B)){var H=mxUtils.bind(this,function(){null!=n&&mxUtils.remove(n,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(B)}}));if(c.isEditable()){var P=this.editor.graph,O=null;f=mxUtils.bind(this,function(B){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(B)});var m=mxUtils.bind(this,function(B){c.setModified(!0);+c.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=R.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",F.insertBefore(O,F.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O)})):null==U&&(U=R.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),+F.insertBefore(U,F.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==U||c.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(B,H,T,k){B=P.cloneCells(mxUtils.sortCells(P.model.getTopmostCells(B)));for(var v=0;v<B.length;v++){var G=P.getCellGeometry(B[v]);null!=G&&G.translate(-H.x,-H.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(B,+H.width,H.height,k||"",!0,null,!1));B=mxUtils.getXml(this.editor.graph.encodeCells(B));Editor.defaultCompressed&&(B=Graph.compress(B));H={xml:B,w:H.width,h:H.height};null!=k&&(H.title=k);e.push(H);m(T);null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)}),A=mxUtils.bind(this,function(B){if(P.isSelectionEmpty())P.getRubberband().isActive()?(P.getRubberband().execute(B),P.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),+mxResources.get("ok"));else{var H=P.getSelectionCells(),T=P.view.getBounds(H);if(null!=T&&0<T.width&&0<T.height){var k=P.view.scale;T.x/=k;T.y/=k;T.width/=k;T.height/=k;T.x-=P.view.translate.x;T.y-=P.view.translate.y;u(H,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(B)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(B){P.isMouseDown&&null!=P.panningManager&&null!=P.graphHandler.first&&(P.graphHandler.suspend(),+null!=P.graphHandler.hint&&(P.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="light-dark(#fefefe, #000000)",C.style.cursor="copy",P.panningManager.stop(),P.autoScroll=!1,mxEvent.consume(B))}),mxUtils.bind(this,function(B){P.isMouseDown&&null!=P.panningManager&&null!=P.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,P.panningManager.stop(),P.graphHandler.reset(),P.isMouseDown=!1,P.autoScroll=!0,A(B),mxEvent.consume(B))}));mxEvent.addListener(C,+"mouseleave",mxUtils.bind(this,function(B){P.isMouseDown&&null!=P.graphHandler.first&&(P.graphHandler.resume(),null!=P.graphHandler.hint&&(P.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",P.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(B){C.style.backgroundColor="light-dark(#fefefe, #000000)";B.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()})),+mxEvent.addListener(C,"drop",mxUtils.bind(this,function(B){C.style.cursor="";C.style.backgroundColor="";0<B.dataTransfer.files.length&&this.importFiles(B.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,T,k,v,G,I,M,N,S){if(null!=H&&"image/"==T.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,G,I),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,G,I),B,mxEvent.isAltDown(B)?null:M.substring(0,M.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null);else{var V=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));E(Y,C);e=e.concat(Y);m(B);this.spinner.stop();V=!0}catch(fa){}else if("mxfile"==X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&u(ea,new mxRectangle(0,0,ca.width,ca.height),B)}V=!0}catch(fa){null!=window.console&&console.log("error in drop handler:",fa)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)});null!=S&&null!=M&&EditorUi.isVisioFilename(M)?this.importVisio(S,function(X){W(X,"text/xml")},null,M):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,M)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?W(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),@@ -13127,28 +13127,28 @@ function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.lt(E),E==z)this.hideDialog();else{if(0<E.length){var C=JSON.parse(E);localStorage.setItem(e,JSON.stringify(C))}else localStorage.removeItem(e);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(F){this.handleError(F)}}),null,mxResources.get("close"),null,null,null,!0,null,null,n,f,p);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e,f,p){c=null!=c?c:mxUtils.bind(this,function(n,t,z,E){t||(n=new ChangePageSetup(this,p?z:null,n),n.ignoreColor=!p,null!=E&&p&&(n.shadowVisible=E),this.editor.graph.model.execute(n))});c=new BackgroundImageDialog(this,c,e,f,p);this.showDialog(c.container,400,p?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,f,p,n){c=new LibraryDialog(this,c,e,f,p,n);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(f){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.handleError=function(c,e,f,p,n,t,z){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,-c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!z||null==window.console||console.error("EditorUi.handleError:",c)}catch(O){}if(null!=C||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var F=mxResources.get("ok"),R=null;e=null!=e?e:mxResources.get("error");if(null!=C){null!=C.retry&&(F=mxResources.get("cancel"),R=function(){E();C.retry()});if(404==C.code||404==C.status||403==C.code){z=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),+c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!z||null==window.console||console.error("EditorUi.handleError:",c)}catch(P){}if(null!=C||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var F=mxResources.get("ok"),R=null;e=null!=e?e:mxResources.get("error");if(null!=C){null!=C.retry&&(F=mxResources.get("cancel"),R=function(){E();C.retry()});if(404==C.code||404==C.status||403==C.code){z=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var U=null!=n?null:null!=t?t:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||-404==C.code||404==C.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(e,z,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=p&&p()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function O(){A.innerText="";for(var B=0;B<N.length;B++){var H=document.createElement("option");mxUtils.write(H,N[B].displayName);H.value=B;A.appendChild(H);H=document.createElement("option");-H.innerHTML=" ";mxUtils.write(H,"<"+N[B].email+">");H.setAttribute("disabled","disabled");A.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=N.length;A.appendChild(H)}var N=this.drive.getUsersList(),m=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");m.appendChild(u);var A=document.createElement("select");A.style.width="100%";O();mxEvent.addListener(A,-"change",mxUtils.bind(this,function(){var B=A.value,H=N.length!=B;H&&this.drive.setUser(N[B]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(N=this.drive.getUsersList(),O())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));m.appendChild(A);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(m.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=f&&f()}),+404==C.code||404==C.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(e,z,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=p&&p()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function P(){A.innerText="";for(var B=0;B<O.length;B++){var H=document.createElement("option");mxUtils.write(H,O[B].displayName);H.value=B;A.appendChild(H);H=document.createElement("option");+H.innerHTML=" ";mxUtils.write(H,"<"+O[B].email+">");H.setAttribute("disabled","disabled");A.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=O.length;A.appendChild(H)}var O=this.drive.getUsersList(),m=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");m.appendChild(u);var A=document.createElement("select");A.style.width="100%";P();mxEvent.addListener(A,+"change",mxUtils.bind(this,function(){var B=A.value,H=O.length!=B;H&&this.drive.setUser(O[B]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(O=this.drive.getUsersList(),P())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));m.appendChild(A);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(m.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=f&&f()}),520,150);return}}null!=C.message?z=""==C.message&&null!=C.name?mxUtils.htmlEntities(C.name,!1):mxUtils.htmlEntities(C.message,!1):null!=C.response&&null!=C.response.error?z=mxUtils.htmlEntities(C.response.error,!1):"undefined"!==typeof window.App&&(C.code==App.ERROR_TIMEOUT?z=mxUtils.htmlEntities(mxResources.get("timeout"),!1):C.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof C&&0<C.length&&(z=mxUtils.htmlEntities(C,!1)))}n=c=null;null!=C&&null!=C.helpLink?(c=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail?(c=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+c+": "+C.ownerEmail+")",!1),n=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(C.ownerEmail))})):null!=C&&null!=C.alternateAction&&(c=C.alternateAction.label,n=C.alternateAction.funct);this.showError(e,z,F,f,R,null,null,c,n,null,null,null,p?f:null)}else null!=f&&f()};EditorUi.prototype.alert=function(c,e,f){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,f||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,f,p,n,t){c=null!=c?c:"";var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&e()},function(){z();null!=f&&f()},p,n,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,t);c.init()};EditorUi.prototype.showBanner=function(c,e,f,p,n,t,z,E,C){var F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){t=null!=t?t:"bottom:10px;left:50%;";z=null!=z?z:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var R=n?500:1E3;F=n?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var U=document.createElement("div");U.style.cssText="position:absolute;"+-t+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+F;mxUtils.setPrefixedStyle(U.style,"transform",z);mxUtils.setPrefixedStyle(U.style,"transition","all "+R+"ms ease");U.className="geBtn gePrimaryBtn"+(n?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(U.style,"box-shadow","1px 1px 2px 0px #ddd");null!=C&&mxUtils.setPrefixedStyle(U.style,"transform-origin",C);if(!n){var O=document.createElement("img");O.setAttribute("src",IMAGE_PATH+"/logo.png");-O.setAttribute("border","0");O.setAttribute("align","absmiddle");O.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";U.appendChild(O);O=document.createElement("img");O.setAttribute("src",Dialog.prototype.closeImage);O.setAttribute("title",mxResources.get(p?"doNotShowAgain":"close"));O.setAttribute("border","0");O.style.cssText=(n?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";U.appendChild(O)}mxUtils.write(U,-e);document.body.appendChild(U);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var N=document.createElement("input");N.setAttribute("type","checkbox");N.setAttribute("id","geDoNotShowAgainCheckbox");N.style.marginRight="6px";if(!p){e.appendChild(N);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,-mxResources.get("doNotShowAgain"));e.appendChild(m);U.style.paddingBottom=n?"16px":"30px";U.appendChild(e)}var u=mxUtils.bind(this,function(){null!=U.parentNode&&(U.parentNode.removeChild(U),this.bannerShowing=!1,N.checked||p)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=O&&mxEvent.addListener(O,"click",mxUtils.bind(this,function(B){mxEvent.consume(B);u()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,-"transform",z);window.setTimeout(mxUtils.bind(this,function(){u()}),R)});mxEvent.addListener(U,"click",mxUtils.bind(this,function(B){var H=mxEvent.getSource(B);H!=N&&H!=m?(null!=f&&f(),u(),mxEvent.consume(B)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,"transform",E)}),R/2);window.setTimeout(A,n?4E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};+t+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+F;mxUtils.setPrefixedStyle(U.style,"transform",z);mxUtils.setPrefixedStyle(U.style,"transition","all "+R+"ms ease");U.className="geBtn gePrimaryBtn"+(n?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(U.style,"box-shadow","1px 1px 2px 0px #ddd");null!=C&&mxUtils.setPrefixedStyle(U.style,"transform-origin",C);if(!n){var P=document.createElement("img");P.setAttribute("src",IMAGE_PATH+"/logo.png");+P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";U.appendChild(P);P=document.createElement("img");P.setAttribute("src",Dialog.prototype.closeImage);P.setAttribute("title",mxResources.get(p?"doNotShowAgain":"close"));P.setAttribute("border","0");P.style.cssText=(n?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";U.appendChild(P)}mxUtils.write(U,+e);document.body.appendChild(U);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var O=document.createElement("input");O.setAttribute("type","checkbox");O.setAttribute("id","geDoNotShowAgainCheckbox");O.style.marginRight="6px";if(!p){e.appendChild(O);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,+mxResources.get("doNotShowAgain"));e.appendChild(m);U.style.paddingBottom=n?"16px":"30px";U.appendChild(e)}var u=mxUtils.bind(this,function(){null!=U.parentNode&&(U.parentNode.removeChild(U),this.bannerShowing=!1,O.checked||p)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=P&&mxEvent.addListener(P,"click",mxUtils.bind(this,function(B){mxEvent.consume(B);u()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,+"transform",z);window.setTimeout(mxUtils.bind(this,function(){u()}),R)});mxEvent.addListener(U,"click",mxUtils.bind(this,function(B){var H=mxEvent.getSource(B);H!=O&&H!=m?(null!=f&&f(),u(),mxEvent.consume(B)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,"transform",E)}),R/2);window.setTimeout(A,n?4E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,f,p){c=c.toDataURL("image/"+f);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<p&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",p));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,f,p,n){var t="jpeg"==f?"jpg":f;p=this.getBaseFilename(p)+(null!=e?".drawio":"")+"."+t;c=this.createImageDataUri(c,e,f,n);this.saveData(p,t,c.substring(c.lastIndexOf(",")+1),"image/"+f,!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(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,f,p,n,t){"text/xml"!=f||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=p?this.base64ToBlob(c,f):new Blob([c],{type:f}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)f=window.open("about:blank","_blank"),null==f?mxUtils.popup(c,!0):(f.document.write(c),f.document.close(),f.document.execCommand("SaveAs",!0,e),f.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==f||"image/"!=f.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,f,p);else{var z=document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);t=65==(E?parseInt(E[2],10):!1)?!1:t}if(t||this.isOffline()){z.href=URL.createObjectURL(p?this.base64ToBlob(c,f):new Blob([c],{type:f}));t?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},2E4),z.click(),z.parentNode.removeChild(z)}catch(C){}}else this.createEchoRequest(c,e,f,p,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,f,p,n,t){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,-c+(null!=f?"&mime="+f:"")+(null!=n?"&format="+n:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(p?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,f,p,n,t,z,E){t=null!=t?t:!1;z=null!=z?z:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(R,U,O,N){try{if("_blank"==U)if(null!=f&&"image/"==f.substring(0,6))this.openInNewWindow(c,f,p);else if(null!=f&&"text/html"==f.substring(0,9)){var m=new EmbedDialog(this,c);this.showDialog(m.container,-450,240,!0,!0);m.init()}else{var u=window.open("about:blank");null==u?mxUtils.popup(c,!0):(u.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),u.document.close())}else if(U==App.MODE_DEVICE||"download"==U)this.doSaveLocalFile(c,R,f,p,null,E);else if(null!=R&&0<R.length){var A=mxUtils.bind(this,function(B){try{this.exportFile(c,R,f,p,U,B)}catch(H){this.handleError(H)}});null!=N?A(N):this.pickFolder(U,A)}}catch(B){this.handleError(B)}});n=[];t||n.push(App.MODE_BROWSER);z||n.push("_blank");-var F=new SaveDialog(this,e,mxUtils.bind(this,function(R,U,O){C(R.value,U,R,O);this.hideDialog(null,null,F.container)}),n,c,f,p);this.showDialog(F.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));F.init()};EditorUi.prototype.openInNewWindow=function(c,e,f){var p=window.open("about:blank");if(null==p||null==p.document)mxUtils.popup(c,!0);else{var n="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var t=mxUtils.parseXml(c).documentElement.style.backgroundColor;+c+(null!=f?"&mime="+f:"")+(null!=n?"&format="+n:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(p?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,f,p,n,t,z,E){t=null!=t?t:!1;z=null!=z?z:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(R,U,P,O){try{if("_blank"==U)if(null!=f&&"image/"==f.substring(0,6))this.openInNewWindow(c,f,p);else if(null!=f&&"text/html"==f.substring(0,9)){var m=new EmbedDialog(this,c);this.showDialog(m.container,+450,240,!0,!0);m.init()}else{var u=window.open("about:blank");null==u?mxUtils.popup(c,!0):(u.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),u.document.close())}else if(U==App.MODE_DEVICE||"download"==U)this.doSaveLocalFile(c,R,f,p,null,E);else if(null!=R&&0<R.length){var A=mxUtils.bind(this,function(B){try{this.exportFile(c,R,f,p,U,B)}catch(H){this.handleError(H)}});null!=O?A(O):this.pickFolder(U,A)}}catch(B){this.handleError(B)}});n=[];t||n.push(App.MODE_BROWSER);z||n.push("_blank");+var F=new SaveDialog(this,e,mxUtils.bind(this,function(R,U,P){C(R.value,U,R,P);this.hideDialog(null,null,F.container)}),n,c,f,p);this.showDialog(F.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));F.init()};EditorUi.prototype.openInNewWindow=function(c,e,f){var p=window.open("about:blank");if(null==p||null==p.document)mxUtils.popup(c,!0);else{var n="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var t=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=t&&(n="background: "+t+";")}n='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+n+'">';"image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||f?(t=f?c:btoa(unescape(encodeURIComponent(c))),p.document.write(n+'<img style="max-width:100%;" src="data:'+e+";base64,"+t+'"/></body></html>')):p.document.write(n+c+"</body></html>"):p.document.write(n+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");p.document.close()}};var d=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(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(p){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=@@ -13162,87 +13162,88 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",n);this.editor.exportToCanvas(mxUtils.bind(this,function(E){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight="140px";E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",C);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);n.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){z.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(E)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(p)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,f,p,n){this.isLocalFileSave()?this.saveLocalFile(f,c,p,n,e):this.saveRequest(c,e,mxUtils.bind(this,function(t,z){return this.createEchoRequest(f,t,p,n,e,z)}),f,n,p)};EditorUi.prototype.saveRequest=function(c,e,f,p,n,t,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;var E=mxUtils.bind(this,-function(F,R,U,O){if("_blank"==R||null!=F&&0<F.length){var N=f("_blank"==R?null:F,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=N&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?N.simulate(document,"_blank"):(U=mxUtils.bind(this,function(m){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=p)try{this.exportFile(p,F,t,!0,R,m)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),F,t,!0,R,m)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),null!=O?U(O):this.pickFolder(R,U)))}});n=[App.MODE_BROWSER];z||n.push("_blank");var C=new SaveDialog(this,c,mxUtils.bind(this,function(F,R,U){E(F.value,R,F,U);this.hideDialog(null,null,C.container)}),n,null,"application/pdf");this.showDialog(C.container,+function(F,R,U,P){if("_blank"==R||null!=F&&0<F.length){var O=f("_blank"==R?null:F,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=O&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?O.simulate(document,"_blank"):(U=mxUtils.bind(this,function(m){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=p)try{this.exportFile(p,F,t,!0,R,m)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),F,t,!0,R,m)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),null!=P?U(P):this.pickFolder(R,U)))}});n=[App.MODE_BROWSER];z||n.push("_blank");var C=new SaveDialog(this,c,mxUtils.bind(this,function(F,R,U){E(F.value,R,F,U);this.hideDialog(null,null,C.container)}),n,null,"application/pdf");this.showDialog(C.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));C.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,f,p,n,t){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,e,f){e(null)};EditorUi.prototype.exportSvg=function(c,e,f,p,n,t,-z,E,C,F,R,U,O,N){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(I){Editor.addRetryToError(I,mxUtils.bind(this,function(){this.exportSvg(c,e,f,p,n,t,z,E,C,F,R,U,O,N)}));this.handleError(I)})))try{var m=this.editor.graph.isSelectionEmpty();f=null!=f?f:m;var u=e?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==e&&(u=this.editor.graph.shapeBackgroundColor);var A=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&-(this.editor.graph.addForeignObjectWarning=function(){});var B=this.editor.graph.createSvgImageExport(n),H=this.editor.graph.getSvg(u,c,z,E,null,f,null,B,"blank"==F?"_blank":"self"==F?"_top":null,null,!O,R,U);this.editor.graph.addForeignObjectWarning=A;p&&this.editor.graph.addSvgShadow(H);var T=this.getBaseFilename()+(n?".drawio":"")+".svg";N=null!=N?N:mxUtils.bind(this,function(I){this.isLocalFileSave()||I.length<=MAX_REQUEST_SIZE?this.saveData(T,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(I)}))});var k=mxUtils.bind(this,function(I){this.spinner.stop();n&&I.setAttribute("content",this.getFileData(!0,null,null,null,f,C,null,null,null,null,null,c,z));N(Graph.xmlDeclaration+"\n"+(n?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(I))});this.editor.graph.mathEnabled&&this.editor.addMathCss(H);var v=mxUtils.bind(this,function(I){Editor.replaceSvgDataUris&&t&&EditorUi.embedSvgImages(I);Editor.foreignObjectImages&&-O?this.replaceAlternateContent(I,R,k):k(I)}),G=mxUtils.bind(this,function(I){t&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(I,v,this.thumbImageCache)):v(I)});O?this.embedFonts(H,G):(this.editor.addFontCss(H),G(H))}catch(I){this.handleError(I)}};EditorUi.prototype.replaceAlternateContent=function(c,e,f){function p(U,O,N,m,u){var A=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");A.setAttribute("x",O);A.setAttribute("y",-N+.5);A.setAttribute("width",m.width);A.setAttribute("height",m.height);null==A.setAttributeNS?A.setAttribute("xlink:href",u):A.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);U.replaceChild(A,U.lastChild);E()}function n(){if(z<R.length)R[z++](n)}var t="";e=c.getElementsByTagName("style");for(var z=0;z<e.length;z++)t+=e[z].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&f(c)}),C={},F={},R=[];for(z=0;z<e.length;z++)mxUtils.bind(this,-function(U){var O=U.getElementsByTagName("div");if(0<O.length)try{var N=O[0].cloneNode(!0),m=parseInt(N.style.marginLeft),u=parseInt(N.style.paddingTop),A=N.getElementsByTagName("div")[1],B=O=!1,H=N.style.alignItems,T=N.style.justifyContent;if(null!=N.style.writingMode){var k=N.style.writingMode;B="vertical-"==k.substring(0,9);O="-rl"==k.substring(k.length-3)}var v=!B&&"1px"==N.style.width||B&&"1px"==N.style.height;if(!B&&"1px"==N.style.height||B&&"1px"==N.style.width)N.style.alignItems=B&&O?"unsafe flex-end":-"unsafe flex-start";v&&(N.style.justifyContent="unsafe flex-start");N.style.paddingTop="";N.style.marginLeft="";var G=N.outerHTML,I=C[G];null==I&&(N.style.position="absolute",N.style.visibility="hidden",document.body.appendChild(N),k=1,k="1px"==N.style.width?A.offsetWidth:parseInt(N.style.width),v=1,v="1px"==N.style.height?A.offsetHeight:parseInt(N.style.height),document.body.removeChild(N),I=new mxRectangle(m,u,k,v),C[G]=I);"1px"==N.style.height&&("unsafe center"==H?u-=I.height/2:"unsafe flex-end"==-H&&(u-=I.height));if("1px"==N.style.width)if(!B&&"unsafe center"==T||B&&"unsafe center"==H)m-=I.width/2;else if(!B&&"unsafe flex-end"==T||B&&(!O&&"unsafe flex-end"==H||O&&"unsafe flex-start"==H))m-=I.width;I=new mxRectangle(m,u,I.width,I.height+parseInt(A.style.fontSize)/4);R.push(mxUtils.bind(this,function(M){var P=F[G];null==P?Graph.htmlToPng(G,I.width,I.height,mxUtils.bind(this,function(S){p(U,m,u,I,S);F[G]=S;M()}),t):(p(U,m,u,I,P),M())}))}catch(M){E()}else E()})(e[z]);0==counter&&f(c);z=0;n()};-EditorUi.prototype.addRadiobox=function(c,e,f,p,n,t,z){return this.addCheckbox(c,f,p,n,t,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();C.id=z;null!=E&&C.setAttribute("name",E);f&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);p&&C.setAttribute("disabled","disabled");t&&(c.appendChild(C),f=document.createElement("label"),-mxUtils.write(f,e),f.setAttribute("for",z),c.appendChild(f),n||mxUtils.br(c));return C};EditorUi.prototype.addEditButton=function(c,e){var f=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var p=this.getCurrentFile(),n="";null!=p&&p.getMode()!=App.MODE_DEVICE&&p.getMode()!=App.MODE_BROWSER&&(n=window.location.href);var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className=-"geBtn";p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("makeCopy"));t.appendChild(p);var z=document.createElement("option");z.setAttribute("value","custom");mxUtils.write(z,mxResources.get("custom")+"...");t.appendChild(z);c.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==t.value){var E=new FilenameDialog(this,n,mxResources.get("ok"),function(C){null!=C?(n=C,z.setAttribute("title",C)):(t.value="blank",z.removeAttribute("title"))},-mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==e||e.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return f.checked?"blank"===t.value?"_blank":n:null},getEditInput:function(){return f},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function f(){var E=-document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(E.style.border="1px solid black",E.style.backgroundColor=t):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(E)}mxUtils.write(c,mxResources.get("links")+":");var p=document.createElement("select");p.style.width="100px";p.style.padding="0px";-p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";var n=document.createElement("option");n.setAttribute("value","auto");mxUtils.write(n,mxResources.get("automatic"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("openInNewWindow"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","self");mxUtils.write(n,mxResources.get("openInThisWindow"));p.appendChild(n);e&&(e=document.createElement("option"),-e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),p.appendChild(e));c.appendChild(p);mxUtils.write(c,mxResources.get("borderColor")+":");var t="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(t||"none",function(C){t=C;f()});mxEvent.consume(E)}));f();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height="22px";z.style.width="22px";z.style.position="relative";-z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return p.value},focus:function(){p.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,f,p,n,t){t=null!=t?t:[];f&&(t.push("lightbox=1"),"auto"!=c&&t.push("target="+c),null!=e&&e!=mxConstants.NONE&&t.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&t.push("edit="+encodeURIComponent(p)),-n&&t.push("layers=1"),this.editor.graph.foldingEnabled&&t.push("nav=1"));return t};EditorUi.prototype.createLink=function(c,e,f,p,n,t,z,E,C,F,R,U,O){var N=this.getCurrentFile();C=this.createUrlParameters(c,e,p,n,t,C);c=!0;null!=z?f="#U"+encodeURIComponent(z):E||null==N||""==N.getHash()?f="#R"+encodeURIComponent(f?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(f="#"+N.getHash(),c=!1);c&&null!=N&&null!=N.getTitle()&&N.getTitle()!=-this.defaultFilename&&C.push("title="+encodeURIComponent(N.getTitle()));F&&1<f.length&&(C.push("open="+f.substring(1)),f="");R&&null!=this.currentPage&&C.push("page-id="+this.currentPage.getId());U&&C.push("transparent=1");null!=O&&C.push("dark="+O);return(p&&(null!=z||null!=N&&N.getMode()!=App.MODE_GITHUB&&N.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+-"/"+(0<C.length?"?"+C.join("&"):"")+f};EditorUi.prototype.createHtml=function(c,e,f,p,n,t,z,E,C,F,R,U,O){this.getBasenames();var N={};""!=n&&n!=mxConstants.NONE&&(N.highlight=n);"auto"!==p&&(N.target=p);F||(N.lightbox=!1);N.nav=this.editor.graph.foldingEnabled;f=parseInt(f);isNaN(f)||100==f||(N.zoom=f/100);f=[];z&&(f.push("pages"),N.resize=!0,null!=this.pages&&null!=this.currentPage&&(N.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(f.push("zoom"),N.resize=!0);E&&f.push("layers");C&&f.push("tags");-null!=O&&(N["dark-mode"]=O);0<f.length&&(F&&f.push("lightbox"),N.toolbar=f.join(" "));null!=R&&0<R.length&&(N.edit=R);null!=c?N.url=c:N.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=f?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(N))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";U(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":-EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,f,p){var n=document.createElement("div");n.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(t);-var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");t=E.cloneNode(!0);t.setAttribute("value","copy");z.appendChild(t);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));-z.appendChild(C);mxUtils.br(z);z.appendChild(E);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));z.appendChild(C);var F=this.getCurrentFile();null==f&&null!=F&&F.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),z.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(F.getId(),-F)})));t.setAttribute("checked","checked");null==f&&E.setAttribute("disabled","disabled");n.appendChild(z);z=380;var R=this.addLinkSection(n),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));U.appendChild(C);-C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));C.setAttribute("selected","selected");U.appendChild(C);C.setAttribute("selected","selected");mxUtils.write(n,mxResources.get("appearance")+":");n.appendChild(U);mxUtils.br(n);z+=26;var O=this.addCheckbox(n,mxResources.get("zoom"),!0,null,!0);mxUtils.write(n,":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft=-"4px";N.style.marginRight="12px";N.value="100%";n.appendChild(N);var m=this.addCheckbox(n,mxResources.get("fit"),!0);C=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(n,mxResources.get("allPages"),C,!C),A=this.addCheckbox(n,mxResources.get("layers"),!0),B=this.addCheckbox(n,mxResources.get("tags"),!0),H=this.addCheckbox(n,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(n,H);var k=T.getEditInput();k.style.marginBottom="16px";z+=50;mxEvent.addListener(H,-"change",function(){H.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&H.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,n,mxUtils.bind(this,function(){p(E.checked?f:null,O.checked,N.value,R.getTarget(),R.getColor(),m.checked,u.checked,A.checked,B.checked,H.checked,null!=T?T.getLink():null,null!=U?U.value:null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);t.focus()};-EditorUi.prototype.showPublishLinkDialog=function(c,e,f,p,n,t,z,E,C,F,R){var U=document.createElement("div");U.style.whiteSpace="nowrap";var O=document.createElement("h3");mxUtils.write(O,c||mxResources.get("publish"));O.style.width="100%";O.style.textAlign="center";O.style.marginTop="2px";O.style.marginBottom="20px";U.appendChild(O);var N=document.createElement("select");c=30;N.className="geBtn";N.style.marginBottom="8px";N.style.marginLeft="0px";N.style.width="100%";N.style.boxSizing="border-box";-if(null==E||""==E.getHash())n=null!=n?n:"https://www.drawio.com/doc/faq/publish-diagram-as-link",O=document.createElement("option"),mxUtils.write(O,mxResources.get("makeCopy")),O.setAttribute("value","copy"),N.appendChild(O);O=document.createElement("option");mxUtils.write(O,mxResources.get("authorizationRequired"));O.setAttribute("value","auth");N.appendChild(O);null!=E&&""!=E.getHash()||O.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");N.appendChild(E);-null!=z?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",z),N.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));U.appendChild(N);mxUtils.br(U);N.focus();var m=null,u=null;if(null!=e||null!=f)c+=30,mxUtils.write(U,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft=-"6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",U.appendChild(m),mxUtils.write(U,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=f+"px",U.appendChild(u),mxUtils.br(U);var A=this.addLinkSection(U,p),B=F?this.addCheckbox(U,mxResources.get("transparentBackground"),!1):null;null!=B&&(c+=20);var H=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&-(c+=30,e=null!=this.currentPage?this.currentPage.getName():"",16<e.length&&(e=e.substring(0,16)+"..."),H=this.addCheckbox(U,mxResources.get("selectedPage")+": "+e));var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginTop="16px";e=document.createElement("option");e.setAttribute("value","0");mxUtils.write(e,mxResources.get("light"));T.appendChild(e);e=document.createElement("option");e.setAttribute("value","1");mxUtils.write(e,mxResources.get("dark"));-T.appendChild(e);e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));e.setAttribute("selected","selected");T.appendChild(e);R&&(mxUtils.write(U,mxResources.get("appearance")+":"),U.appendChild(T),mxUtils.br(U),c+=30);var k=this.addCheckbox(U,mxResources.get("lightbox"),!0,null,null,!p),v=this.addEditButton(U,k),G=v.getEditInput();p&&(G.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var I=this.addCheckbox(U,mxResources.get("layers"),-!0);I.style.marginLeft=G.style.marginLeft;I.style.marginTop="8px";var M=this.addCheckbox(U,mxResources.get("tags"),!0);M.style.marginLeft=G.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?(I.removeAttribute("disabled"),G.removeAttribute("disabled"),M.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));G.checked&&k.checked?v.getEditSelect().removeAttribute("disabled"):-v.getEditSelect().setAttribute("disabled","disabled")});p=new CustomDialog(this,U,mxUtils.bind(this,function(){C(A.getTarget(),A.getColor(),null==H?!1:H.checked,k.checked,v.getLink(),I.checked,null!=m?m.value:null,null!=u?u.value:null,M.checked,N.value,null!=B?B.checked:!1,T.value)}),null,mxResources.get("create"),n,t);this.showDialog(p.container,340,296+c,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)):null==-N.parentNode;A.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";t.appendChild(z);if(n){mxUtils.write(t,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";t.appendChild(E);mxUtils.write(t,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";t.appendChild(C);mxUtils.br(t)}var F=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=p?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),-Editor.defaultIncludeDiagram);z=this.editor.graph;var U=p?null:this.addCheckbox(t,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=U&&(U.style.marginBottom="16px");c=new CustomDialog(this,t,mxUtils.bind(this,function(){var O=parseInt(E.value)/100||1,N=parseInt(C.value)||0;f(!F.checked,null!=R?R.checked:!1,null!=U?U.checked:!1,O,N)}),null,c,e);this.showDialog(c.container,300,(n?25:0)+(p?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,-e,f,p,n,t,z,E,C){z=null!=z?z:Editor.defaultIncludeDiagram;var F=document.createElement("div");F.style.whiteSpace="nowrap";var R=this.editor.graph,U="jpeg"==E||"webp"==E?220:320,O=document.createElement("h3");mxUtils.write(O,c);O.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";F.appendChild(O);mxUtils.write(F,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft=-"4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";F.appendChild(N);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 u=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight=-"8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(O=0;O<c.length;O++)if(!R.isSelectionEmpty()||"selectionOnly"!=c[O]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(c[O]));H.setAttribute("value",c[O]);B.appendChild(H)}C?(mxUtils.write(F,mxResources.get("size")+":"),F.appendChild(B),mxUtils.br(F),-U+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):t&&(F.appendChild(A),mxUtils.write(F,mxResources.get("crop")),mxUtils.br(F),U+=30,mxEvent.addListener(u,"change",function(){u.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?C&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",U-=30):(B.value="diagram",A.setAttribute("checked","checked"),A.defaultChecked=-!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(F,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";t=document.createElement("option");t.setAttribute("value","light");mxUtils.write(t,mxResources.get("light"));k.appendChild(t);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,-mxResources.get("dark"));k.appendChild(C);"svg"==E?(t=document.createElement("option"),t.setAttribute("value","auto"),mxUtils.write(t,mxResources.get("automatic")),t.setAttribute("selected","selected"),k.appendChild(t)):Editor.isDarkMode()?C.setAttribute("selected","selected"):t.setAttribute("selected","selected");mxUtils.write(F,mxResources.get("appearance")+":");F.appendChild(k);mxUtils.br(F);U+=26;var v=this.addCheckbox(F,mxResources.get("shadow"),R.shadowVisible),G=null;if("png"==E||"jpeg"==E||-"webp"==E)G=this.addCheckbox(F,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var I=this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram")+":",z,null,null,"jpeg"!=E&&"webp"!=E),M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="28px";"png"==E||"svg"==E?(z=function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),-M.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),M.appendChild(R),I.style.marginBottom="12px",M.style.marginBottom="16px",F.appendChild(M),mxUtils.br(F),U+=20,null!=this.lastEmbedInclude&&(M.value=this.lastEmbedInclude),mxEvent.addListener(I,"change",z),z()):I.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");-var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");e&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,F.appendChild(P),mxUtils.write(F,mxResources.get("embedImages")),mxUtils.br(F),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,F.appendChild(S),mxUtils.write(F,mxResources.get("embedFonts")),mxUtils.br(F),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";-t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));V.appendChild(t);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));V.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));V.appendChild(z);z=document.createElement("div");mxUtils.write(z,mxResources.get("LinksLost"));z.style.margin="7px";z.style.display=-"none";"svg"==E&&(mxUtils.write(F,mxResources.get("links")+":"),F.appendChild(V),F.appendChild(z),mxUtils.br(F),mxUtils.br(F),U+=50);f=new CustomDialog(this,F,mxUtils.bind(this,function(){this.lastExportBorder=m.value;this.lastExportZoom=N.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=M.value;n(N.value,T.checked,!u.checked,v.checked,I.checked,P.checked&&e,m.value,A.checked,("png"==E||"svg"==E)&&"currentPage"==M.value,V.value,null!=G?G.checked:null,null!=-k?k.value:null,B.value,S.checked)}),null,f,p);this.showDialog(f.container,340,U,!0,!0,null,null,null,null,!0);N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var E=document.createElement("h3");mxUtils.write(E,e);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";-t.appendChild(E)}var C=this.addCheckbox(t,mxResources.get("fit"),!0),F=this.addCheckbox(t,mxResources.get("shadow"),z.shadowVisible&&p,!p),R=this.addCheckbox(t,f),U=this.addCheckbox(t,mxResources.get("lightbox"),!0),O=this.addEditButton(t,U),N=O.getEditInput(),m=1<z.model.getChildCount(z.model.getRoot()),u=this.addCheckbox(t,mxResources.get("layers"),m,!m);u.style.marginLeft=N.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?-(m&&u.removeAttribute("disabled"),N.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&U.checked?O.getEditSelect().removeAttribute("disabled"):O.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(C.checked,F.checked,R.checked,U.checked,O.getLink(),u.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=-function(c,e,f,p,n,t,z,E){function C(N){var m=" ",u="";p&&(m=" 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!=R?"&page="+R:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",u+=-"cursor:pointer;");c&&(u+="max-width:100%;");var A="";f&&(A=' width="'+Math.round(F.width)+'" height="'+Math.round(F.height)+'"');z('<img src="'+N+'"'+A+(""!=u?' style="'+u+'"':"")+m+"/>")}var F=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(N){var m=p?this.getFileData(!0):null;N=this.createImageDataUri(N,m,"png");C(N)}),null,null,null,mxUtils.bind(this,function(N){E({message:mxResources.get("unknownError")})}),-null,!0,f?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),F.width*F.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var U="";f&&(U="&w="+Math.round(2*F.width)+"&h="+Math.round(2*F.height));var O=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(p?"1":"0")+U+"&xml="+encodeURIComponent(e));O.send(mxUtils.bind(this,function(){200<=O.getStatus()&&299>=O.getStatus()?C("data:image/png;base64,"+O.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};-EditorUi.prototype.createEmbedSvg=function(c,e,f,p,n,t,z){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!f,"auto"),C=E.getElementsByTagName("a");if(null!=C)for(var F=0;F<C.length;F++){var R=C[F].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==C[F].getAttribute("target")&&C[F].removeAttribute("target")}p&&E.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(E);if(f){var U=" ",O="";p&&(U="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"+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",O+="cursor:pointer;");c&&(O+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(N){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(N))+'"'+(""!=O?' style="'+O+'"':"")+U+"/>")}))}else O="",p&&(e=this.getSelectedPageIndex(),E.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!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),O+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),n=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),O+="max-width:100%;max-height:"+n+"px;",E.removeAttribute("height")),""!=O&&E.setAttribute("style",O),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),z(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=+z,E,C,F,R,U,P,O){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(N){Editor.addRetryToError(N,mxUtils.bind(this,function(){this.exportSvg(c,e,f,p,n,t,z,E,C,F,R,U,P,O)}));this.handleError(N)})))try{var m=this.editor.graph.isSelectionEmpty();f=null!=f?f:m;var u=e?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==e&&(u=this.editor.graph.shapeBackgroundColor);var A=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&+(this.editor.graph.addForeignObjectWarning=function(){});var B=mxUtils.lightDarkColorSupported,H=mxUtils.preferDarkColor;if("light"==R||"dark"==R)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==R;var T=this.editor.graph.createSvgImageExport(n),k=this.editor.graph.getSvg(u,c,z,E,null,f,null,T,"blank"==F?"_blank":"self"==F?"_top":null,null,!P,R,U);mxUtils.lightDarkColorSupported=B;mxUtils.preferDarkColor=H;this.editor.graph.addForeignObjectWarning=A;p&&this.editor.graph.addSvgShadow(k);+var v=this.getBaseFilename()+(n?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(N){this.isLocalFileSave()||N.length<=MAX_REQUEST_SIZE?this.saveData(v,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(N)}))});var G=mxUtils.bind(this,function(N){this.spinner.stop();n&&N.setAttribute("content",this.getFileData(!0,null,null,null,f,C,null,null,null,null,null,c,z));O(Graph.xmlDeclaration++"\n"+(n?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(N))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);var I=mxUtils.bind(this,function(N){Editor.replaceSvgDataUris&&t&&EditorUi.embedSvgImages(N);Editor.foreignObjectImages&&P?this.replaceAlternateContent(N,R,G):G(N)}),M=mxUtils.bind(this,function(N){t&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(N,I,this.thumbImageCache)):I(N)});P?this.embedFonts(k,+M):(this.editor.addFontCss(k),M(k))}catch(N){this.handleError(N)}};EditorUi.prototype.replaceAlternateContent=function(c,e,f){function p(U,P,O,m,u){var A=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");A.setAttribute("x",P);A.setAttribute("y",O+.5);A.setAttribute("width",m.width);A.setAttribute("height",m.height);null==A.setAttributeNS?A.setAttribute("xlink:href",u):A.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);U.replaceChild(A,U.lastChild);E()}function n(){if(z<R.length)R[z++](n)}+var t="";e=c.getElementsByTagName("style");for(var z=0;z<e.length;z++)t+=e[z].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&f(c)}),C={},F={},R=[];for(z=0;z<e.length;z++)mxUtils.bind(this,function(U){var P=U.getElementsByTagName("div");if(0<P.length)try{var O=P[0].cloneNode(!0),m=parseInt(O.style.marginLeft),u=parseInt(O.style.paddingTop),A=O.getElementsByTagName("div")[1],B=P=!1,H=O.style.alignItems,T=O.style.justifyContent;+if(null!=O.style.writingMode){var k=O.style.writingMode;B="vertical-"==k.substring(0,9);P="-rl"==k.substring(k.length-3)}var v=!B&&"1px"==O.style.width||B&&"1px"==O.style.height;if(!B&&"1px"==O.style.height||B&&"1px"==O.style.width)O.style.alignItems=B&&P?"unsafe flex-end":"unsafe flex-start";v&&(O.style.justifyContent="unsafe flex-start");O.style.paddingTop="";O.style.marginLeft="";var G=O.outerHTML,I=C[G];null==I&&(O.style.position="absolute",O.style.visibility="hidden",document.body.appendChild(O),+k=1,k="1px"==O.style.width?A.offsetWidth:parseInt(O.style.width),v=1,v="1px"==O.style.height?A.offsetHeight:parseInt(O.style.height),document.body.removeChild(O),I=new mxRectangle(m,u,k,v),C[G]=I);"1px"==O.style.height&&("unsafe center"==H?u-=I.height/2:"unsafe flex-end"==H&&(u-=I.height));if("1px"==O.style.width)if(!B&&"unsafe center"==T||B&&"unsafe center"==H)m-=I.width/2;else if(!B&&"unsafe flex-end"==T||B&&(!P&&"unsafe flex-end"==H||P&&"unsafe flex-start"==H))m-=I.width;I=new mxRectangle(m,u,+I.width,I.height+parseInt(A.style.fontSize)/4);R.push(mxUtils.bind(this,function(M){var N=F[G];null==N?Graph.htmlToPng(G,I.width,I.height,mxUtils.bind(this,function(S){p(U,m,u,I,S);F[G]=S;M()}),t):(p(U,m,u,I,N),M())}))}catch(M){E()}else E()})(e[z]);0==counter&&f(c);z=0;n()};EditorUi.prototype.addRadiobox=function(c,e,f,p,n,t,z){return this.addCheckbox(c,f,p,n,t,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;var C=document.createElement("input");C.style.marginRight=+"8px";C.style.marginTop="16px";C.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();C.id=z;null!=E&&C.setAttribute("name",E);f&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);p&&C.setAttribute("disabled","disabled");t&&(c.appendChild(C),f=document.createElement("label"),mxUtils.write(f,e),f.setAttribute("for",z),c.appendChild(f),n||mxUtils.br(c));return C};EditorUi.prototype.addEditButton=function(c,e){var f=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);+f.style.marginLeft="24px";var p=this.getCurrentFile(),n="";null!=p&&p.getMode()!=App.MODE_DEVICE&&p.getMode()!=App.MODE_BROWSER&&(n=window.location.href);var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("makeCopy"));t.appendChild(p);var z=document.createElement("option");z.setAttribute("value",+"custom");mxUtils.write(z,mxResources.get("custom")+"...");t.appendChild(z);c.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==t.value){var E=new FilenameDialog(this,n,mxResources.get("ok"),function(C){null!=C?(n=C,z.setAttribute("title",C)):(t.value="blank",z.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,+function(){f.checked&&(null==e||e.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return f.checked?"blank"===t.value?"_blank":n:null},getEditInput:function(){return f},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function f(){var E=document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(E.style.border="1px solid black",+E.style.backgroundColor=t):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(E)}mxUtils.write(c,mxResources.get("links")+":");var p=document.createElement("select");p.style.width="100px";p.style.padding="0px";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";var n=document.createElement("option");n.setAttribute("value","auto");mxUtils.write(n,mxResources.get("automatic"));+p.appendChild(n);n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("openInNewWindow"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","self");mxUtils.write(n,mxResources.get("openInThisWindow"));p.appendChild(n);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),p.appendChild(e));c.appendChild(p);mxUtils.write(c,mxResources.get("borderColor")++":");var t="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(t||"none",function(C){t=C;f()});mxEvent.consume(E)}));f();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height="22px";z.style.width="22px";z.style.position="relative";z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return p.value},+focus:function(){p.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,f,p,n,t){t=null!=t?t:[];f&&(t.push("lightbox=1"),"auto"!=c&&t.push("target="+c),null!=e&&e!=mxConstants.NONE&&t.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&t.push("edit="+encodeURIComponent(p)),n&&t.push("layers=1"),this.editor.graph.foldingEnabled&&t.push("nav=1"));return t};EditorUi.prototype.createLink=function(c,e,f,p,n,t,z,E,C,F,R,U,P){var O=this.getCurrentFile();C=this.createUrlParameters(c,+e,p,n,t,C);c=!0;null!=z?f="#U"+encodeURIComponent(z):E||null==O||""==O.getHash()?f="#R"+encodeURIComponent(f?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(f="#"+O.getHash(),c=!1);c&&null!=O&&null!=O.getTitle()&&O.getTitle()!=this.defaultFilename&&C.push("title="+encodeURIComponent(O.getTitle()));F&&1<f.length&&(C.push("open="+f.substring(1)),f="");R&&null!=this.currentPage&&C.push("page-id="+this.currentPage.getId());U&&C.push("transparent=1");+null!=P&&C.push("dark="+P);return(p&&(null!=z||null!=O&&O.getMode()!=App.MODE_GITHUB&&O.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+f};EditorUi.prototype.createHtml=function(c,e,f,p,n,t,z,E,C,F,R,U,P){this.getBasenames();var O={};""!=n&&n!=mxConstants.NONE&&(O.highlight=n);"auto"!==p&&(O.target=p);F||(O.lightbox=+!1);O.nav=this.editor.graph.foldingEnabled;f=parseInt(f);isNaN(f)||100==f||(O.zoom=f/100);f=[];z&&(f.push("pages"),O.resize=!0,null!=this.pages&&null!=this.currentPage&&(O.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(f.push("zoom"),O.resize=!0);E&&f.push("layers");C&&f.push("tags");null!=P&&(O["dark-mode"]=P);0<f.length&&(F&&f.push("lightbox"),O.toolbar=f.join(" "));null!=R&&0<R.length&&(O.edit=R);null!=c?O.url=c:O.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'++(t?"max-width:100%;":"")+(""!=f?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(O))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";U(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")++'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,f,p){var n=document.createElement("div");n.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(t);var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";+E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");t=E.cloneNode(!0);t.setAttribute("value","copy");z.appendChild(t);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(C);mxUtils.br(z);z.appendChild(E);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));z.appendChild(C);var F=this.getCurrentFile();null==f&&null!=F&&F.constructor==window.DriveFile&&(C=+document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),z.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(F.getId(),F)})));t.setAttribute("checked","checked");null==f&&E.setAttribute("disabled","disabled");n.appendChild(z);z=380;var R=this.addLinkSection(n),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";+U.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));C.setAttribute("selected","selected");U.appendChild(C);C.setAttribute("selected","selected");mxUtils.write(n,mxResources.get("appearance")++":");n.appendChild(U);mxUtils.br(n);z+=26;var P=this.addCheckbox(n,mxResources.get("zoom"),!0,null,!0);mxUtils.write(n,":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value="100%";n.appendChild(O);var m=this.addCheckbox(n,mxResources.get("fit"),!0);C=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(n,mxResources.get("allPages"),C,!C),A=this.addCheckbox(n,mxResources.get("layers"),+!0),B=this.addCheckbox(n,mxResources.get("tags"),!0),H=this.addCheckbox(n,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(n,H);var k=T.getEditInput();k.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&H.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,n,mxUtils.bind(this,+function(){p(E.checked?f:null,P.checked,O.value,R.getTarget(),R.getColor(),m.checked,u.checked,A.checked,B.checked,H.checked,null!=T?T.getLink():null,null!=U?U.value:null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,f,p,n,t,z,E,C,F,R){var U=document.createElement("div");U.style.whiteSpace="nowrap";var P=document.createElement("h3");mxUtils.write(P,c||mxResources.get("publish"));P.style.width="100%";P.style.textAlign="center";+P.style.marginTop="2px";P.style.marginBottom="20px";U.appendChild(P);var O=document.createElement("select");c=30;O.className="geBtn";O.style.marginBottom="8px";O.style.marginLeft="0px";O.style.width="100%";O.style.boxSizing="border-box";if(null==E||""==E.getHash())n=null!=n?n:"https://www.drawio.com/doc/faq/publish-diagram-as-link",P=document.createElement("option"),mxUtils.write(P,mxResources.get("makeCopy")),P.setAttribute("value","copy"),O.appendChild(P);P=document.createElement("option");mxUtils.write(P,+mxResources.get("authorizationRequired"));P.setAttribute("value","auth");O.appendChild(P);null!=E&&""!=E.getHash()||P.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");O.appendChild(E);null!=z?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",z),O.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));U.appendChild(O);+mxUtils.br(U);O.focus();var m=null,u=null;if(null!=e||null!=f)c+=30,mxUtils.write(U,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",U.appendChild(m),mxUtils.write(U,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom=+"10px",u.value=f+"px",U.appendChild(u),mxUtils.br(U);var A=this.addLinkSection(U,p),B=F?this.addCheckbox(U,mxResources.get("transparentBackground"),!1):null;null!=B&&(c+=20);var H=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,e=null!=this.currentPage?this.currentPage.getName():"",16<e.length&&(e=e.substring(0,16)+"..."),H=this.addCheckbox(U,mxResources.get("selectedPage")+": "+e));var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft=+"8px";T.style.marginTop="16px";e=document.createElement("option");e.setAttribute("value","0");mxUtils.write(e,mxResources.get("light"));T.appendChild(e);e=document.createElement("option");e.setAttribute("value","1");mxUtils.write(e,mxResources.get("dark"));T.appendChild(e);e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));e.setAttribute("selected","selected");T.appendChild(e);R&&(mxUtils.write(U,mxResources.get("appearance")+":"),U.appendChild(T),+mxUtils.br(U),c+=30);var k=this.addCheckbox(U,mxResources.get("lightbox"),!0,null,null,!p),v=this.addEditButton(U,k),G=v.getEditInput();p&&(G.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var I=this.addCheckbox(U,mxResources.get("layers"),!0);I.style.marginLeft=G.style.marginLeft;I.style.marginTop="8px";var M=this.addCheckbox(U,mxResources.get("tags"),!0);M.style.marginLeft=G.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?+(I.removeAttribute("disabled"),G.removeAttribute("disabled"),M.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));G.checked&&k.checked?v.getEditSelect().removeAttribute("disabled"):v.getEditSelect().setAttribute("disabled","disabled")});p=new CustomDialog(this,U,mxUtils.bind(this,function(){C(A.getTarget(),A.getColor(),null==H?!1:H.checked,k.checked,v.getLink(),I.checked,null!=m?m.value:null,null!=u?u.value:+null,M.checked,O.value,null!=B?B.checked:!1,T.value)}),null,mxResources.get("create"),n,t);this.showDialog(p.container,340,296+c,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)):null==O.parentNode;A.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText=+"width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";t.appendChild(z);if(n){mxUtils.write(t,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";t.appendChild(E);mxUtils.write(t,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight=+"16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";t.appendChild(C);mxUtils.br(t)}var F=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=p?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var U=p?null:this.addCheckbox(t,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=U&&(U.style.marginBottom="16px");+c=new CustomDialog(this,t,mxUtils.bind(this,function(){var P=parseInt(E.value)/100||1,O=parseInt(C.value)||0;f(!F.checked,null!=R?R.checked:!1,null!=U?U.checked:!1,P,O)}),null,c,e);this.showDialog(c.container,300,(n?25:0)+(p?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,f,p,n,t,z,E,C){z=null!=z?z:Editor.defaultIncludeDiagram;var F=document.createElement("div");F.style.whiteSpace="nowrap";var R=this.editor.graph,U="jpeg"==E||"webp"==E?220:320,P=document.createElement("h3");mxUtils.write(P,+c);P.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";F.appendChild(P);mxUtils.write(F,mxResources.get("zoom")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";F.appendChild(O);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 u=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";c=["selectionOnly","diagram",+"page"];for(P=0;P<c.length;P++)if(!R.isSelectionEmpty()||"selectionOnly"!=c[P]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(c[P]));H.setAttribute("value",c[P]);B.appendChild(H)}C?(mxUtils.write(F,mxResources.get("size")+":"),F.appendChild(B),mxUtils.br(F),U+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):t&&(F.appendChild(A),mxUtils.write(F,mxResources.get("crop")),mxUtils.br(F),U+=30,mxEvent.addListener(u,"change",function(){u.checked?+A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?C&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",U-=30):(B.value="diagram",A.setAttribute("checked","checked"),A.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(F,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),k=document.createElement("select");+k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";t=document.createElement("option");t.setAttribute("value","light");mxUtils.write(t,mxResources.get("light"));k.appendChild(t);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));k.appendChild(C);"svg"==E&&mxUtils.lightDarkColorSupported?(t=document.createElement("option"),t.setAttribute("value","auto"),mxUtils.write(t,mxResources.get("automatic")),t.setAttribute("selected",+"selected"),k.appendChild(t)):Editor.isDarkMode()?C.setAttribute("selected","selected"):t.setAttribute("selected","selected");mxUtils.write(F,mxResources.get("appearance")+":");F.appendChild(k);mxUtils.br(F);U+=26;var v=this.addCheckbox(F,mxResources.get("shadow"),R.shadowVisible),G=null;if("png"==E||"jpeg"==E||"webp"==E)G=this.addCheckbox(F,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var I=this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram")+":",z,null,+null,"jpeg"!=E&&"webp"!=E),M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="28px";"png"==E||"svg"==E?(z=function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),M.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),M.appendChild(R),I.style.marginBottom=+"12px",M.style.marginBottom="16px",F.appendChild(M),mxUtils.br(F),U+=20,null!=this.lastEmbedInclude&&(M.value=this.lastEmbedInclude),mxEvent.addListener(I,"change",z),z()):I.style.marginBottom="16px";var N=document.createElement("input");N.style.marginBottom="16px";N.style.marginRight="8px";N.setAttribute("type","checkbox");var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");e&&(N.checked=null!=this.lastEmbedImages?this.lastEmbedImages:+!0,F.appendChild(N),mxUtils.write(F,mxResources.get("embedImages")),mxUtils.br(F),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,F.appendChild(S),mxUtils.write(F,mxResources.get("embedFonts")),mxUtils.br(F),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));V.appendChild(t);z=document.createElement("option");z.setAttribute("value",+"blank");mxUtils.write(z,mxResources.get("openInNewWindow"));V.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));V.appendChild(z);z=document.createElement("div");mxUtils.write(z,mxResources.get("LinksLost"));z.style.margin="7px";z.style.display="none";"svg"==E&&(mxUtils.write(F,mxResources.get("links")+":"),F.appendChild(V),F.appendChild(z),mxUtils.br(F),mxUtils.br(F),U+=50);f=new CustomDialog(this,F,mxUtils.bind(this,+function(){this.lastExportBorder=m.value;this.lastExportZoom=O.value;this.lastEmbedImages=N.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=M.value;n(O.value,T.checked,!u.checked,v.checked,I.checked,N.checked&&e,m.value,A.checked,("png"==E||"svg"==E)&&"currentPage"==M.value,V.value,null!=G?G.checked:null,null!=k?k.value:null,B.value,S.checked)}),null,f,p);this.showDialog(f.container,340,U,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?+O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var E=document.createElement("h3");mxUtils.write(E,e);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(E)}var C=this.addCheckbox(t,mxResources.get("fit"),!0),F=this.addCheckbox(t,mxResources.get("shadow"),z.shadowVisible&&p,!p),R=this.addCheckbox(t,+f),U=this.addCheckbox(t,mxResources.get("lightbox"),!0),P=this.addEditButton(t,U),O=P.getEditInput(),m=1<z.model.getChildCount(z.model.getRoot()),u=this.addCheckbox(t,mxResources.get("layers"),m,!m);u.style.marginLeft=O.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(m&&u.removeAttribute("disabled"),O.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&U.checked?+P.getEditSelect().removeAttribute("disabled"):P.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(C.checked,F.checked,R.checked,U.checked,P.getLink(),u.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,f,p,n,t,z,E){function C(O){var m=" ",u="";p&&(m=" 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!=R?"&page="+R:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");c&&(u+="max-width:100%;");var A="";f&&(A=' width="'+Math.round(F.width)+'" height="'+Math.round(F.height)+'"');z('<img src="'+O+'"'+A+(""!=u?' style="'+u+'"':"")+m+"/>")}var F=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var m=p?this.getFileData(!0):null;O=+this.createImageDataUri(O,m,"png");C(O)}),null,null,null,mxUtils.bind(this,function(O){E({message:mxResources.get("unknownError")})}),null,!0,f?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),F.width*F.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var U="";f&&(U="&w="+Math.round(2*F.width)+"&h="+Math.round(2*F.height));var P=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(p?"1":"0")+U+"&xml="+encodeURIComponent(e));P.send(mxUtils.bind(this,function(){200<=P.getStatus()&&+299>=P.getStatus()?C("data:image/png;base64,"+P.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,f,p,n,t,z){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!f,"auto"),C=E.getElementsByTagName("a");if(null!=C)for(var F=0;F<C.length;F++){var R=C[F].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==C[F].getAttribute("target")&&C[F].removeAttribute("target")}p&&+E.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(E);if(f){var U=" ",P="";p&&(U="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"+(n?"&edit=_blank":"")+(t?"&layers=1":+"")+"');}})(this);\"",P+="cursor:pointer;");c&&(P+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(O){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=P?' style="'+P+'"':"")+U+"/>")}))}else P="",p&&(e=this.getSelectedPageIndex(),E.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!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),P+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),n=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),P+="max-width:100%;max-height:"+n+"px;",E.removeAttribute("height")),""!=P&&E.setAttribute("style",P),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),z(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var f=null;if("diagram"==c.nodeName)f=c;else if("mxfile"==c.nodeName){var p=c.getElementsByTagName("diagram");if(0<p.length){f=p[0];var n=e.getGlobalVariable;e.getGlobalVariable=function(t){return"page"==t?f.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:n.apply(this,arguments)}}}null!=f&&(c=Editor.parseDiagramNode(f))}p=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(t){}finally{this.editor.graph=p}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};EditorUi.prototype.getPngFileProperties=function(c){var e=1,f=0;if(null!=c){if(c.hasAttribute("scale")){var p=parseFloat(c.getAttribute("scale"));!isNaN(p)&&0<p&&(e=p)}c.hasAttribute("border")&&(p=parseInt(c.getAttribute("border")),!isNaN(p)&&0<p&&(f=p))}return{scale:e,border:f}};EditorUi.prototype.getEmbeddedPng=function(c,e,f,p,n){try{var t=this.editor.graph,z=null;if(null!=f&&0<f.length)t=this.createTemporaryGraph(t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,!0),t),z=f;else if(null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(t.getStylesheet());var E=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var C=this.pages[0];this.currentPage==C?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=C.viewState&&null!=C.viewState&&t.setBackgroundImage(C.viewState.backgroundImage);t.getGlobalVariable=function(F){return"page"==F?C.getName():"pagenumber"==F?1:E.apply(this,arguments)};document.body.appendChild(t.container);t.model.setRoot(C.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(F){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=F.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(z));c(R.substring(R.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(U){null!=e&&e(U)}}),null,null,null,mxUtils.bind(this,function(F){null!=e&&e(F)}),null,null,p,null,t.shadowVisible,null,t,n,null,-null,null,"diagram",null)}catch(F){null!=e&&e(F)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,f,p,n,t,z,E,C,F,R,U,O){E=null!=E?E:!0;R=null!=R?R:0;z=null!=C?C:e.background;z==mxConstants.NONE&&(z=null);null==z&&"none"==e.getAdaptiveColors()&&(z="#ffffff");C=this.editor.graph.createSvgImageExport(null!=c);t=e.getSvg(z,F,R,null,null,t,null,C,null,e.shadowVisible||U,null,O,"diagram");(e.shadowVisible||U)&&e.addSvgShadow(t,null,null,0==R);null!=c&&t.setAttribute("content",c);null!=f&&t.setAttribute("resource",-f);var N=mxUtils.bind(this,function(m){m=(p?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(m);null!=n&&n(m);return m});e.mathEnabled&&this.editor.addMathCss(t);if(null!=n)this.embedFonts(t,mxUtils.bind(this,function(m){E?this.editor.convertImages(m,mxUtils.bind(this,function(u){N(u)})):N(m)}));else return N(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(c,f),e(c)}catch(p){e(c)}}))}catch(f){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,f,p,n,t,z,E,C,F,R,U,O){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(m){Editor.addRetryToError(m,mxUtils.bind(this,function(){this.exportImage(c,e,f,p,n,t,z,E,C,F,R,U,O)}));this.handleError(m)}))){var N=this.editor.graph.isSelectionEmpty();-f=null!=f?f:N;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(m){this.spinner.stop();try{this.saveCanvas(m,n?this.getFileData(!0,null,null,null,f,E,null,null,null,null,null,c,t):null,C,null==this.pages||0==this.pages.length,R)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,f,c||1,e,p,null,null,t,z,F,U,O)}catch(m){this.spinner.stop(),this.handleError(m)}}};+null,null,"diagram",null)}catch(F){null!=e&&e(F)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,f,p,n,t,z,E,C,F,R,U,P){E=null!=E?E:!0;R=null!=R?R:0;z=null!=C?C:e.background;z==mxConstants.NONE&&(z=null);null==z&&"none"==e.getAdaptiveColors()&&(z="#ffffff");C=this.editor.graph.createSvgImageExport(null!=c);t=e.getSvg(z,F,R,null,null,t,null,C,null,e.shadowVisible||U,null,P,"diagram");(e.shadowVisible||U)&&e.addSvgShadow(t,null,null,0==R);null!=c&&t.setAttribute("content",c);null!=f&&t.setAttribute("resource",+f);var O=mxUtils.bind(this,function(m){m=(p?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(m);null!=n&&n(m);return m});e.mathEnabled&&this.editor.addMathCss(t);if(null!=n)this.embedFonts(t,mxUtils.bind(this,function(m){E?this.editor.convertImages(m,mxUtils.bind(this,function(u){O(u)})):O(m)}));else return O(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(c,f),e(c)}catch(p){e(c)}}))}catch(f){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,f,p,n,t,z,E,C,F,R,U,P){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(m){Editor.addRetryToError(m,mxUtils.bind(this,function(){this.exportImage(c,e,f,p,n,t,z,E,C,F,R,U,P)}));this.handleError(m)}))){var O=this.editor.graph.isSelectionEmpty();+f=null!=f?f:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(m){this.spinner.stop();try{this.saveCanvas(m,n?this.getFileData(!0,null,null,null,f,E,null,null,null,null,null,c,t):null,C,null==this.pages||0==this.pages.length,R)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,f,c||1,e,p,null,null,t,z,F,U,P)}catch(m){this.spinner.stop(),this.handleError(m)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)c[this.pages[e].getId()]=this.pages[e].getId();return c};EditorUi.prototype.importXml=function(c,e,f,p,n,t,z){e=null!=e?e:0;f=null!=f?f:0;var E=[];try{var C=this.editor.graph;if(null!=c&&0<c.length){C.model.beginUpdate();try{var F=mxUtils.parseXml(c);c={};var R=this.editor.extractGraphModel(F.documentElement,-null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var U=R.getElementsByTagName("diagram");if(1==U.length&&!t){if(R=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(c[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var O=U[0].getAttribute("name");null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,O))}}else if(0<U.length){t=[];var N=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[U[0].getAttribute("id")]=-this.pages[0].getId(),O=U[0].getAttribute("name"),null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],O)),R=Editor.parseDiagramNode(U[0]),p=!1,N=1);for(;N<U.length;N++){var m=U[N].getAttribute("id");U[N].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(U[N]));c[m]=U[N].getAttribute("id");var A=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[A+1]));C.model.execute(new ChangePage(this,u,u,A,!0));t.push(u)}this.updatePageLinks(c,-t)}}if(null!=R&&"mxGraphModel"===R.nodeName){E=C.importGraphModel(R,e,f,p);if(null!=E)for(this.addLocalPagesToMapping(c),N=0;N<E.length;N++)this.updatePageLinksForCell(c,E[N]);var B=C.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=B&&null!=B.originalSrc){this.updateBackgroundPageLink(c,B);var H=new ChangePageSetup(this,null,B);H.ignoreColor=!0;C.model.execute(H)}}z&&C.pasteCellStyles(C.includeDescendants(E),C.defaultVertexStyle,C.defaultEdgeStyle)}finally{C.model.endUpdate()}}}catch(T){if(n)throw T;+null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var U=R.getElementsByTagName("diagram");if(1==U.length&&!t){if(R=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(c[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var P=U[0].getAttribute("name");null!=P&&""!=P&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,P))}}else if(0<U.length){t=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[U[0].getAttribute("id")]=+this.pages[0].getId(),P=U[0].getAttribute("name"),null!=P&&""!=P&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],P)),R=Editor.parseDiagramNode(U[0]),p=!1,O=1);for(;O<U.length;O++){var m=U[O].getAttribute("id");U[O].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(U[O]));c[m]=U[O].getAttribute("id");var A=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[A+1]));C.model.execute(new ChangePage(this,u,u,A,!0));t.push(u)}this.updatePageLinks(c,+t)}}if(null!=R&&"mxGraphModel"===R.nodeName){E=C.importGraphModel(R,e,f,p);if(null!=E)for(this.addLocalPagesToMapping(c),O=0;O<E.length;O++)this.updatePageLinksForCell(c,E[O]);var B=C.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=B&&null!=B.originalSrc){this.updateBackgroundPageLink(c,B);var H=new ChangePageSetup(this,null,B);H.ignoreColor=!0;C.model.execute(H)}}z&&C.pasteCellStyles(C.includeDescendants(E),C.defaultVertexStyle,C.defaultEdgeStyle)}finally{C.model.endUpdate()}}}catch(T){if(n)throw T;this.handleError(T)}return E};EditorUi.prototype.updatePageLinks=function(c,e){for(var f=0;f<e.length;f++)this.updatePageLinksForCell(c,e[f].root),null!=e[f].viewState&&this.updateBackgroundPageLink(c,e[f].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var f=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=f&&(e.originalSrc="data:page/id,"+f)}}catch(p){}};EditorUi.prototype.updatePageLinksForCell=function(c,e){var f=document.createElement("div"),p=this.editor.graph,n=p.getLinkForCell(e);null!=n&&p.setLinkForCell(e,this.updatePageLink(c,n));if(p.isHtmlLabel(e)){f.innerHTML=Graph.sanitizeHtml(p.getLabel(e));for(var t=f.getElementsByTagName("a"),z=!1,E=0;E<t.length;E++)n=t[E].getAttribute("href"),null!=n&&(t[E].setAttribute("href",this.updatePageLink(c,n)),z=!0);z&&p.labelChanged(e,f.innerHTML)}for(E=0;E<p.model.getChildCount(e);E++)this.updatePageLinksForCell(c,p.model.getChildAt(e,E))};EditorUi.prototype.updatePageLink=function(c,e){if(Graph.isPageLink(e)){var f=c[e.substring(e.indexOf(",")+1)];e=null!=f?"data:page/id,"+f:null}else if("data:action/json,"==e.substring(0,17))try{var p=JSON.parse(e.substring(17));if(null!=p.actions){for(var n=0;n<p.actions.length;n++){var t=p.actions[n];if(null!=t.open&&Graph.isPageLink(t.open)){var z=t.open.substring(t.open.indexOf(",")+1);f=c[z];null!=f?t.open="data:page/id,"+f:null==this.getPageById(z)&&delete t.open}}e="data:action/json,"+JSON.stringify(p)}}catch(E){}return e};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,f,p,n){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=f?f(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){p=null!=p?p:c.name;var E=mxUtils.bind(this,function(F){z.clear()&&t(F)}),C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(p);-try{var R=p.lastIndexOf(".");if(0<=R&&R<p.length)p.substring(R+1).toUpperCase();else{var U=p.lastIndexOf("/");0<=U&&U<p.length&&(p=p.substring(U+1))}}catch(N){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",c,p);var O=new XMLHttpRequest;O.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(p)?"?stencil=1":""));O.responseType="blob";this.addRemoteServiceSecurityCheck(O);-null!=n&&O.setRequestHeader("x-convert-custom",n);O.onreadystatechange=mxUtils.bind(this,function(){if(4==O.readyState&&z.clear())if(200<=O.status&&299>=O.status)try{var N=O.response;if("text/xml"==N.type){var m=new FileReader;m.onload=mxUtils.bind(this,function(u){try{e(u.target.result)}catch(A){E({message:mxResources.get("errorLoadingFile")})}});m.readAsText(N)}else this.doImportVisio(N,e,E,p)}catch(u){E(u)}else try{""==O.responseType||"text"==O.responseType?E({message:O.responseText}):(m=new FileReader,-m.onload=function(){try{E({message:JSON.parse(m.result).Message})}catch(u){E(u)}},m.readAsText(O.response))}catch(u){E({})}});O.send(F)}else if(z.clear())try{this.doImportVisio(c,e,E,p)}catch(N){E(N)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,E))}),t)};EditorUi.prototype.importGraphML=function(c,e,f){var p=+try{var R=p.lastIndexOf(".");if(0<=R&&R<p.length)p.substring(R+1).toUpperCase();else{var U=p.lastIndexOf("/");0<=U&&U<p.length&&(p=p.substring(U+1))}}catch(O){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",c,p);var P=new XMLHttpRequest;P.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(p)?"?stencil=1":""));P.responseType="blob";this.addRemoteServiceSecurityCheck(P);+null!=n&&P.setRequestHeader("x-convert-custom",n);P.onreadystatechange=mxUtils.bind(this,function(){if(4==P.readyState&&z.clear())if(200<=P.status&&299>=P.status)try{var O=P.response;if("text/xml"==O.type){var m=new FileReader;m.onload=mxUtils.bind(this,function(u){try{e(u.target.result)}catch(A){E({message:mxResources.get("errorLoadingFile")})}});m.readAsText(O)}else this.doImportVisio(O,e,E,p)}catch(u){E(u)}else try{""==P.responseType||"text"==P.responseType?E({message:P.responseText}):(m=new FileReader,+m.onload=function(){try{E({message:JSON.parse(m.result).Message})}catch(u){E(u)}},m.readAsText(P.response))}catch(u){E({})}});P.send(F)}else if(z.clear())try{this.doImportVisio(c,e,E,p)}catch(O){E(O)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,E))}),t)};EditorUi.prototype.importGraphML=function(c,e,f){var p=mxUtils.bind(this,function(n){this.loadingExtensions=!1;null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(E){n.clear()&&p(E)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,e,p)}catch(E){t(E)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(f){this.loadingExtensions=!1;this.handleError(f)});this.createTimeout(null,mxUtils.bind(this,function(f){var p=mxUtils.bind(this,function(t){f.clear()&&e(t)}),n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(f.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||p({message:mxResources.get("unknownError")})}catch(t){p(t)}else p({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,p))}),e)}};EditorUi.prototype.convertLucidChart=function(c,e,f){var p=mxUtils.bind(this,function(n){this.loadingExtensions=!1;@@ -13250,21 +13251,21 @@ null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,funnull!=E.thumb&&C.push(E.thumb);console.log.apply(console,C)}}catch(R){}}catch(R){null!=window.console&&console.error(R),t(R)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,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",z,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.createMermaidXml=function(c,e,f,p,n,t){var z=new Graph(document.createElement("div"));f=z.insertVertex(null,null,null,0,0,p,n,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+f+";");z.setAttributeForCell(f,"mermaidData",JSON.stringify({data:c,config:e},null,2));null!=t&&z.setAttributeForCell(f,"templatePrompt",t);c=(new mxCodec).encode(z.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,e,f){var p=0,n=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(t){var z=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),E=mxUtils.bind(this,function(C){t.clear()&&f(C)});z.send(mxUtils.bind(this,function(C){if(t.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,-function(){var R=mxUtils.trim(C.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(U,O,N){this.tryAndHandle(mxUtils.bind(this,function(){t.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",R),e(R,U,O,N))}),E)}),E,mxUtils.bind(this,function(U){3>p++?t.clear()&&n():E(U)}))}),E);else{var F={message:mxResources.get("error")+" "+C.getStatus()};try{F=JSON.parse(C.getText()),F=F.error}catch(R){}E(F)}}),E)}),f)});n()};EditorUi.prototype.extractMermaidDeclaration=+function(){var R=mxUtils.trim(C.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(U,P,O){this.tryAndHandle(mxUtils.bind(this,function(){t.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",R),e(R,U,P,O))}),E)}),E,mxUtils.bind(this,function(U){3>p++?t.clear()&&n():E(U)}))}),E);else{var F={message:mxResources.get("error")+" "+C.getStatus()};try{F=JSON.parse(C.getText()),F=F.error}catch(R){}E(F)}}),E)}),f)});n()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var e=c.split("```");e=1<e.length?e:c.split("<pre>");e=1<e.length?e:c.split("~~~");e=1<e.length?e:c.split("%%");e=1<e.length?e:c.split("(Begins)");c=mxUtils.trim(1>=e.length?c:e[1]);e=c.split("\n");var f=1<e.length?e[1]:null;if(null!=f){var p=f.indexOf("-");0<p&&(f=f.substring(0,p))}if(0<e.length&&"mermaid"==mxUtils.trim(e[0])||null!=f&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f))e.shift(),c=mxUtils.trim(e.join("\n")),e=c.split("\n");f=e[0].split(" ")[0].replace(/:$/,"");p=f.indexOf("-");0<p&&(f=f.substring(0,p));try{"mindmap"==f&&2<e.length&&(c=extractMermaidMindmap(e))}catch(n){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,e,f,p,n){var t=mxUtils.bind(this,function(E){this.loadingMermaid=!1;null!=p?p(E):this.handleError(E)}),z=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig);e.securityLevel="strict";e.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&e.flowchart&&0<=c.indexOf("$$")&&(e.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(e.theme="dark");var E=mxUtils.bind(this,function(C){try{if(mxClient.IS_IE||mxClient.IS_IE11)C=C.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var F=mxUtils.parseXml(C).getElementsByTagName("svg");if(0<F.length&&"error"!=-F[0].getAttribute("aria-roledescription")){var R=parseFloat(F[0].getAttribute("width")),U=parseFloat(F[0].getAttribute("height"));if(isNaN(R)||isNaN(U))try{var O=F[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(O[2]);U=parseFloat(O[3])}catch(N){R=R||100,U=U||100}f(this.convertDataUri(Editor.createSvgDataUri(C)),R,U)}else null!=n?n():p({message:mxResources.get("invalidInput")})}catch(N){p(N)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),+F[0].getAttribute("aria-roledescription")){var R=parseFloat(F[0].getAttribute("width")),U=parseFloat(F[0].getAttribute("height"));if(isNaN(R)||isNaN(U))try{var P=F[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(P[2]);U=parseFloat(P[3])}catch(O){R=R||100,U=U||100}f(this.convertDataUri(Editor.createSvgDataUri(C)),R,U)}else null!=n?n():p({message:mxResources.get("invalidInput")})}catch(O){p(O)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(C){E(C.svg)}).catch(function(C){null!=n?n(C):p(C)})}catch(C){p(C)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){this.importXml(E,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",z,null,null,null,t)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))};EditorUi.prototype.generatePlantUmlImage=function(c,e,f,p){function n(E,C,F){c1=E>>2;c2=(E&3)<<4|C>>4;c3=(C&15)<<2|F>>6;c4=F&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(E){r="";-for(i=0;i<E.length;i+=3)r=i+2==E.length?r+n(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+n(E.charCodeAt(i),0,0):r+n(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==e)f(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(F){var R=new Image;R.onload=function(){try{var U=R.width,O=R.height;-if(0==U&&0==O){var N=C.result,m=N.indexOf(","),u=decodeURIComponent(escape(atob(N.substring(m+1)))),A=mxUtils.parseXml(u).getElementsByTagName("svg");0<A.length&&(U=parseFloat(A[0].getAttribute("width")),O=parseFloat(A[0].getAttribute("height")))}f(C.result,U,O)}catch(B){p(B)}};R.src=C.result};C.onerror=function(F){p(F)}}else p(E)};z.onerror=function(E){p(E)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,f){var p=this.editor.graph,n=null;p.getModel().beginUpdate();try{n=p.insertVertex(null,-null,"<pre>"+c+"</pre>",e,f,1,1,"text;html=1;align=left;verticalAlign=top;"),p.updateCellSize(n,!0)}finally{p.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(O){4==O.readyState&&200<=-O.status&&299>=O.status&&this.editor.graph.setSelectionCells(this.insertTextAt(O.responseText,e,f,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var C=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var F=Editor.extractGraphModelFromPdf(c);if(null!=F&&0<F.length)return this.importXml(F,e,f,t,!0,E)}if(Editor.isPngDataUrl(c)&&(F=Editor.extractGraphModelFromPng(c),null!=F&&0<F.length))return this.importXml(F,e,f,t,-!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{F=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(F=c.substring(c.indexOf(",")+1),F=window.atob&&!mxClient.IS_SF?atob(F):Base64.decode(F,!0)):F=decodeURIComponent(c.substring(c.indexOf(",")+1));var R=this.importXml(F,e,f,t,!0,E);if(0<R.length)return R}catch(O){}this.loadImage(c,mxUtils.bind(this,function(O){if("data:"==c.substring(0,5))this.resizeImage(O,c,mxUtils.bind(this,function(u,A,B){C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),-C.snap(f),A,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),z,this.maxImageSize);else{var N=Math.min(1,Math.min(this.maxImageSize/O.width,this.maxImageSize/O.height)),m=Math.round(O.width*N);O=Math.round(O.height*N);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),C.snap(f),m,O,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-c+";"))}}),mxUtils.bind(this,function(){var O=null;C.getModel().beginUpdate();try{O=C.insertVertex(C.getDefaultParent(),null,c,C.snap(e),C.snap(f),1,1,"text;"+(p?"html=1;":"")),C.updateCellSize(O),C.fireEvent(new mxEventObject("textInserted","cells",[O]))}finally{C.getModel().endUpdate()}C.setSelectionCell(O)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,f,t,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,-function(O){this.editor.graph.setSelectionCells(this.importXml(O,e,f,t,null,E))}),mxUtils.bind(this,function(O){this.handleError(O)}));else{C=this.editor.graph;n=null;C.getModel().beginUpdate();try{n=C.insertVertex(C.getDefaultParent(),null,"",C.snap(e),C.snap(f),1,1,"text;whiteSpace=wrap;"+(p?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[n]));p&&(c=C.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");n.value=c;C.updateCellSize(n);if(0<this.maxTextWidth&&+for(i=0;i<E.length;i+=3)r=i+2==E.length?r+n(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+n(E.charCodeAt(i),0,0):r+n(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==e)f(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(F){var R=new Image;R.onload=function(){try{var U=R.width,P=R.height;+if(0==U&&0==P){var O=C.result,m=O.indexOf(","),u=decodeURIComponent(escape(atob(O.substring(m+1)))),A=mxUtils.parseXml(u).getElementsByTagName("svg");0<A.length&&(U=parseFloat(A[0].getAttribute("width")),P=parseFloat(A[0].getAttribute("height")))}f(C.result,U,P)}catch(B){p(B)}};R.src=C.result};C.onerror=function(F){p(F)}}else p(E)};z.onerror=function(E){p(E)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,f){var p=this.editor.graph,n=null;p.getModel().beginUpdate();try{n=p.insertVertex(null,+null,"<pre>"+c+"</pre>",e,f,1,1,"text;html=1;align=left;verticalAlign=top;"),p.updateCellSize(n,!0)}finally{p.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(P){4==P.readyState&&200<=+P.status&&299>=P.status&&this.editor.graph.setSelectionCells(this.insertTextAt(P.responseText,e,f,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var C=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var F=Editor.extractGraphModelFromPdf(c);if(null!=F&&0<F.length)return this.importXml(F,e,f,t,!0,E)}if(Editor.isPngDataUrl(c)&&(F=Editor.extractGraphModelFromPng(c),null!=F&&0<F.length))return this.importXml(F,e,f,t,+!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{F=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(F=c.substring(c.indexOf(",")+1),F=window.atob&&!mxClient.IS_SF?atob(F):Base64.decode(F,!0)):F=decodeURIComponent(c.substring(c.indexOf(",")+1));var R=this.importXml(F,e,f,t,!0,E);if(0<R.length)return R}catch(P){}this.loadImage(c,mxUtils.bind(this,function(P){if("data:"==c.substring(0,5))this.resizeImage(P,c,mxUtils.bind(this,function(u,A,B){C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),+C.snap(f),A,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),z,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/P.width,this.maxImageSize/P.height)),m=Math.round(P.width*O);P=Math.round(P.height*O);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),C.snap(f),m,P,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++c+";"))}}),mxUtils.bind(this,function(){var P=null;C.getModel().beginUpdate();try{P=C.insertVertex(C.getDefaultParent(),null,c,C.snap(e),C.snap(f),1,1,"text;"+(p?"html=1;":"")),C.updateCellSize(P),C.fireEvent(new mxEventObject("textInserted","cells",[P]))}finally{C.getModel().endUpdate()}C.setSelectionCell(P)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,f,t,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,+function(P){this.editor.graph.setSelectionCells(this.importXml(P,e,f,t,null,E))}),mxUtils.bind(this,function(P){this.handleError(P)}));else{C=this.editor.graph;n=null;C.getModel().beginUpdate();try{n=C.insertVertex(C.getDefaultParent(),null,"",C.snap(e),C.snap(f),1,1,"text;whiteSpace=wrap;"+(p?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[n]));p&&(c=C.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");n.value=c;C.updateCellSize(n);if(0<this.maxTextWidth&&n.geometry.width>this.maxTextWidth){var U=C.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=U.width;n.geometry.height=U.height}Graph.isLink(n.value)&&C.setLinkForCell(n,n.value);n.geometry.width+=C.gridSize;n.geometry.height+=C.gridSize}finally{C.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.importFiles(f.files,null,null,this.maxImageSize),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.importFileInputElt=f}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,E){StorageFile.listFiles(this,"F",z,E)});window.openBrowserFile=@@ -13272,58 +13273,58 @@ mxUtils.bind(this,function(z,E,C){StorageFile.getFileContent(this,z,E,C)});windomxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var n=this.dialog,t=n.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=p;t.apply(n,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,e,f){var p=this,n=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(t){if(mxUtils.isEmptyObject(t.files))f();else{var z=0,E,C=!1;t.forEach(function(F,R){F=R.name.toLowerCase();"diagram/diagram.xml"==F?(C=!0,R.async("string").then(function(U){0==U.indexOf("<mxfile ")?e(U):f()})):0==F.indexOf("versions/")&&(F=parseInt(F.substr(9)),F>z&&(z=F,E=R))});0<z?E.async("string").then(function(F){(new XMLHttpRequest).upload&&p.isRemoteFileFormat(F,c.name)?p.isOffline()?p.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f):p.parseFileData(F,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?e(R.responseText):f())}),c.name):f()}):C||f()}},function(t){f(t)}):f()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,f))};EditorUi.prototype.importFile=function(c,e,f,p,n,t,z,-E,C,F,R,U){F=null!=F?F:!0;var O=!1,N=null,m=mxUtils.bind(this,function(u){var A=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,z)),this.showSidebar()):A=this.importXml(u,f,p,F,null,null!=U?mxEvent.isControlDown(U):null);null!=E&&E(A)});"image"==e.substring(0,5)?(C=!1,"image/png"==e.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(c),null!=R&&0<R.length&&(N=this.importXml(R,f,p,F,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(C=this.editor.graph,-R=c.indexOf(";"),0<R&&(c=c.substring(0,R)+c.substring(c.indexOf(",",R+1))),F&&C.isGridEnabled()&&(f=C.snap(f),p=C.snap(p)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==e.substring(0,9)&&(R+="editableCssRules=.*;"),N=[C.insertVertex(null,null,"",f,p,n,t,R+"image="+c+";")])):/(\.*<graphml )/.test(c)?(O=!0,this.importGraphML(c,m)):null!=C&&null!=z&&EditorUi.isVisioFilename(z)?(O=!0,this.importVisio(C,m)):(new XMLHttpRequest).upload&&-this.isRemoteFileFormat(c,z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(O=!0,e=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?m(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,z):this.parseFile(C,e,z)):0==c.indexOf("PK")&&null!=C?(O=!0,this.importZipFile(C,m,mxUtils.bind(this,function(){N=-this.insertTextAt(this.validateFileData(c),f,p,!0,null,F);E(N)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(N=this.insertTextAt(this.validateFileData(c),f,p,!0,null,F,null,null!=U?mxEvent.isControlDown(U):null));O||null==E||E(N);return N};EditorUi.prototype.importFiles=function(c,e,f,p,n,t,z,E,C,F,R,U,O){p=null!=p?p:this.maxImageSize;F=null!=F?F:this.maxImageBytes;var N=null!=e&&null!=f,m=!0;e=null!=e?e:0;f=null!=f?f:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var A=R||-this.resampleThreshold,B=0;B<c.length;B++)if("image/svg"!==c[B].type.substring(0,9)&&"image/"===c[B].type.substring(0,6)&&c[B].size>A){u=!0;break}var H=mxUtils.bind(this,function(){var T=this.editor.graph,k=T.gridSize;n=null!=n?n:mxUtils.bind(this,function(S,V,W,X,Z,Y,ba,ea,ca){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,ba)),this.showSidebar(),null;this.isCompatibleString(S)&&1==c.length&&null!=O&&"drop"==O.type&&this.isBlankFile()&&-!this.canUndo()&&(N=!1,X=W=0);return this.importFile(S,V,W,X,Z,Y,ba,ea,ca,N,U,O)}catch(fa){return this.handleError(fa),null}});t=null!=t?t:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var v=c.length,G=v,I=[],M=mxUtils.bind(this,function(S,V){I[S]=V;if(0==--G){this.spinner.stop();if(null!=E)E(I);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<I.length;S++){var X=I[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}t(W)}}),-P=0;P<v;P++)mxUtils.bind(this,function(S){var V=c[S];if(null!=V){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==z||z(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=U?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&+E,C,F,R,U){F=null!=F?F:!0;var P=!1,O=null,m=mxUtils.bind(this,function(u){var A=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,z)),this.showSidebar()):A=this.importXml(u,f,p,F,null,null!=U?mxEvent.isControlDown(U):null);null!=E&&E(A)});"image"==e.substring(0,5)?(C=!1,"image/png"==e.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(c),null!=R&&0<R.length&&(O=this.importXml(R,f,p,F,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(C=this.editor.graph,+R=c.indexOf(";"),0<R&&(c=c.substring(0,R)+c.substring(c.indexOf(",",R+1))),F&&C.isGridEnabled()&&(f=C.snap(f),p=C.snap(p)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==e.substring(0,9)&&(R+="editableCssRules=.*;"),O=[C.insertVertex(null,null,"",f,p,n,t,R+"image="+c+";")])):/(\.*<graphml )/.test(c)?(P=!0,this.importGraphML(c,m)):null!=C&&null!=z&&EditorUi.isVisioFilename(z)?(P=!0,this.importVisio(C,m)):(new XMLHttpRequest).upload&&+this.isRemoteFileFormat(c,z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(P=!0,e=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?m(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,z):this.parseFile(C,e,z)):0==c.indexOf("PK")&&null!=C?(P=!0,this.importZipFile(C,m,mxUtils.bind(this,function(){O=+this.insertTextAt(this.validateFileData(c),f,p,!0,null,F);E(O)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(O=this.insertTextAt(this.validateFileData(c),f,p,!0,null,F,null,null!=U?mxEvent.isControlDown(U):null));P||null==E||E(O);return O};EditorUi.prototype.importFiles=function(c,e,f,p,n,t,z,E,C,F,R,U,P){p=null!=p?p:this.maxImageSize;F=null!=F?F:this.maxImageBytes;var O=null!=e&&null!=f,m=!0;e=null!=e?e:0;f=null!=f?f:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var A=R||+this.resampleThreshold,B=0;B<c.length;B++)if("image/svg"!==c[B].type.substring(0,9)&&"image/"===c[B].type.substring(0,6)&&c[B].size>A){u=!0;break}var H=mxUtils.bind(this,function(){var T=this.editor.graph,k=T.gridSize;n=null!=n?n:mxUtils.bind(this,function(S,V,W,X,Z,Y,ba,ea,ca){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,ba)),this.showSidebar(),null;this.isCompatibleString(S)&&1==c.length&&null!=P&&"drop"==P.type&&this.isBlankFile()&&+!this.canUndo()&&(O=!1,X=W=0);return this.importFile(S,V,W,X,Z,Y,ba,ea,ca,O,U,P)}catch(fa){return this.handleError(fa),null}});t=null!=t?t:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var v=c.length,G=v,I=[],M=mxUtils.bind(this,function(S,V){I[S]=V;if(0==--G){this.spinner.stop();if(null!=E)E(I);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<I.length;S++){var X=I[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}t(W)}}),+N=0;N<v;N++)mxUtils.bind(this,function(S){var V=c[S];if(null!=V){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==z||z(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=U?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?M(S,mxUtils.bind(this,function(){try{if(null!=ea){var pa=ea.getElementsByTagName("svg");if(0<pa.length){var na=pa[0],ia=na.getAttribute("width"),wa=na.getAttribute("height");ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?parseFloat(wa):NaN;var ua=na.getAttribute("viewBox");if(null==ua||0==ua.length)na.setAttribute("viewBox","0 0 "+ia+" "+wa);else if(isNaN(ia)||isNaN(wa)){var va=ua.split(" ");3<va.length&&(ia=parseFloat(va[2]),wa=parseFloat(va[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(na));var Ca=Math.min(1,Math.min(p/Math.max(1,ia)),p/Math.max(1,wa)),ja=n(Z,V.type,e+S*k,f+S*k,Math.max(1,Math.round(ia*Ca)),Math.max(1,Math.round(wa*Ca)),V.name);if(null!=ja&&(isNaN(ia)||isNaN(wa))){var oa=new Image;oa.onload=mxUtils.bind(this,function(){ia=Math.max(1,oa.width);wa=Math.max(1,oa.height);ja[0].geometry.width=ia;ja[0].geometry.height=wa;na.setAttribute("viewBox","0 0 "+ia+" "+wa);Z=Editor.createSvgDataUri(mxUtils.getXml(na));var ma=Z.indexOf(";");0<ma&&(Z=Z.substring(0,ma)+Z.substring(Z.indexOf(",",ma+1)));T.setCellStyles("image",Z,[ja[0]])});oa.src=Editor.createSvgDataUri(mxUtils.getXml(na))}return ja}}}catch(ma){}return null})):M(S,mxUtils.bind(this,function(){return n(aa,"text/xml",e+S*k,f+S*k,0,0,V.name)}))}else M(S,mxUtils.bind(this,function(){return null}))}else{Y=!1;if("image/png"==V.type){var da=U?null:this.extractGraphModelFromPng(X.target.result);if(null!=da&&0<da.length){var ha=new Image;ha.src=X.target.result;M(S,mxUtils.bind(this,function(){return n(da,"text/xml",e+S*k,f+S*k,ha.width,ha.height,V.name)}));Y=!0}}Y||(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(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(na,ia,wa){M(S,mxUtils.bind(this,function(){if(null!=na&&na.length<F){var ua=m&&this.isResampleImageSize(V.size,R)?Math.min(1,Math.min(p/ia,p/wa)):1;return n(na,V.type,e+S*k,f+S*k,Math.round(ia*ua),Math.round(wa*ua),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),m,p,R,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=-X.target.result,n(Z,V.type,e+S*k,f+S*k,240,160,V.name,function(pa){M(S,function(){return pa})},V)}catch(pa){M(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,V)}else M(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?n(null,V.type,e+S*k,f+S*k,240,160,V.name,function(X){M(S,function(){return X})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?W.readAsDataURL(V):W.readAsText(V)}})(P)});if(u){u=[];for(B=0;B<c.length;B++)u.push(c[B]);+X.target.result,n(Z,V.type,e+S*k,f+S*k,240,160,V.name,function(pa){M(S,function(){return pa})},V)}catch(pa){M(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,V)}else M(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?n(null,V.type,e+S*k,f+S*k,240,160,V.name,function(X){M(S,function(){return X})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?W.readAsDataURL(V):W.readAsText(V)}})(N)});if(u){u=[];for(B=0;B<c.length;B++)u.push(c[B]);c=u;this.confirmImageResize(function(T){m=T;H()},C)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},p=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,n=function(t,z){if(t||e)mxSettings.setResizeImages(t?z:null),mxSettings.save();f();c(z)};null==p||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){n(t,!0)},function(t){n(t,!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?226:200,!0,!0):n(!1,p)};EditorUi.prototype.parseFile=function(c,e,f){f=null!=f?f:c.name;var p=new FileReader;p.onload=mxUtils.bind(this,function(){this.parseFileData(p.result,e,f)});p.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,f){var p=new XMLHttpRequest;p.open("POST",OPEN_URL);p.setRequestHeader("Content-Type","application/x-www-form-urlencoded");p.onreadystatechange=function(){e(p)};p.send("format=xml&filename="+encodeURIComponent(f)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(n){}};-EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,f,p,n,t,z){n=null!=n?n:this.maxImageSize;var E=Math.max(1,c.width),C=Math.max(1,c.height),F=e;if(p&&this.isResampleImageSize(null!=z?z:e.length,t))try{var R=Math.max(E/n,C/n);if(1<R){var U=Math.round(E/R),O=Math.round(C/R),N=document.createElement("canvas");N.width=U;N.height=O;N.getContext("2d").drawImage(c,0,0,U,O);var m=N.toDataURL();if(m.length<e.length){var u=-document.createElement("canvas");u.width=U;u.height=O;var A=u.toDataURL();m!==A&&(e=m,E=U,C=O)}}}catch(B){}p&&F!=e&&n>this.maxImageSize/2&&e.length>this.maxImageBytes?this.resizeImage(c,e,f,p,n/1.5,t,z):f(e,E,C)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,f){try{var p=new Image;p.onload=function(){p.width=0<p.width?p.width:120;p.height=0<p.height?p.height:120;e(p)};null!=f&&(p.onerror=f);p.src=c}catch(n){if(null!=+EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,f,p,n,t,z){n=null!=n?n:this.maxImageSize;var E=Math.max(1,c.width),C=Math.max(1,c.height),F=e;if(p&&this.isResampleImageSize(null!=z?z:e.length,t))try{var R=Math.max(E/n,C/n);if(1<R){var U=Math.round(E/R),P=Math.round(C/R),O=document.createElement("canvas");O.width=U;O.height=P;O.getContext("2d").drawImage(c,0,0,U,P);var m=O.toDataURL();if(m.length<e.length){var u=+document.createElement("canvas");u.width=U;u.height=P;var A=u.toDataURL();m!==A&&(e=m,E=U,C=P)}}}catch(B){}p&&F!=e&&n>this.maxImageSize/2&&e.length>this.maxImageBytes?this.resizeImage(c,e,f,p,n/1.5,t,z):f(e,E,C)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,f){try{var p=new Image;p.onload=function(){p.width=0<p.width?p.width:120;p.height=0<p.height?p.height:120;e(p)};null!=f&&(p.onerror=f);p.src=c}catch(n){if(null!=f)f(n);else throw n;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var q=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());q.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var y=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,e=this.editor.graph,f=e.isEnabled;e.isEnabled=function(){return f.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(k){var v=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(v)&&-!e.freehand.isDrawing()||mxEvent.isPopupTrigger(v)&&(null==k.getState()||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v))});e.cellEditor.editPlantUmlData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("plantUml")+":",I.data,function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(M,I.format,function(P,S,V){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==I.format)e.labelChanged(k,"<pre>"+P+"</pre>"),e.updateCellSize(k,-!0);else{e.setCellStyles("image",c.convertDataUri(P),[k]);var W=e.model.getGeometry(k);null!=W&&(W=W.clone(),W.width=S,W.height=V,e.cellsResized([k],[W],!1))}e.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:M,format:I.format}))}finally{e.getModel().endUpdate()}},function(P){c.handleError(P)})},null,null,400,220);c.showDialog(v.container,420,300,!0,!0);v.init()};e.cellEditor.editMermaidData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("mermaid")+":",I.data,-function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(M,I.config,function(P,S,V){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",P,[k]);var W=e.model.getGeometry(k);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,V),e.cellsResized([k],[W],!1));e.setAttributeForCell(k,"mermaidData",JSON.stringify({data:M,config:I.config},null,2))}finally{e.getModel().endUpdate()}},function(P){c.handleError(P)})},+!e.freehand.isDrawing()||mxEvent.isPopupTrigger(v)&&(null==k.getState()||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v))});e.cellEditor.editPlantUmlData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("plantUml")+":",I.data,function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(M,I.format,function(N,S,V){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==I.format)e.labelChanged(k,"<pre>"+N+"</pre>"),e.updateCellSize(k,+!0);else{e.setCellStyles("image",c.convertDataUri(N),[k]);var W=e.model.getGeometry(k);null!=W&&(W=W.clone(),W.width=S,W.height=V,e.cellsResized([k],[W],!1))}e.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:M,format:I.format}))}finally{e.getModel().endUpdate()}},function(N){c.handleError(N)})},null,null,400,220);c.showDialog(v.container,420,300,!0,!0);v.init()};e.cellEditor.editMermaidData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("mermaid")+":",I.data,+function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(M,I.config,function(N,S,V){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",N,[k]);var W=e.model.getGeometry(k);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,V),e.cellsResized([k],[W],!1));e.setAttributeForCell(k,"mermaidData",JSON.stringify({data:M,config:I.config},null,2))}finally{e.getModel().endUpdate()}},function(N){c.handleError(N)})},null,null,400,220);c.showDialog(v.container,420,300,!0,!0);v.init()};var p=e.cellEditor.startEditing;e.cellEditor.startEditing=function(k,v){try{var G=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=G)this.editPlantUmlData(k,v,G);else if(G=this.graph.getAttributeForCell(k,"mermaidData"),null!=G&&window.isMermaidEnabled)this.editMermaidData(k,v,G);else{var I=e.getCellStyle(k);"1"==mxUtils.getValue(I,"metaEdit","0")?c.showDataDialog(k):p.apply(this,arguments)}}catch(M){c.handleError(M)}};e.getLinkTitle=function(k){return c.getLinkTitle(k)};e.customLinkClicked=function(k,v){var G=!1;try{var I=this.getGraphBounds();c.handleCustomLink(k,v);G=!0;c.chromelessResize&&!I.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(v))}catch(M){c.handleError(M)}return G};var n=e.parseBackgroundImage;e.parseBackgroundImage=function(k){var v=n.apply(this,arguments);null!=v&&null!=v.src&&Graph.isPageLink(v.src)&&(v={originalSrc:v.src});return v};var t=e.setBackgroundImage;e.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,v){k=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=k){var G=k.indexOf(",");if(0<G)for(k=k.substring(G+1),v=v.getProperty("patches"),G=0;G<v.length;G++)if(null!=v[G][EditorUi.DIFF_UPDATE]&&null!=v[G][EditorUi.DIFF_UPDATE][k]||null!=v[G][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(v[G][EditorUi.DIFF_REMOVE],k)){e.refreshBackgroundImage();break}}}));var z=e.getBackgroundImageObject;e.getBackgroundImageObject=function(k,v){var G=z.apply(this,arguments);null!=G&&null!=G.originalSrc&&(G=v?c.createImageForPageLink(G.originalSrc,null,null,!0):{src:G.originalSrc});return G};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 E=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var C=e.addClickHandler;e.addClickHandler=function(k,v,G){var I=v;v=-function(M,P,S){if(null==P){var V=mxEvent.getSource(M);"a"==V.nodeName.toLowerCase()&&(P=V.getAttribute("href"))}null!=P&&e.isCustomLink(P)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&e.customLinkClicked(P,S)&&mxEvent.consume(M);null!=I&&I(M,P,S)};C.call(this,k,v,G)};y.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var F=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,v,G){e.isSelectionEmpty()&&+function(M,N,S){if(null==N){var V=mxEvent.getSource(M);"a"==V.nodeName.toLowerCase()&&(N=V.getAttribute("href"))}null!=N&&e.isCustomLink(N)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&e.customLinkClicked(N,S)&&mxEvent.consume(M);null!=I&&I(M,N,S)};C.call(this,k,v,G)};y.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var F=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,v,G){e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,G);F.apply(this,arguments);e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,G);e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,G)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,v,G){if(c.editor.graph.isSelectionEmpty())R.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,G);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,v,G):this.addPopupMenuArrangeItems(k,v,G),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,G),this.isShowCellEditItems()||this.addPopupDeleteItem(k,v,G),this.addMenuItems(k,["lockUnlock","-"],null,G),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(v)&&e.isCellEditable(v)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),e.getModel().isEdge(v))){this.addSubmenu("line",k);var I=e.getModel().getGeometry(v);null!=I&&null!=I.points&&0<I.points.length&&this.addMenuItems(k,["clearWaypoints"],null,G)}1==e.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,G);I=c.getSelectionState();null!=I.mergeCell?this.addMenuItem(k,"mergeCells"):(1<I.style.colspan||1<I.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var U=e.getExportVariables;e.getExportVariables=function(){var k=U.apply(this,arguments),v=c.getCurrentFile();null!=v&&(k.filename=v.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?-mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var O=e.getGlobalVariable;e.getGlobalVariable=function(k){var v=c.getCurrentFile();return"filename"==k&&null!=v?v.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:O.apply(this,arguments)};var N=null,m=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),-v=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;N!=v&&k==m&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());N=v;m=k}));var u=e.labelLinkClicked;e.labelLinkClicked=function(k,v,G){var I=v.getAttribute("href");if(null==I||!e.isCustomLink(I)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))u.apply(this,arguments);else{if(!e.isEnabled()||null!=k&&e.isCellLocked(k.cell))e.customLinkClicked(I),e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=+mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var P=e.getGlobalVariable;e.getGlobalVariable=function(k){var v=c.getCurrentFile();return"filename"==k&&null!=v?v.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:P.apply(this,arguments)};var O=null,m=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),+v=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;O!=v&&k==m&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());O=v;m=k}));var u=e.labelLinkClicked;e.labelLinkClicked=function(k,v,G){var I=v.getAttribute("href");if(null==I||!e.isCustomLink(I)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))u.apply(this,arguments);else{if(!e.isEnabled()||null!=k&&e.isCellLocked(k.cell))e.customLinkClicked(I),e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,v=c.getCurrentFile();null!=v&&(k=null!=v.getTitle()?v.getTitle():k);return k};var A=this.actions.get("print");A.setEnabled(!mxClient.IS_IOS||!navigator.standalone);A.visible=A.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&e.addListener(mxEvent.ESCAPE,function(k,v){null!=v&&e.isEnabled()&&!e.isEditing()&&null!=v.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var v=e.cellEditor.text2,G=null;null!=v&&(mxEvent.addListener(v,"dragleave",function(I){null!=G&&(G.parentNode.removeChild(G),G=null);I.stopPropagation();I.preventDefault()}),mxEvent.addListener(v,"dragover",mxUtils.bind(this,function(I){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=this.highlightElement(v));I.stopPropagation();I.preventDefault()})),mxEvent.addListener(v,"drop",mxUtils.bind(this,function(I){null!=G&&(G.parentNode.removeChild(G),G=null);if(0<I.dataTransfer.files.length)this.importFiles(I.dataTransfer.files,-0,0,this.maxImageSize,function(P,S,V,W,X,Z){e.insertImage(P,X,Z)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var S=0;S<P.length;S++)P[S]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var M=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)?this.loadImage(decodeURIComponent(M),mxUtils.bind(this,function(P){var S=Math.max(1,P.width);P=Math.max(1,P.height);var V=this.maxImageSize;V=Math.min(1,-Math.min(V/Math.max(1,S)),V/Math.max(1,P));e.insertImage(decodeURIComponent(M),S*V,P*V)})):document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));if(Editor.isSettingsEnabled()){A=+0,0,this.maxImageSize,function(N,S,V,W,X,Z){e.insertImage(N,X,Z)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var S=0;S<N.length;S++)N[S]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var M=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(M)?this.loadImage(decodeURIComponent(M),mxUtils.bind(this,function(N){var S=Math.max(1,N.width);N=Math.max(1,N.height);var V=this.maxImageSize;V=Math.min(1,+Math.min(V/Math.max(1,S)),V/Math.max(1,N));e.insertImage(decodeURIComponent(M),S*V,N*V)})):document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));if(Editor.isSettingsEnabled()){A=this.editor.graph.view;var B=mxSettings.getUnit();A.setUnit(B);Editor.pageSizeUnit=B==mxConstants.METERS?mxConstants.MILLIMETERS:B;A.addListener("unitChanged",function(k,v){k=v.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,A.unit);this.refresh()}if("1"==urlParams.styledev){A=document.getElementById("geFooter");null!=A&&(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)})),A.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(k,v){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var H=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:H.apply(this,arguments)}}A=document.getElementById("geInfo");null!=A&&A.parentNode.removeChild(A);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var T=null;mxEvent.addListener(e.container,"dragleave",function(k){e.isEnabled()&&(null!=T&&(T.parentNode.removeChild(T),T=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(k){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(e.container));-null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(k){null!=T&&(T.parentNode.removeChild(T),T=null);if(e.isEnabled()){var v=mxUtils.convertPoint(e.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),G=k.dataTransfer.files,I=e.view.translate,M=e.view.scale,P=v.x/M-I.x,S=v.y/M-I.y;if(0<G.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&-this.fileLoaded(null),this.openFiles(G,!0)):(mxEvent.isAltDown(k)&&(S=P=null),this.importFiles(G,P,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(S=P=0);var V=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;v=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=v)e.setSelectionCells(this.importXml(v,P,S,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,+null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(k){null!=T&&(T.parentNode.removeChild(T),T=null);if(e.isEnabled()){var v=mxUtils.convertPoint(e.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),G=k.dataTransfer.files,I=e.view.translate,M=e.view.scale,N=v.x/M-I.x,S=v.y/M-I.y;if(0<G.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&+this.fileLoaded(null),this.openFiles(G,!0)):(mxEvent.isAltDown(k)&&(S=N=null),this.importFiles(G,N,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(S=N=0);var V=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;v=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=v)e.setSelectionCells(this.importXml(v,N,S,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var W=k.dataTransfer.getData("text/html");v=document.createElement("div");v.innerHTML=Graph.sanitizeHtml(W);var X=null;G=v.getElementsByTagName("img");null!=G&&1==G.length?(W=G[0].getAttribute("src"),null==W&&(W=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(X=!0)):(G=v.getElementsByTagName("a"),null!=G&&1==G.length?W=G[0].getAttribute("href"):(v=v.getElementsByTagName("pre"),null!=v&&1==v.length&&(W=mxUtils.getTextContent(v[0]))));var Z=!0,Y=mxUtils.bind(this,-function(){e.setSelectionCells(this.insertTextAt(W,P,S,!0,X,null,Z,mxEvent.isControlDown(k)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(k)):Y()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));e.setSelectionCell(e.insertVertex(null,-null,"",P,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(ba){e.setSelectionCells(this.insertTextAt(V,P,S,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),P,S,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",+function(){e.setSelectionCells(this.insertTextAt(W,N,S,!0,X,null,Z,mxEvent.isControlDown(k)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(k)):Y()}else null!=V&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(V)?this.loadImage(decodeURIComponent(V),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));e.setSelectionCell(e.insertVertex(null,+null,"",N,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+V+";"))}),mxUtils.bind(this,function(ba){e.setSelectionCells(this.insertTextAt(V,N,S,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),N,S,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&e.view.validateBackground()});e.addListener("enabledChanged",mxUtils.bind(this,function(){e.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),v=-parseInt(this.div.offsetWidth),G=c.embedViewport.x+c.embedViewport.width,I=parseInt(this.div.offsetTop),M=parseInt(this.div.offsetHeight),P=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,G-v))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(I,P-M))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};+parseInt(this.div.offsetWidth),G=c.embedViewport.x+c.embedViewport.width,I=parseInt(this.div.offsetTop),M=parseInt(this.div.offsetHeight),N=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,G-v))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(I,N-M))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(A=Editor.currentTheme,"simple"==A||"sketch"==A)Editor.currentTheme="",this.doSetCurrentTheme(A,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);A=!1;null!=urlParams.dark?A=urlParams.dark:(A="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||A&&"auto"!=mxSettings.settings.darkMode||(A=mxSettings.settings.darkMode));"auto"==A&&this.isAutoDarkModeSupported()&&(A=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof A?"1"==A:A);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,v){e.enableFlowAnimation=Editor.enableAnimations;e.refresh()}));e.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&@@ -13334,7 +13335,7 @@ n=n.cloneNode(!1);n.style.cursor="col-resize";this.diagramContainer.parentNode.aMath.max(20,C+mxEvent.getClientY(F)-z)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(F){null==t&&null==z||mxEvent.consume(F);z=t=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";e.style.visibility="hidden";c.style.visibility="hidden";f.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(F){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(F){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";e.style.visibility="hidden";c.style.visibility="hidden";f.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var f=e.clipboardData||e.originalEvent.clipboardData,p=!1,n=0;n<f.types.length;n++)if("text/"===f.types[n].substring(0,5)){p=!0;break}if(!p){var t=-f.items;for(index in t){var z=t[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(C,F,R,U,O,N){c.insertImage(C,O,N)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var F=0;F<C.length;F++)C[F]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){f.innerHTML=+f.items;for(index in t){var z=t[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(C,F,R,U,P,O){c.insertImage(C,P,O)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var F=0;F<C.length;F++)C[F]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){f.innerHTML=" ";f.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,f=document.createElement("div");f.setAttribute("autocomplete","off");f.setAttribute("autocorrect","off");f.setAttribute("autocapitalize","off");f.setAttribute("spellcheck","false");f.style.textRendering="optimizeSpeed";f.style.fontFamily="monospace";f.style.wordBreak="break-all";f.style.background="transparent";f.style.color="transparent";f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.style.fontSize="1";f.style.zIndex="-1";f.style.resize="none";f.style.outline="none";f.style.width="1px";f.style.height="1px";mxUtils.setOpacity(f,0);f.contentEditable=!0;f.innerHTML=" ";var p=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var z=mxEvent.getSource(t);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||"true"==z.contentEditable||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||p||(f.style.left=e.container.scrollLeft+10+"px",f.style.top=e.container.scrollTop+10+"px",t=e.container.scrollLeft,z=e.container.scrollTop,e.container.appendChild(f),p=!0,f.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=t,e.container.scrollTop=z)}));mxEvent.addListener(document,@@ -13408,17 +13409,17 @@ z.y+E,n),t.setSelectionCells(z);t.isSelectionEmpty()||(t.scrollCellToVisible(t.g(E=!0,z=C)}catch(m){}E=E?null:c.clipboardData.getData("text/html");null!=E&&0<E.length?(n=this.parseHtmlData(E),t="text/plain"!=n.getAttribute("data-type")):null!=z&&0<z.length&&(n=document.createElement("div"),mxUtils.setTextContent(n,E))}z=n.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))f=z[0].getAttribute("data-lucid-content"),null!=f&&0<f.length&&(this.convertLucidChart(f,mxUtils.bind(this,function(m){var u=this.editor.graph;u.lastPasteXml==m?u.pasteCounter++:(u.lastPasteXml=m,u.pasteCounter=0);var A=u.pasteCounter*u.gridSize;u.setSelectionCells(this.importXml(m,A,A));u.scrollCellToVisible(u.getSelectionCell())}),mxUtils.bind(this,function(m){this.handleError(m)})),mxEvent.consume(c));else{var F=!1,R="";R=t?null!=n.textContent&&"<mxfile"==n.textContent.substring(0,7)&&"</mxfile>"==n.textContent.substring(n.textContent.length-9)||"<mxGraphModel"==n.textContent.substring(0,13)&&"</mxGraphModel>"==n.textContent.substring(n.textContent.length-15)?n.textContent.replace(/\u00a0/g," "):n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText);try{var U=R.lastIndexOf("%3E");0<=U&&U<R.length-3&&(R=R.substring(0,U+3))}catch(m){}try{z=n.getElementsByTagName("span"),(C=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(F=!0,R=C)}catch(m){}try{if(null!=R&&0<R.length){if(0==R.substring(0,-20).replace(/\s/g,"").indexOf('{"isProtected":')){var O=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,p,F,c)}catch(m){console.log("Miro import error:",m)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",O):O()}else this.pasteXml(R,p,F,c,t);try{mxEvent.consume(c)}catch(m){}}else if(!f){var N=this.editor.graph;N.lastPasteXml=null;N.pasteCounter=0}}catch(m){this.handleError(m)}}}e.innerHTML=" "};EditorUi.prototype.showPrintDialog=+20).replace(/\s/g,"").indexOf('{"isProtected":')){var P=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,p,F,c)}catch(m){console.log("Miro import error:",m)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",P):P()}else this.pasteXml(R,p,F,c,t);try{mxEvent.consume(c)}catch(m){}}else if(!f){var O=this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(m){this.handleError(m)}}}e.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,e){var f=320;this.editor.graph.isEnabled()&&(f+=40);null!=this.pages&&1<this.pages.length&&(f+=40,this.editor.graph.isEnabled()||(f+=10));null==e||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(f+=20);this.showDialog((new PrintDialog(this,c,e)).container,320,f,!0,!0)};EditorUi.prototype.print=function(c,e){var f=this.editor,p=f.graph,n=this.getPageIndex(this.currentPage),t=null!=n?n+1:1,z=mxUtils.bind(this,function(A,B,H,T){var k=A.useCssTransforms,v=A.currentTranslate,G=A.currentScale,-I=A.view.translate,M=A.view.scale;A.useCssTransforms&&(A.useCssTransforms=!1,A.currentTranslate=new mxPoint(0,0),A.currentScale=1,A.view.translate=new mxPoint(0,0),A.view.scale=1);var P=A.getGraphBounds(),S=0,V=0,W=mxRectangle.fromRectangle(A.pageFormat),X=e.fit||e.crop||!A.pageVisible,Z=e.scale;W.width=Math.ceil(W.width*A.pageScale);W.height=Math.ceil(W.height*A.pageScale);var Y=1;if(e.fit){Y=e.sheetsAcross;var ba=e.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));-Y=Math.min(W.height*ba/(P.height/A.view.scale),W.width*Y/(P.width/A.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&A.pageVisible?(Z=A.getPageLayout(),S-=Z.x*W.width,V-=Z.y*W.height):X=!0;e.crop&&(e.selection&&(P=p.getBoundingBox(p.getSelectionCells())),W.width=(P.width+1)*Y/A.view.scale,W.height=(P.height+1)*Y/A.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==B){B=PrintDialog.createPrintPreview(A,Y,null,0,S,V,X);B.title=this.getBaseFilename(!0);+I=A.view.translate,M=A.view.scale;A.useCssTransforms&&(A.useCssTransforms=!1,A.currentTranslate=new mxPoint(0,0),A.currentScale=1,A.view.translate=new mxPoint(0,0),A.view.scale=1);var N=A.getGraphBounds(),S=0,V=0,W=mxRectangle.fromRectangle(A.pageFormat),X=e.fit||e.crop||!A.pageVisible,Z=e.scale;W.width=Math.ceil(W.width*A.pageScale);W.height=Math.ceil(W.height*A.pageScale);var Y=1;if(e.fit){Y=e.sheetsAcross;var ba=e.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));+Y=Math.min(W.height*ba/(N.height/A.view.scale),W.width*Y/(N.width/A.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&A.pageVisible?(Z=A.getPageLayout(),S-=Z.x*W.width,V-=Z.y*W.height):X=!0;e.crop&&(e.selection&&(N=p.getBoundingBox(p.getSelectionCells())),W.width=(N.width+1)*Y/A.view.scale,W.height=(N.height+1)*Y/A.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==B){B=PrintDialog.createPrintPreview(A,Y,null,0,S,V,X);B.title=this.getBaseFilename(!0);B.pageSelector=!1;B.mathEnabled=!1;S=e.border;isNaN(S)||(B.pageMargin=S);e.selection&&(B.isCellVisible=function(aa){return A.isCellSelected(aa)});var ea=B.writeHead;B.writeHead=function(aa){ea.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=f.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(f.fontCss,!1,!1,!1)),aa.writeln("</style>"));for(var da=A.getCustomFonts(),ha=0;ha<da.length;ha++){var pa=da[ha].name,na=da[ha].url;Graph.isCssFontUrl(na)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(na))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=B.drawBackgroundImage;B.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),p.disableSvgLinks(aa.node,function(da){da.setAttribute("href","javascript:void(0)")}))}}var fa=B.addGraphFragment;B.addGraphFragment=function(aa,da,ha,pa,na,ia){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:na.classList.add("geDisableMathJax")};e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:-A.view.gridColor);B.open(null,null,H,!0,T,W,e.selection?A.getSelectionCells():null)}else{P=A.background;if(null==P||""==P||P==mxConstants.NONE)P="#ffffff";B.backgroundColor=P;B.autoOrigin=X;e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:A.view.gridColor);B.appendGraph(A,Y,S,V,H,!0,T,W,e.selection?A.getSelectionCells():null);H=A.getCustomFonts();if(null!=B.wnd)for(W=0;W<H.length;W++)S=H[W].name,V=H[W].url,Graph.isCssFontUrl(V)?+A.view.gridColor);B.open(null,null,H,!0,T,W,e.selection?A.getSelectionCells():null)}else{N=A.background;if(null==N||""==N||N==mxConstants.NONE)N="#ffffff";B.backgroundColor=N;B.autoOrigin=X;e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:A.view.gridColor);B.appendGraph(A,Y,S,V,H,!0,T,W,e.selection?A.getSelectionCells():null);H=A.getCustomFonts();if(null!=B.wnd)for(W=0;W<H.length;W++)S=H[W].name,V=H[W].url,Graph.isCssFontUrl(V)?B.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(V)+'" charset="UTF-8" type="text/css">'):(B.wnd.document.writeln('<style type="text/css">'),B.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(V)+'");\n}'),B.wnd.document.writeln("</style>"))}k&&(A.useCssTransforms=k,A.currentTranslate=v,A.currentScale=G,A.view.translate=I,A.view.scale=M);return B}),E=e.pagesFrom,C=e.pagesTo,F=!e.allPages;n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,-e);else{F&&(F=e.selection||E==t&&C==t);if(!F&&null!=this.pages&&this.pages.length){F=0;t=this.pages.length-1;e.allPages||(F=parseInt(E)-1,t=parseInt(C)-1);for(var R=F;R<=t;R++){var U=this.pages[R];E=U==this.currentPage?p:null;if(null==E){E=this.createTemporaryGraph(p.stylesheet);E.shapeForegroundColor=p.shapeForegroundColor;E.shapeBackgroundColor=p.shapeBackgroundColor;C=!0;F=!1;var O=null,N=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(C=U.viewState.pageVisible,-F=U.viewState.mathEnabled,O=U.viewState.background,N=U.viewState.backgroundImage,E.pageFormat=U.viewState.pageFormat,E.gridSize=U.viewState.gridSize);null!=N&&null!=N.originalSrc&&(N=this.createImageForPageLink(N.originalSrc,U));E.background=O;E.backgroundImage=null!=N?new mxImage(N.src,N.width,N.height,N.x,N.y):null;E.pageVisible=C;E.mathEnabled=F;var m=E.getGraphBounds;E.getGraphBounds=function(){var A=m.apply(this,arguments),B=this.backgroundImage;if(null!=B&&null!=B.width&&null!=B.height){var H=+e);else{F&&(F=e.selection||E==t&&C==t);if(!F&&null!=this.pages&&this.pages.length){F=0;t=this.pages.length-1;e.allPages||(F=parseInt(E)-1,t=parseInt(C)-1);for(var R=F;R<=t;R++){var U=this.pages[R];E=U==this.currentPage?p:null;if(null==E){E=this.createTemporaryGraph(p.stylesheet);E.shapeForegroundColor=p.shapeForegroundColor;E.shapeBackgroundColor=p.shapeBackgroundColor;C=!0;F=!1;var P=null,O=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(C=U.viewState.pageVisible,+F=U.viewState.mathEnabled,P=U.viewState.background,O=U.viewState.backgroundImage,E.pageFormat=U.viewState.pageFormat,E.gridSize=U.viewState.gridSize);null!=O&&null!=O.originalSrc&&(O=this.createImageForPageLink(O.originalSrc,U));E.background=P;E.backgroundImage=null!=O?new mxImage(O.src,O.width,O.height,O.x,O.y):null;E.pageVisible=C;E.mathEnabled=F;var m=E.getGraphBounds;E.getGraphBounds=function(){var A=m.apply(this,arguments),B=this.backgroundImage;if(null!=B&&null!=B.width&&null!=B.height){var H=this.view.translate,T=this.view.scale;A=mxRectangle.fromRectangle(A);A.add(new mxRectangle((H.x+B.x)*T,(H.y+B.y)*T,B.width*T,B.height*T))}return A};var u=E.getGlobalVariable;E.getGlobalVariable=function(A){return"page"==A?U.getName():"pagenumber"==A?R+1:"pagecount"==A?null!=this.pages?this.pages.length:1:u.apply(this,arguments)};document.body.appendChild(E.container);this.updatePageRoot(U);E.model.setRoot(U.root)}n=z(E,n,R!=t,U.getId());E!=p&&E.container.parentNode.removeChild(E.container)}}else n=z(p);null==n||null==n.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(z=n.wnd.document,c||(n.wnd.IMMEDIATE_PRINT=!0),z.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),n.closeDocument(),Graph.rewritePageLinks(n.wnd.document,!0),n.mathEnabled||c||PrintDialog.printPreview(n));return n}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,f=0;f<c.length;f++)mxEvent.addListener(c[f],"dragleave",function(p){null!=e&&(e.parentNode.removeChild(e),e=null);p.stopPropagation();p.preventDefault()}),mxEvent.addListener(c[f],"dragover",mxUtils.bind(this,function(p){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());p.stopPropagation();p.preventDefault()})),mxEvent.addListener(c[f],"drop",mxUtils.bind(this,function(p){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<@@ -13445,24 +13446,24 @@ translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectenull,null,!1),e,null,!0,mxUtils.bind(this,function(n){f.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(n)}),"*")}),null,null,!0,p,1,this.embedExportBorder,null,this.embedExportTheme)}else c||f.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(n){c||this.handleError(n)}};EditorUi.prototype.installMessageHandler=function(c){var e=null,f=!1,p=!1,n=null,t=mxUtils.bind(this,function(C,F){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,t);mxEvent.addListener(window,"message",mxUtils.bind(this,function(C){if(C.source==(window.opener||window.parent)){var F=C.data,R=null,U=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});-if("json"==urlParams.proto){var O=!1;try{F=JSON.parse(F),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[F])}catch(aa){F=null}try{if(null==F)return;if("dialog"==F.action){this.showError(null!=F.titleKey?mxResources.get(F.titleKey):F.title,null!=F.messageKey?mxResources.get(F.messageKey):mxUtils.htmlEntities(F.message),null!=F.buttonKey?mxResources.get(F.buttonKey):F.button);null!=F.modified&&(this.editor.modified=F.modified);return}if("layout"==F.action){this.executeLayouts(this.editor.graph.createLayouts(F.layouts));-return}if("prompt"==F.action){this.spinner.stop();var N=new FilenameDialog(this,F.defaultValue||"",null!=F.okKey?mxResources.get(F.okKey):F.ok,function(aa){null!=aa?z.postMessage(JSON.stringify({event:"prompt",value:aa,message:F}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")},null!=F.titleKey?mxResources.get(F.titleKey):F.title,null,null,null,null,function(){z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")});this.showDialog(N.container,300,80,!0,!1);-N.init();return}if("draft"==F.action){var m=U(F.xml);this.spinner.stop();N=new DraftDialog(this,mxResources.get("draftFound",[F.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",message:F}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:F}),"*")}),F.editKey?mxResources.get(F.editKey):null,F.discardKey?mxResources.get(F.discardKey):null,F.ignore?-mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:F}),"*")}):null);this.showDialog(N.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{N.init()}catch(aa){z.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:F}),"*")}return}if("template"==F.action){this.spinner.stop();var u=1==F.enableRecent,A=1==F.enableSearch,B=1==F.enableCustomTemp;N=new NewDialog(this,!1,F.templatesOnly?+if("json"==urlParams.proto){var P=!1;try{F=JSON.parse(F),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[F])}catch(aa){F=null}try{if(null==F)return;if("dialog"==F.action){this.showError(null!=F.titleKey?mxResources.get(F.titleKey):F.title,null!=F.messageKey?mxResources.get(F.messageKey):mxUtils.htmlEntities(F.message),null!=F.buttonKey?mxResources.get(F.buttonKey):F.button);null!=F.modified&&(this.editor.modified=F.modified);return}if("layout"==F.action){this.executeLayouts(this.editor.graph.createLayouts(F.layouts));+return}if("prompt"==F.action){this.spinner.stop();var O=new FilenameDialog(this,F.defaultValue||"",null!=F.okKey?mxResources.get(F.okKey):F.ok,function(aa){null!=aa?z.postMessage(JSON.stringify({event:"prompt",value:aa,message:F}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")},null!=F.titleKey?mxResources.get(F.titleKey):F.title,null,null,null,null,function(){z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")});this.showDialog(O.container,300,80,!0,!1);+O.init();return}if("draft"==F.action){var m=U(F.xml);this.spinner.stop();O=new DraftDialog(this,mxResources.get("draftFound",[F.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",message:F}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:F}),"*")}),F.editKey?mxResources.get(F.editKey):null,F.discardKey?mxResources.get(F.discardKey):null,F.ignore?+mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:F}),"*")}):null);this.showDialog(O.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{O.init()}catch(aa){z.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:F}),"*")}return}if("template"==F.action){this.spinner.stop();var u=1==F.enableRecent,A=1==F.enableSearch,B=1==F.enableCustomTemp;O=new NewDialog(this,!1,F.templatesOnly?!1:null!=F.callback,mxUtils.bind(this,function(aa,da,ha,pa){aa=aa||this.emptyDiagramXml;null!=F.callback?z.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ha,libs:pa,builtIn:!0,message:F}),"*"):(c(aa,C,aa!=this.emptyDiagramXml,F.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):-null,A?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ha){z.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ha}),"*")}),null,null,B?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==F.withoutType);this.showDialog(N.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();-aa&&this.actions.get("exit").funct()}));N.init();return}if("textContent"==F.action){var H=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:H,message:F}),"*");return}if("status"==F.action){null!=F.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(F.messageKey))):null!=F.message&&this.editor.setStatus(mxUtils.htmlEntities(F.message));null!=F.modified&&(this.editor.modified=F.modified);return}if("spinner"==F.action){var T=null!=F.messageKey?mxResources.get(F.messageKey):-F.message;null==F.show||F.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==F.action){this.actions.get("exit").funct();return}if("viewport"==F.action){null!=F.viewport&&(this.embedViewport=F.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==F.action){N=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),N=JSON.parse(k))}catch(aa){}Editor.inlineFullscreen=-F.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=N&&this.restoreScrollState(N);return}if("snapshot"==F.action){this.sendEmbeddedSvgExport(!0);return}if("export"==F.action){if("png"==F.format||"xmlpng"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){var v=null!=F.xml?F.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var G=this.editor.graph,I=mxUtils.bind(this,function(aa,da){if(F.withSvg)F.withSvg=+null,A?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ha){z.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ha}),"*")}),null,null,B?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==F.withoutType);this.showDialog(O.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();+aa&&this.actions.get("exit").funct()}));O.init();return}if("textContent"==F.action){var H=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:H,message:F}),"*");return}if("status"==F.action){null!=F.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(F.messageKey))):null!=F.message&&this.editor.setStatus(mxUtils.htmlEntities(F.message));null!=F.modified&&(this.editor.modified=F.modified);return}if("spinner"==F.action){var T=null!=F.messageKey?mxResources.get(F.messageKey):+F.message;null==F.show||F.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==F.action){this.actions.get("exit").funct();return}if("viewport"==F.action){null!=F.viewport&&(this.embedViewport=F.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==F.action){O=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),O=JSON.parse(k))}catch(aa){}Editor.inlineFullscreen=+F.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=O&&this.restoreScrollState(O);return}if("snapshot"==F.action){this.sendEmbeddedSvgExport(!0);return}if("export"==F.action){if("png"==F.format||"xmlpng"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){var v=null!=F.xml?F.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var G=this.editor.graph,I=mxUtils.bind(this,function(aa,da){if(F.withSvg)F.withSvg=!1,this.getEmbeddedSvg(v,this.editor.graph,null,!0,function(pa){I(aa,pa)},null,null,F.embedImages,this.editor.graph.background,F.scale,F.border,F.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=F.format;ha.message=F;ha.data=aa;ha.svg=da;ha.xml=v;z.postMessage(JSON.stringify(ha),"*")}}),M=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==F.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(v)));-G!=this.editor.graph&&G.container.parentNode.removeChild(G.container);I(aa)}),P=F.pageId||(null!=this.pages?F.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()!=P){var aa=G.getGlobalVariable;G=this.createTemporaryGraph(G.getStylesheet());for(var da,ha=0;ha<this.pages.length;ha++)if(this.pages[ha].getId()==P){da=this.updatePageRoot(this.pages[ha]);break}null==da&&(da=this.currentPage);+G!=this.editor.graph&&G.container.parentNode.removeChild(G.container);I(aa)}),N=F.pageId||(null!=this.pages?F.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()!=N){var aa=G.getGlobalVariable;G=this.createTemporaryGraph(G.getStylesheet());for(var da,ha=0;ha<this.pages.length;ha++)if(this.pages[ha].getId()==N){da=this.updatePageRoot(this.pages[ha]);break}null==da&&(da=this.currentPage);G.getGlobalVariable=function(wa){return"page"==wa?da.getName():"pagenumber"==wa?1:aa.apply(this,arguments)};document.body.appendChild(G.container);G.model.setRoot(da.root)}if(null!=F.layerIds){var pa=G.model,na=pa.getChildCells(pa.getRoot()),ia={};for(ha=0;ha<F.layerIds.length;ha++)ia[F.layerIds[ha]]=!0;for(ha=0;ha<na.length;ha++)pa.setVisible(na[ha],ia[na[ha].id]||!1)}ha=null;F.keepTheme&&(ha=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(wa){M(wa.toDataURL("image/png"))}),-F.width,null,F.background,mxUtils.bind(this,function(){M(null)}),null,null,F.scale,F.transparent,F.shadow,null,G,F.border,null,F.grid,ha)});null!=F.xml&&0<F.xml.length&&(f=!0,this.setFileData(v),f=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==F.format?"1":"0")+(null!=P?"&pageId="+P:"")+(null!=F.layerIds&&0<F.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:F.layerIds})):"")+(null!=F.scale?"&scale="+F.scale:"")+"&base64=1&xml="+encodeURIComponent(v))).send(mxUtils.bind(this,+F.width,null,F.background,mxUtils.bind(this,function(){M(null)}),null,null,F.scale,F.transparent,F.shadow,null,G,F.border,null,F.grid,ha)});null!=F.xml&&0<F.xml.length&&(f=!0,this.setFileData(v),f=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==F.format?"1":"0")+(null!=N?"&pageId="+N:"")+(null!=F.layerIds&&0<F.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:F.layerIds})):"")+(null!=F.scale?"&scale="+F.scale:"")+"&base64=1&xml="+encodeURIComponent(v))).send(mxUtils.bind(this,function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?I("data:image/png;base64,"+aa.getText()):M(null)}),mxUtils.bind(this,function(){M(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=F;if("html2"==F.format||"html"==F.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=F.format}else if("html"==F.format)da=this.editor.getGraphXml(),aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=F.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=F.background?F.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ha=mxUtils.bind(this,function(na){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(na);z.postMessage(JSON.stringify(aa),"*")}),pa="auto";F.keepTheme&&(pa=Editor.isDarkMode()?"dark":"light");null!=F.theme&&(pa=F.theme);if("xmlsvg"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=F.theme&&(pa=F.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ha,null,null,F.embedImages,da,F.scale,F.border,F.shadow,pa)}}else if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin))this.editor.graph.setEnabled(!1),da=this.editor.graph.getSvg(da,F.scale,F.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||F.shadow,null,pa),(this.editor.graph.shadowVisible||F.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(na){F.embedImages||null==F.embedImages?this.editor.convertImages(na,mxUtils.bind(this,function(ia){ha(mxUtils.getXml(ia))})):ha(mxUtils.getXml(na))}));return}z.postMessage(JSON.stringify(aa),-"*")}),null!=F.xml&&0<F.xml.length){if(this.editor.graph.mathEnabled){var V=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){V.apply(this,arguments);S()}}f=!0;this.setFileData(F.xml);f=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==F.action){O=F.toSketch;p=1==F.autosave;this.hideDialog();null!=F.modified&&null==urlParams.modified&&(urlParams.modified=F.modified);null!=F.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=F.saveAndExit);if("1"==urlParams.saveAndExit||+"*")}),null!=F.xml&&0<F.xml.length){if(this.editor.graph.mathEnabled){var V=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){V.apply(this,arguments);S()}}f=!0;this.setFileData(F.xml);f=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==F.action){P=F.toSketch;p=1==F.autosave;this.hideDialog();null!=F.modified&&null==urlParams.modified&&(urlParams.modified=F.modified);null!=F.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=F.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=F.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=F.noSaveBtn);if(null!=F.rough){var W=Editor.sketchMode;this.doSetSketchMode(F.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=F.dark&&this.setDarkMode(F.dark);null!=F.border&&(this.embedExportBorder=F.border);null!=F.theme&&(this.embedExportTheme=F.theme);null!=F.background&&(this.embedExportBackground=F.background);null!=F.viewport&&(this.embedViewport=F.viewport);this.embedExitPoint=null;if(null!=F.rect){var X=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,F.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,F.rect.top)+"px";this.minInlineWidth=F.minWidth;this.minInlineHeight=F.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=F.maxFitScale,Y=F.rect.width+2*X,ba=F.rect.height+2*X;R=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=@@ -13470,7 +13471,7 @@ aa+"px";var da=this.editor.graph;aa=da.maxFitScale;da.maxFitScale=Z;da.fit(2*X,nnull!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var pa=da.getGraphBounds();da.container.clientWidth>pa.width+2*X&&(da.container.scrollLeft=pa.x+(pa.width+X-da.container.clientWidth)/2)}),10)})}null!=F.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=F.noExitBtn);null!=F.title&&null!=this.buttonContainer&&(m=this.createStatusDiv(""),mxUtils.write(m,F.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(m),this.embedFilenameSpan=m);try{F.libs&&this.sidebar.showEntries(F.libs)}catch(aa){}F=null!=F.xmlpng?this.extractGraphModelFromPng(F.xmlpng):null!=F.descriptor?F.descriptor:F.xml}else{if("merge"==F.action){var ea=this.getCurrentFile();null!=ea&&(m=U(F.xml),null!=m&&""!=m&&ea.mergeFile(new LocalFile(this,m),function(){z.postMessage(JSON.stringify({event:"merge",message:F}),"*")},function(aa){z.postMessage(JSON.stringify({event:"merge",message:F,error:aa}),"*")}))}else"remoteInvokeReady"==F.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==F.action?this.handleRemoteInvoke(F,C.origin):"remoteInvokeResponse"==F.action?this.handleRemoteInvokeResponse(F):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(F)}),"*");return}}catch(aa){this.handleError(aa)}}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())}),fa=mxUtils.bind(this,function(aa,da){f=!0;-try{c(aa,da,null,O)}catch(ha){this.handleError(ha)}f=!1;null!=urlParams.modified&&this.editor.setStatus("");n=ca();p&&null==e&&(e=mxUtils.bind(this,function(ha,pa){ha=ca();ha==n||f||(pa=this.createLoadMessage("autosave"),pa.xml=ha,(window.opener||window.parent).postMessage(JSON.stringify(pa),"*"));n=ha}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",+try{c(aa,da,null,P)}catch(ha){this.handleError(ha)}f=!1;null!=urlParams.modified&&this.editor.setStatus("");n=ca();p&&null==e&&(e=mxUtils.bind(this,function(ha,pa){ha=ca();ha==n||f||(pa=this.createLoadMessage("autosave"),pa.xml=ha,(window.opener||window.parent).postMessage(JSON.stringify(pa),"*"));n=ha}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,z.postMessage(JSON.stringify(da),"*");null!=R&&R()});null!=F&&"function"===typeof F.substring&&"data:application/vnd.visio;base64,"==F.substring(0,34)?(U="0M8R4KGxGuE"==F.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(F.substring(F.indexOf(",")+1)),function(aa){fa(aa,C)},mxUtils.bind(this,function(aa){this.handleError(aa)}),U)):null!=F&&"function"===typeof F.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(F,mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,C):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=F&&"function"===typeof F.substring&&this.isLucidChartData(F)?this.convertLucidChart(F,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==F||"object"!==typeof F||null==F.format||@@ -13484,22 +13485,22 @@ function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var e=new Textp.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));p.value=t}catch(z){this.handleError(z)}}));n.setAttribute("title","copy");n.className="geBtn";f.appendChild(n)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(e.container,620,460,!0,!0);e.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;e.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),p=mxUtils.bind(this,function(n){this.loadingOrgChart=!1;e.clear()&&this.handleError(n)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f,null,null,null,p)},null,null,null,p)},null,null,null,p)},null,null,null,p):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",f,null,null,null,p))}),onerror)};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var f=c.split("\n"),p=[],n=[],t=[],z={};if(0<f.length){var E=-{},C=this.editor.graph,F=null,R=null,U=null,O=null,N=null,m=null,u=null,A="whiteSpace=wrap;html=1;",B=null,H=null,T="",k="auto",v="auto",G=!1,I=null,M=null,P=40,S=40,V=100,W=0,X=mxUtils.bind(this,function(){null!=e?e(za):(C.setSelectionCells(za),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=C.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";H=null;for(var fa=[],aa=null,da=null,-ha=0;ha<f.length&&"#"==f[ha].charAt(0);){c=f[ha].replace(/\r$/,"");for(ha++;ha<f.length&&"\\"==c.charAt(c.length-1)&&"#"==f[ha].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(f[ha].substring(1)),ha++;if("#"!=c.charAt(1)){var pa=c.indexOf(":");if(0<pa){var na=mxUtils.trim(c.substring(1,pa)),ia=mxUtils.trim(c.substring(pa+1));"label"==na?ea=Graph.sanitizeHtml(ia):"labelname"==na&&0<ia.length&&"-"!=ia?N=ia:"labels"==na&&0<ia.length&&"-"!=ia?u=JSON.parse(ia):"style"==na?R=ia:"parentstyle"==na?A=-ia:"unknownStyle"==na&&"-"!=ia?m=ia:"stylename"==na&&0<ia.length&&"-"!=ia?O=ia:"styles"==na&&0<ia.length&&"-"!=ia?U=JSON.parse(ia):"vars"==na&&0<ia.length&&"-"!=ia?F=JSON.parse(ia):"identity"==na&&0<ia.length&&"-"!=ia?B=ia:"parent"==na&&0<ia.length&&"-"!=ia?H=ia:"namespace"==na&&0<ia.length&&"-"!=ia?T=ia:"width"==na?k=ia:"height"==na?v=ia:"collapsed"==na&&"-"!=ia?G="true"==ia:"left"==na&&0<ia.length?I=ia:"top"==na&&0<ia.length?M=ia:"ignore"==na?da=ia.split(","):"connect"==na?fa.push(JSON.parse(ia)):-"link"==na?aa=ia:"padding"==na?W=parseFloat(ia):"edgespacing"==na?P=parseFloat(ia):"nodespacing"==na?S=parseFloat(ia):"levelspacing"==na?V=parseFloat(ia):"layout"==na&&(ca=ia)}}}if(null==f[ha])throw Error(mxResources.get("invalidOrMissingFile"));var wa=this.editor.csvToArray(f[ha].replace(/\r$/,""));pa=c=null;na=[];for(ia=0;ia<wa.length;ia++)B==wa[ia]&&(c=ia),H==wa[ia]&&(pa=ia),na.push(mxUtils.trim(wa[ia]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+na[0]+"%");+{},C=this.editor.graph,F=null,R=null,U=null,P=null,O=null,m=null,u=null,A="whiteSpace=wrap;html=1;",B=null,H=null,T="",k="auto",v="auto",G=!1,I=null,M=null,N=40,S=40,V=100,W=0,X=mxUtils.bind(this,function(){null!=e?e(za):(C.setSelectionCells(za),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=C.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";H=null;for(var fa=[],aa=null,da=null,+ha=0;ha<f.length&&"#"==f[ha].charAt(0);){c=f[ha].replace(/\r$/,"");for(ha++;ha<f.length&&"\\"==c.charAt(c.length-1)&&"#"==f[ha].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(f[ha].substring(1)),ha++;if("#"!=c.charAt(1)){var pa=c.indexOf(":");if(0<pa){var na=mxUtils.trim(c.substring(1,pa)),ia=mxUtils.trim(c.substring(pa+1));"label"==na?ea=Graph.sanitizeHtml(ia):"labelname"==na&&0<ia.length&&"-"!=ia?O=ia:"labels"==na&&0<ia.length&&"-"!=ia?u=JSON.parse(ia):"style"==na?R=ia:"parentstyle"==na?A=+ia:"unknownStyle"==na&&"-"!=ia?m=ia:"stylename"==na&&0<ia.length&&"-"!=ia?P=ia:"styles"==na&&0<ia.length&&"-"!=ia?U=JSON.parse(ia):"vars"==na&&0<ia.length&&"-"!=ia?F=JSON.parse(ia):"identity"==na&&0<ia.length&&"-"!=ia?B=ia:"parent"==na&&0<ia.length&&"-"!=ia?H=ia:"namespace"==na&&0<ia.length&&"-"!=ia?T=ia:"width"==na?k=ia:"height"==na?v=ia:"collapsed"==na&&"-"!=ia?G="true"==ia:"left"==na&&0<ia.length?I=ia:"top"==na&&0<ia.length?M=ia:"ignore"==na?da=ia.split(","):"connect"==na?fa.push(JSON.parse(ia)):+"link"==na?aa=ia:"padding"==na?W=parseFloat(ia):"edgespacing"==na?N=parseFloat(ia):"nodespacing"==na?S=parseFloat(ia):"levelspacing"==na?V=parseFloat(ia):"layout"==na&&(ca=ia)}}}if(null==f[ha])throw Error(mxResources.get("invalidOrMissingFile"));var wa=this.editor.csvToArray(f[ha].replace(/\r$/,""));pa=c=null;na=[];for(ia=0;ia<wa.length;ia++)B==wa[ia]&&(c=ia),H==wa[ia]&&(pa=ia),na.push(mxUtils.trim(wa[ia]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+na[0]+"%");if(null!=fa)for(var ua=0;ua<fa.length;ua++)null==E[fa[ua].to]&&(E[fa[ua].to]={});B=[];for(ia=ha+1;ia<f.length;ia++){var va=this.editor.csvToArray(f[ia].replace(/\r$/,""));if(null==va){var Ca=40<f[ia].length?f[ia].substring(0,40)+"...":f[ia];throw Error(Ca+" ("+ia+"):\n"+mxResources.get("containsValidationErrors"));}0<va.length&&B.push(va)}C.model.beginUpdate();try{for(ia=0;ia<B.length;ia++){va=B[ia];var ja=null,oa=null!=c?T+va[c]:null;f=!1;null!=oa&&(ja=C.model.getCell(oa),f=null==ja||0<=mxUtils.indexOf(p,-ja));var ma=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||"whiteSpace=wrap;html=1;");ma.collapsed=G;ma.vertex=!0;ma.id=oa;null==ja||f||C.model.setCollapsed(ja,G);for(var Aa=0;Aa<va.length;Aa++)C.setAttributeForCell(ma,na[Aa],va[Aa]),null==ja||f||C.setAttributeForCell(ja,na[Aa],va[Aa]);if(null!=N&&null!=u){var sa=u[ma.getAttribute(N)];null!=sa&&(C.labelChanged(ma,sa),null==ja||f||C.cellLabelChanged(ja,sa))}if(null!=O&&null!=U){var Ia=U[ma.getAttribute(O)];null!=Ia&&(ma.style=Ia)}C.setAttributeForCell(ma,+ja));var ma=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||"whiteSpace=wrap;html=1;");ma.collapsed=G;ma.vertex=!0;ma.id=oa;null==ja||f||C.model.setCollapsed(ja,G);for(var Aa=0;Aa<va.length;Aa++)C.setAttributeForCell(ma,na[Aa],va[Aa]),null==ja||f||C.setAttributeForCell(ja,na[Aa],va[Aa]);if(null!=O&&null!=u){var sa=u[ma.getAttribute(O)];null!=sa&&(C.labelChanged(ma,sa),null==ja||f||C.cellLabelChanged(ja,sa))}if(null!=P&&null!=U){var Ia=U[ma.getAttribute(P)];null!=Ia&&(ma.style=Ia)}C.setAttributeForCell(ma,"placeholders","1");ma.style=C.replacePlaceholders(ma,ma.style,F);null==ja||f?C.fireEvent(new mxEventObject("cellsInserted","cells",[ma])):(C.model.setStyle(ja,ma.style),0>mxUtils.indexOf(t,ja)&&t.push(ja),C.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));f=null!=ja;ja=ma;if(!f)for(ua=0;ua<fa.length;ua++)E[fa[ua].to][ja.getAttribute(fa[ua].to)]=ja;null!=aa&&"link"!=aa&&(C.setLinkForCell(ja,ja.getAttribute(aa)),C.setAttributeForCell(ja,aa,null));var xa=this.editor.graph.getPreferredSizeForCell(ja);H=null!=pa?C.model.getCell(T+va[pa]):null;if(ja.vertex){Ca=null!=H?0:Y;ha=null!=H?0:ba;null!=I&&null!=ja.getAttribute(I)&&(ja.geometry.x=Ca+parseFloat(ja.getAttribute(I)));null!=M&&null!=ja.getAttribute(M)&&(ja.geometry.y=ha+parseFloat(ja.getAttribute(M)));var Ba="@"==k.charAt(0)?ja.getAttribute(k.substring(1)):null;ja.geometry.width=null!=Ba&&"auto"!=Ba?parseFloat(ja.getAttribute(k.substring(1))):"auto"==k||"auto"==Ba?xa.width+W:parseFloat(k);var Fa="@"==v.charAt(0)?ja.getAttribute(v.substring(1)):null;ja.geometry.height=null!=Fa&&"auto"!=Fa&&"width"!=v?parseFloat(Fa):"auto"==v||"auto"==Fa?xa.height+W:"width"==v?ja.geometry.width:parseFloat(v);Z+=ja.geometry.height+S}f?(null==z[oa]&&(z[oa]=[]),z[oa].push(ja)):(p.push(ja),null!=H?(H.style=C.replacePlaceholders(H,A,F),C.addCell(ja,H),n.push(H)):t.push(C.addCell(ja)))}for(ia=0;ia<n.length;ia++)Ba="@"==k.charAt(0)?n[ia].getAttribute(k.substring(1)):null,Fa="@"==v.charAt(0)?n[ia].getAttribute(v.substring(1)):null,"auto"!=k&&"auto"!=Ba||"auto"!=v&&"auto"!=Fa||C.updateGroupBounds([n[ia]],W,!0);var La=t.slice(),za=t.slice();for(ua=0;ua<fa.length;ua++){var Da=fa[ua];for(ia=0;ia<p.length;ia++){ja=p[ia];var Ja=mxUtils.bind(this,function(ta,ra,la){var qa=ra.getAttribute(la.from);if(null!=qa&&""!=qa){qa=qa.split(",");for(var ya=0;ya<qa.length;ya++){var Ea=E[la.to][qa[ya]];if(null==Ea&&null!=m){Ea=new mxCell(qa[ya],new mxGeometry(Y,ba,0,0),m);Ea.style=C.replacePlaceholders(ra,Ea.style,F);var Ha=this.editor.graph.getPreferredSizeForCell(Ea);Ea.geometry.width=Ha.width+W;Ea.geometry.height=Ha.height+W;E[la.to][qa[ya]]=Ea;Ea.vertex=!0;Ea.id=qa[ya];t.push(C.addCell(Ea))}if(null!=Ea){Ha=la.label;null!=la.fromlabel&&(Ha=(ra.getAttribute(la.fromlabel)||"")+(Ha||""));null!=la.sourcelabel&&(Ha=C.replacePlaceholders(ra,la.sourcelabel,F)+(Ha||""));null!=la.tolabel&&(Ha=(Ha||"")+(Ea.getAttribute(la.tolabel)||""));null!=la.targetlabel&&(Ha=(Ha||"")+C.replacePlaceholders(Ea,la.targetlabel,F));var Pa="target"==la.placeholders==!la.invert?Ea:ta;Pa=null!=la.style?C.replacePlaceholders(Pa,la.style,F):C.createCurrentEdgeStyle();Ha=C.insertEdge(null,null,Ha||"",la.invert?Ea:ta,la.invert?ta:Ea,Pa);if(null!=la.labels)for(Pa=0;Pa<la.labels.length;Pa++){var Ka=la.labels[Pa],Na=new mxCell(Ka.label||Pa,new mxGeometry(null!=Ka.x?Ka.x:0,null!=Ka.y?Ka.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=Ka.placeholders&&(Na.value=C.replacePlaceholders("target"==Ka.placeholders==!la.invert?Ea:ta,Na.value,F));if(null!=Ka.dx||null!=Ka.dy)Na.geometry.offset=-new mxPoint(null!=Ka.dx?Ka.dx:0,null!=Ka.dy?Ka.dy:0);Ha.insert(Na)}if(null!=la.data)for(var Va in la.data)C.setAttributeForCell(Ha,Va,la.data[Va]);za.push(Ha);mxUtils.remove(la.invert?ta:Ea,La)}}}});Ja(ja,ja,Da);if(null!=z[ja.id])for(Aa=0;Aa<z[ja.id].length;Aa++)Ja(ja,z[ja.id][Aa],Da)}}if(null!=da)for(ia=0;ia<p.length;ia++)for(ja=p[ia],Aa=0;Aa<da.length;Aa++)C.setAttributeForCell(ja,mxUtils.trim(da[Aa]),null);if(0<t.length){var Ra=new mxParallelEdgeLayout(C);Ra.spacing=P;Ra.checkOverlap=!0;var Sa=+new mxPoint(null!=Ka.dx?Ka.dx:0,null!=Ka.dy?Ka.dy:0);Ha.insert(Na)}if(null!=la.data)for(var Va in la.data)C.setAttributeForCell(Ha,Va,la.data[Va]);za.push(Ha);mxUtils.remove(la.invert?ta:Ea,La)}}}});Ja(ja,ja,Da);if(null!=z[ja.id])for(Aa=0;Aa<z[ja.id].length;Aa++)Ja(ja,z[ja.id][Aa],Da)}}if(null!=da)for(ia=0;ia<p.length;ia++)for(ja=p[ia],Aa=0;Aa<da.length;Aa++)C.setAttributeForCell(ja,mxUtils.trim(da[Aa]),null);if(0<t.length){var Ra=new mxParallelEdgeLayout(C);Ra.spacing=N;Ra.checkOverlap=!0;var Sa=function(){0<Ra.spacing&&Ra.execute(C.getDefaultParent());for(var ta=0;ta<t.length;ta++){var ra=C.getCellGeometry(t[ta]);ra.x=Math.round(C.snap(ra.x));ra.y=Math.round(C.snap(ra.y));"auto"==k&&(ra.width=Math.round(C.snap(ra.width)));"auto"==v&&(ra.height=Math.round(C.snap(ra.height)))}};if("["==ca.charAt(0)){var ab=X;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(C);db.disableEdgeStyle=!1;db.resetEdges=!1;var Wa=db.isVertexIgnored;db.isVertexIgnored=function(ta){return Wa.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){db.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&za.length==2*t.length-1&&1==La.length){C.view.validate();var Xa=new mxCompactTreeLayout(C,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(C.getDefaultParent(),-0<La.length?La[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==La.length){C.view.validate();var Ua=new mxHierarchicalLayout(C,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=P;Ua.interRankCellSpacing=V;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(C.getDefaultParent(),za);C.moveCells(za,Y,ba)},!0,X);X=null}else if("orgchart"==ca){C.view.validate();var eb=new mxOrgChartLayout(C,+0<La.length?La[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==La.length){C.view.validate();var Ua=new mxHierarchicalLayout(C,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=N;Ua.interRankCellSpacing=V;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(C.getDefaultParent(),za);C.moveCells(za,Y,ba)},!0,X);X=null}else if("orgchart"==ca){C.view.validate();var eb=new mxOrgChartLayout(C,2,V,S),jb=eb.isVertexIgnored;eb.isVertexIgnored=function(ta){return jb.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){eb.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&za.length>t.length){C.view.validate();var $a=new mxFastOrganicLayout(C);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var ka=$a.isVertexIgnored;$a.isVertexIgnored=function(ta){return ka.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){$a.execute(C.getDefaultParent());Sa()},!0,X);X=null}}this.hideDialog()}finally{C.model.endUpdate()}null!=X&&X()}}catch(ta){this.handleError(ta)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var f="?",p;for(p in urlParams)0>mxUtils.indexOf(c,p)&&null!=urlParams[p]&&(e+=f+p+"="+urlParams[p],f="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var f="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),p;for(p in urlParams)0>mxUtils.indexOf(f,p)&&(c=0==e?c+"?":c+"&",null!=urlParams[p]&&(c+=p+"="+urlParams[p],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,f,p,n){c=new LinkDialog(this,c,e,f,!0,p,n);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&@@ -13513,13 +13514,13 @@ this.actions.get("editConnectionPoints").setEnabled(p&&0==f.edges.length&&1==f.vthis.copiedStyle&&p&&0<f.cells.length);this.actions.get("editGeometry").setEnabled(0<f.vertices.length);this.actions.get("createShape").setEnabled(p);this.actions.get("createRevision").setEnabled(p);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(p&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());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!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.actions.get("properties").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(p&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=-null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,f,p,n,t,z,E){var C=c.editor.graph;if("xml"==f)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==f)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(C.getSvg(p,n,t)),"image/svg+xml");else{var F=c.getFileData(!0,null,null,null,null,!0),R=C.getGraphBounds(),U=Math.floor(R.width*n/C.view.scale),O=Math.floor(R.height*-n/C.view.scale);if(F.length<=MAX_REQUEST_SIZE&&U*O<MAX_AREA)if(c.hideDialog(),"png"!=f&&"jpg"!=f&&"jpeg"!=f||!c.isExportToCanvas()){var N={globalVars:C.getExportVariables()};E&&(N.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});c.saveRequest(e,f,function(m,u){return new mxXmlRequest(EXPORT_URL,"format="+f+"&base64="+(u||"0")+(null!=m?"&filename="+encodeURIComponent(m):"")+"&extras="+encodeURIComponent(JSON.stringify(N))+(0<z?"&dpi="+z:"")+"&bg="+(null!=p?p:"none")+"&w="+U+"&h="+-O+"&border="+t+"&xml="+encodeURIComponent(F))})}else"png"==f?c.exportImage(n,null==p||"none"==p,!0,!1,!1,t,!0,!1,null,E,z):c.exportImage(n,!1,!0,!1,!1,t,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var f=0;f<this.pages.length;f++){var p=c;this.currentPage!=this.pages[f]&&(p=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[f]),+null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,f,p,n,t,z,E){var C=c.editor.graph;if("xml"==f)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==f)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(C.getSvg(p,n,t)),"image/svg+xml");else{var F=c.getFileData(!0,null,null,null,null,!0),R=C.getGraphBounds(),U=Math.floor(R.width*n/C.view.scale),P=Math.floor(R.height*+n/C.view.scale);if(F.length<=MAX_REQUEST_SIZE&&U*P<MAX_AREA)if(c.hideDialog(),"png"!=f&&"jpg"!=f&&"jpeg"!=f||!c.isExportToCanvas()){var O={globalVars:C.getExportVariables()};E&&(O.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});c.saveRequest(e,f,function(m,u){return new mxXmlRequest(EXPORT_URL,"format="+f+"&base64="+(u||"0")+(null!=m?"&filename="+encodeURIComponent(m):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<z?"&dpi="+z:"")+"&bg="+(null!=p?p:"none")+"&w="+U+"&h="++P+"&border="+t+"&xml="+encodeURIComponent(F))})}else"png"==f?c.exportImage(n,null==p||"none"==p,!0,!1,!1,t,!0,!1,null,E,z):c.exportImage(n,!1,!0,!1,!1,t,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var f=0;f<this.pages.length;f++){var p=c;this.currentPage!=this.pages[f]&&(p=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[f]),p.model.setRoot(this.pages[f].root));e+=this.pages[f].getName()+" "+p.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},f=document.createElement("div");f.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxUtils.htmlEntities(c));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(p);var n=document.createElement("div");n.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";n.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var E=z[c];if("R"==E.substring(0,1)){var C=JSON.parse(decodeURIComponent(E.substring(1)));t[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(F){n.innerText="";if(0==F.length)n.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+-mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<F.length;R++){var U=F[R];t[U.id]&&(e[U.id]=U);var O=this.addCheckbox(n,U.title,t[U.id]);(function(N,m){mxEvent.addListener(m,"change",function(){this.checked?e[N.id]=N:delete e[N.id]})})(U,O)}},mxUtils.bind(this,function(F){n.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=F&&null!=F.message?F.message:-mxResources.get("unknownError"));n.appendChild(R)}));f.appendChild(n);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var F=0,R;for(R in e)null==t[R]&&(F++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(O){F--;0==F&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,O,U)),this.showSidebar()}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}),+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<F.length;R++){var U=F[R];t[U.id]&&(e[U.id]=U);var P=this.addCheckbox(n,U.title,t[U.id]);(function(O,m){mxEvent.addListener(m,"change",function(){this.checked?e[O.id]=O:delete e[O.id]})})(U,P)}},mxUtils.bind(this,function(F){n.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=F&&null!=F.message?F.message:+mxResources.get("unknownError"));n.appendChild(R)}));f.appendChild(n);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var F=0,R;for(R in e)null==t[R]&&(F++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(P){F--;0==F&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,P,U)),this.showSidebar()}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){F--;0==F&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[R]));for(R in t)e[R]||this.closeLibrary(new RemoteLibrary(this,null,t[R]));0==F&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(f.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,f=this.remoteInvokeCallbacks[e.callbackId];if(null==f)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?f.error&&f.error(c.error.errResp):f.callback&&f.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,f,p,n){var t=!0,z=window.setTimeout(mxUtils.bind(this,function(){t=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(z);t&&p.apply(this,arguments)}),C=mxUtils.bind(this,@@ -13527,9 +13528,9 @@ function(){window.clearTimeout(z);t&&n.apply(this,arguments)});f=f||{};f.callbacU.error={errResp:R}:null!=F&&(U.resp=F);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var p=c.funtionName,n=this.remoteInvokableFns[p];if(null!=n&&"function"===typeof this[p]){if(n.allowedDomains){for(var t=!1,z=0;z<n.allowedDomains.length;z++)if(e=="https://"+n.allowedDomains[z]){t=!0;break}if(!t){f(null,"Invalid Call: "+p+" is not allowed.");return}}var E=c.functionArgs;Array.isArray(E)||(E=[]);if(n.isAsync)E.push(function(){f(Array.prototype.slice.apply(arguments))}),E.push(function(F){f(null,F||"Unkown Error")}),this[p].apply(this,E);else{var C=this[p].apply(this,E);f([C])}}else f(null,"Invalid Call: "+p+" is not found.")}catch(F){f(null,"Invalid Call: An error occurred, "+F.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var f=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=f)try{var p=f.open("database",2);p.onupgradeneeded=function(n){try{var t=p.result;1>n.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>n.oldVersion&&(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};p.onsuccess=mxUtils.bind(this,function(n){try{var t=p.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||-"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var C=!0,F=!1,R,U=0,O=mxUtils.bind(this,function(){F=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),N=mxUtils.bind(this,function(){U++;m()}),m=mxUtils.bind(this,function(){try{if(U>=-R.length)O();else{var A=R[U];StorageFile.getFileContent(this,A,mxUtils.bind(this,function(B){null==B||".scratchpad"==A&&B==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[A]}),"*"):N()}),N)}}catch(B){console.log(B)}}),u=mxUtils.bind(this,function(A){try{this.setDatabaseItem(null,[{title:A.title,size:A.data.length,lastModified:Date.now(),type:A.isLib?"L":"F"},{title:A.title,data:A.data}],N,N,["filesInfo","files"])}catch(B){console.log(B)}});-z=mxUtils.bind(this,function(A){try{if(A.source==E.contentWindow){var B={};try{B=JSON.parse(A.data)}catch(H){}"init"==B.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=B.event||F||(C?null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?(R=B.resp[0],C=!1,m()):O():null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?u(B.resp[0]):N())}}catch(H){console.log(H)}});+"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var C=!0,F=!1,R,U=0,P=mxUtils.bind(this,function(){F=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){U++;m()}),m=mxUtils.bind(this,function(){try{if(U>=+R.length)P();else{var A=R[U];StorageFile.getFileContent(this,A,mxUtils.bind(this,function(B){null==B||".scratchpad"==A&&B==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[A]}),"*"):O()}),O)}}catch(B){console.log(B)}}),u=mxUtils.bind(this,function(A){try{this.setDatabaseItem(null,[{title:A.title,size:A.data.length,lastModified:Date.now(),type:A.isLib?"L":"F"},{title:A.title,data:A.data}],O,O,["filesInfo","files"])}catch(B){console.log(B)}});+z=mxUtils.bind(this,function(A){try{if(A.source==E.contentWindow){var B={};try{B=JSON.parse(A.data)}catch(H){}"init"==B.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=B.event||F||(C?null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?(R=B.resp[0],C=!1,m()):P():null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?u(B.resp[0]):O())}}catch(H){console.log(H)}});window.addEventListener("message",z)}})));c(t);t.onversionchange=function(){t.close()}}catch(z){null!=e?e(z):null!=window.console&&console.warn(z)}});p.onerror=e;p.onblocked=function(){}}catch(n){null!=e?e(n):null!=window.console&&console.error(n)}else null!=e&&e(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,f,p,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c],e=[e]);var z=t.transaction(n,"readwrite");z.oncomplete=f;z.onerror=p;for(t=0;t<n.length;t++)z.objectStore(n[t]).put(null!=c&&null!=c[t]?{key:c[t],data:e[t]}:e[t])}catch(E){null!=p&&p(E)}}),p)};EditorUi.prototype.removeDatabaseItem=function(c,e,f,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";Array.isArray(p)||(p=[p],c=[c]);var t=n.transaction(p,"readwrite");t.oncomplete=e;t.onerror=f;for(n=0;n<p.length;n++)t.objectStore(p[n]).delete(c[n])}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.getDatabaseItem=function(c,e,f,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";var t=n.transaction([p],"readonly").objectStore(p).get(c);t.onsuccess=function(){e(t.result)};t.onerror=f}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.getDatabaseItems=function(c,e,f){this.openDatabase(mxUtils.bind(this,function(p){try{f=f||"objects";var n=p.transaction([f],"readonly").objectStore(f).openCursor(IDBKeyRange.lowerBound(0)),t=[];n.onsuccess=function(z){null==z.target.result?c(t):(t.push(z.target.result.value),@@ -13538,31 +13539,31 @@ this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.protc.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var f=this.getCurrentFile();return null!=f?f.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var f=this.getCurrentFile();null!=f&&f.getRevisions?f.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,f,p,n,t,z,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,f,p,n,t,z,E)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,f,p,n,t,z,E,C,F,R,U,P,O,m,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,f,p)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,f,p)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,f,p,n){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,f,p,n)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var f=localStorage.key(e),p=localStorage.getItem(f);if(0<f.length&&(".scratchpad"==f||"."!=f.charAt(0))&&0<p.length){var n="<mxfile "===p.substring(0,8)||"<?xml"===p.substring(0,5)||"\x3c!--[if IE]>"===p.substring(0,12);p="<mxlibrary>"===p.substring(0,11);(n||p)&&c.push(f)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();var CommentsWindow=function(b,g,l,d,q,y){function x(){for(var m=z.getElementsByTagName("div"),u=0,A=0;A<m.length;A++)"none"!=m[A].style.display&&m[A].parentNode==z&&u++;E.style.display=0==u?"block":"none"}function D(m,u,A,B){function H(){u.removeChild(v);u.removeChild(G);k.style.display="block";T.style.display="block"}p={div:u,comment:m,saveCallback:A,deleteOnCancel:B};var T=u.querySelector(".geCommentTxt"),k=u.querySelector(".geCommentActionsList"),v=document.createElement("textarea");v.className="geCommentEditTxtArea";v.style.minHeight=T.offsetHeight+"px";v.value=m.content;u.insertBefore(v,T);var G=document.createElement("div");G.className="geCommentEditBtns";var I=mxUtils.button(mxResources.get("cancel"),function(){B?(u.parentNode.removeChild(u),x()):H();p=null});I.className="geCommentEditBtn";G.appendChild(I);var M=mxUtils.button(mxResources.get("save"),function(){T.innerText="";m.content=v.value;mxUtils.write(T,m.content);H();A(m);p=null});mxEvent.addListener(v,"keydown",mxUtils.bind(this,-function(P){mxEvent.isConsumed(P)||((mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P))&&13==P.keyCode?(M.click(),mxEvent.consume(P)):27==P.keyCode&&(I.click(),mxEvent.consume(P)))}));M.focus();M.className="geCommentEditBtn gePrimaryBtn";G.appendChild(M);u.insertBefore(G,T);k.style.display="none";T.style.display="none";v.focus()}function J(m,u){u.innerText="";m=new Date(m.modifiedDate);var A=b.timeSince(m);null==A&&(A=mxResources.get("lessThanAMinute"));mxUtils.write(u,mxResources.get("timeAgo",+function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(M.click(),mxEvent.consume(N)):27==N.keyCode&&(I.click(),mxEvent.consume(N)))}));M.focus();M.className="geCommentEditBtn gePrimaryBtn";G.appendChild(M);u.insertBefore(G,T);k.style.display="none";T.style.display="none";v.focus()}function J(m,u){u.innerText="";m=new Date(m.modifiedDate);var A=b.timeSince(m);null==A&&(A=mxResources.get("lessThanAMinute"));mxUtils.write(u,mxResources.get("timeAgo",[A],"{1} ago"));u.setAttribute("title",m.toLocaleDateString()+" "+m.toLocaleTimeString())}function K(m){var u=document.createElement("img");u.className="geCommentBusyImg";u.src=IMAGE_PATH+"/spin.gif";m.appendChild(u);m.busyImg=u}function L(m){m.style.border="1px solid red";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function Q(m){m.style.border="";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function c(m,u,A,B,H){function T(V,W,X){var Z=document.createElement("li");Z.className="geCommentAction";var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,V);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,m);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function k(){function V(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,V(Z.replies[Y])}var W=[],X=G;V(m);return{pdiv:X,replies:W}}function v(V,W,X,Z,Y){function ba(){K(aa);m.addReply(fa,function(da){fa.id=da;m.replies.push(fa);Q(aa);X&&X()},function(da){ea();L(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){D(fa,aa,function(da){ba()},!0)}var ca=k().pdiv,fa=b.newComment(V,b.getCurrentUser());fa.pCommentId=m.id;null==m.replies&&(m.replies=[]);var aa=c(fa,m.replies,ca,B+1);W?ea():ba()}if(H||!m.isResolved){E.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",m.id);G.style.marginLeft=20*B+5+-"px";m.isResolved&&(n.style.opacity="0.7");var I=document.createElement("div");I.className="geCommentHeader";var M=document.createElement("img");M.className="geCommentUserImg";M.src=null!=m.user&&null!=m.user.pictureUrl?m.user.pictureUrl:Editor.userImage;I.appendChild(M);M=document.createElement("div");M.className="geCommentHeaderTxt";I.appendChild(M);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,null!=m.user?m.user.displayName:mxResources.get("unknownUser"));-M.appendChild(P);P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",m.id);J(m,P);M.appendChild(P);G.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,m.content||"");G.appendChild(I);m.isLocked&&(G.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";I.appendChild(S);e||m.isLocked||0!=B&&!f||T(mxResources.get("reply"),+"px";m.isResolved&&(n.style.opacity="0.7");var I=document.createElement("div");I.className="geCommentHeader";var M=document.createElement("img");M.className="geCommentUserImg";M.src=null!=m.user&&null!=m.user.pictureUrl?m.user.pictureUrl:Editor.userImage;I.appendChild(M);M=document.createElement("div");M.className="geCommentHeaderTxt";I.appendChild(M);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,null!=m.user?m.user.displayName:mxResources.get("unknownUser"));+M.appendChild(N);N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",m.id);J(m,N);M.appendChild(N);G.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,m.content||"");G.appendChild(I);m.isLocked&&(G.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";I.appendChild(S);e||m.isLocked||0!=B&&!f||T(mxResources.get("reply"),function(){v("",!0)},m.isResolved);M=b.getCurrentUser();null==M||null==m.user||M.id!=m.user.id||e||m.isLocked||(T(mxResources.get("edit"),function(){function V(){D(m,G,function(){K(G);m.editComment(m.content,function(){Q(G)},function(W){L(G);V();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}V()},m.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(G);m.deleteComment(function(V){if(!0===V){V=G.querySelector(".geCommentTxt");V.innerText="";mxUtils.write(V,mxResources.get("msgDeleted"));var W=G.querySelectorAll(".geCommentAction");for(V=0;V<W.length;V++)W[V].parentNode.removeChild(W[V]);Q(G);G.style.opacity="0.5"}else{W=k(m).replies;for(V=0;V<W.length;V++)z.removeChild(W[V]);for(V=0;V<u.length;V++)if(u[V]==m){u.splice(V,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(V){L(G);b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},m.isResolved));e||m.isLocked||0!=B||T(m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(V){function W(){var X=V.target;X.innerText="";m.isResolved=!m.isResolved;mxUtils.write(X,m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=m.isResolved?"none":"",Y=k(m).replies,ba="light-dark("+(m.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=X.parentNode&&(ca[fa].style.display=Z);U||(Y[ea].style.display="none")}x()}m.isResolved?v(mxResources.get("reOpened")+": ",!0,W,!1,!0):v(mxResources.get("markedAsResolved"),!1,W,!0)});G.appendChild(I);null!=A?z.insertBefore(G,A.nextSibling):z.appendChild(G);for(A=0;null!=m.replies&&A<m.replies.length;A++)I=m.replies[A],I.isResolved=m.isResolved,c(I,m.replies,null,B+1,H);null!=p&&(p.comment.id==m.id?(H=m.content,m.content=p.comment.content,D(m,G,p.saveCallback,p.deleteOnCancel),m.content=H):null==p.comment.id&&p.comment.pCommentId==m.id&&(z.appendChild(p.div),D(p.comment,p.div,p.saveCallback,p.deleteOnCancel)));return G}}var e=!b.canComment(),f=b.canReplyToReplies(),p=null,n=document.createElement("div");n.className="geCommentsWin";n.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var t=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";z.style.bottom=parseInt(t)+7+"px";n.appendChild(z);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(E,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=t;C.style.padding="3px 4px 4px 4px";t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset geToggleItem";t.style.width="16px";t.style.height="18px";t.style.backgroundPosition="center center";t.style.backgroundRepeat=-"no-repeat";t.style.backgroundSize="20px";t.style.margin="0 2px";t.style.display="inline-block";t.style.cursor="pointer";if(!e){var F=t.cloneNode();F.style.backgroundImage="url("+Editor.plusImage+")";F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(m){function u(){D(A,B,function(H){K(B);b.addComment(H,function(T){H.id=T;O.push(H);Q(B)},function(T){L(B);u();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var A=-b.newComment("",b.getCurrentUser()),B=c(A,O,null,0);u();m.preventDefault();mxEvent.consume(m)});C.appendChild(F)}var R=t.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(R,"click",function(m){(U=!U)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");N();m.preventDefault();mxEvent.consume(m)});C.appendChild(R);b.commentsRefreshNeeded()&&(F=t.cloneNode(),-F.style.backgroundImage="url("+Editor.refreshImage+")",F.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(F,"click",function(m){N();m.preventDefault();mxEvent.consume(m)}),C.appendChild(F));b.commentsSaveNeeded()&&(t=t.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',t.setAttribute("title",mxResources.get("save")),t.className="geButton geAdaptiveAsset",mxEvent.addListener(t,"click",function(m){y();m.preventDefault();mxEvent.consume(m)}),-C.appendChild(t));n.appendChild(C);var O=[],N=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var m=p.div.querySelector(".geCommentEditTxtArea"),u=p.div.querySelector(".geCommentEditBtns");p.comment.content=m.value;m.parentNode.removeChild(m);u.parentNode.removeChild(u)}catch(A){b.handleError(A)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+-"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(A){function B(H){if(null!=H){H.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});for(var T=0;T<H.length;T++)B(H[T].replies)}}A.sort(function(H,T){return new Date(H.modifiedDate)-new Date(T.modifiedDate)});z.innerText="";z.appendChild(E);E.style.display="block";O=A;for(A=0;A<O.length;A++)B(O[A].replies),c(O[A],O,null,0,U);null!=p&&null==p.comment.id&&null==p.comment.pCommentId&&(z.appendChild(p.div),-D(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(A){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(A&&A.message?": "+A.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});N();this.refreshComments=N;C=mxUtils.bind(this,function(){function m(T){var k=A[T.id];if(null!=k)for(J(T,k),k=0;null!=T.replies&&k<T.replies.length;k++)m(T.replies[k])}if(this.window.isVisible()){for(var u=z.querySelectorAll(".geCommentDate"),A=-{},B=0;B<u.length;B++){var H=u[B];A[H.getAttribute("data-commentId")]=H}for(B=0;B<O.length;B++)m(O[B])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),n,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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()}));+"no-repeat";t.style.backgroundSize="20px";t.style.margin="0 2px";t.style.display="inline-block";t.style.cursor="pointer";if(!e){var F=t.cloneNode();F.style.backgroundImage="url("+Editor.plusImage+")";F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(m){function u(){D(A,B,function(H){K(B);b.addComment(H,function(T){H.id=T;P.push(H);Q(B)},function(T){L(B);u();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var A=+b.newComment("",b.getCurrentUser()),B=c(A,P,null,0);u();m.preventDefault();mxEvent.consume(m)});C.appendChild(F)}var R=t.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(R,"click",function(m){(U=!U)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");O();m.preventDefault();mxEvent.consume(m)});C.appendChild(R);b.commentsRefreshNeeded()&&(F=t.cloneNode(),+F.style.backgroundImage="url("+Editor.refreshImage+")",F.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(F,"click",function(m){O();m.preventDefault();mxEvent.consume(m)}),C.appendChild(F));b.commentsSaveNeeded()&&(t=t.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',t.setAttribute("title",mxResources.get("save")),t.className="geButton geAdaptiveAsset",mxEvent.addListener(t,"click",function(m){y();m.preventDefault();mxEvent.consume(m)}),+C.appendChild(t));n.appendChild(C);var P=[],O=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var m=p.div.querySelector(".geCommentEditTxtArea"),u=p.div.querySelector(".geCommentEditBtns");p.comment.content=m.value;m.parentNode.removeChild(m);u.parentNode.removeChild(u)}catch(A){b.handleError(A)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))++"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(A){function B(H){if(null!=H){H.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});for(var T=0;T<H.length;T++)B(H[T].replies)}}A.sort(function(H,T){return new Date(H.modifiedDate)-new Date(T.modifiedDate)});z.innerText="";z.appendChild(E);E.style.display="block";P=A;for(A=0;A<P.length;A++)B(P[A].replies),c(P[A],P,null,0,U);null!=p&&null==p.comment.id&&null==p.comment.pCommentId&&(z.appendChild(p.div),+D(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(A){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(A&&A.message?": "+A.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});O();this.refreshComments=O;C=mxUtils.bind(this,function(){function m(T){var k=A[T.id];if(null!=k)for(J(T,k),k=0;null!=T.replies&&k<T.replies.length;k++)m(T.replies[k])}if(this.window.isVisible()){for(var u=z.querySelectorAll(".geCommentDate"),A=+{},B=0;B<u.length;B++){var H=u[B];A[H.getAttribute("data-commentId")]=H}for(B=0;B<P.length;B++)m(P[B])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),n,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,g,l,d,q,y,x,D,J,K,L){var Q=document.createElement("div");Q.style.textAlign="center";L=null!=L?L:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=L+"px";c.style.lineHeight="1.2em";mxUtils.write(c,g);Q.appendChild(c);null!=K&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",g=document.createElement("img"),g.setAttribute("src",K),c.appendChild(g),Q.appendChild(c));K=document.createElement("div");K.style.textAlign="center";K.style.whiteSpace="nowrap";var e=document.createElement("input");e.setAttribute("type","checkbox");y=mxUtils.button(y||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(e.checked)});y.className="geBtn";null!=D&&(y.innerHTML=D+"<br>"+y.innerHTML,y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.style.width="40%");b.editor.cancelFirst&&K.appendChild(y);var f=mxUtils.button(q||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(e.checked)});K.appendChild(f);null!=x?(f.innerHTML=x+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";b.editor.cancelFirst||K.appendChild(y);Q.appendChild(K);J?(K.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(e),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),@@ -13724,17 +13725,18 @@ null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===if(null!=n){EditorUi.debug("Setting configuration",JSON.stringify(n));if(null!=n.merge){var t=localStorage.getItem(Editor.configurationKey);if(null!=t)try{var z=JSON.parse(t),E;for(E in n.merge)z[E]=n.merge[E];n=z}catch(C){window.location.hash="",alert(C)}else n=n.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(n)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(C){window.location.hash="",alert(C)}1<f.length&&(Graph.prototype.defaultThemes["default-style2"]=f[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=f[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?p():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],p,function(C){document.body.innerHTML="";var F=document.createElement("pre");mxUtils.write(F,C.stack);document.body.appendChild(F)}))},function(f){f=document.getElementById("geStatus");null!=f&&(f.innerHTML="Error loading page. <a>Please try refreshing.</a>",f.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';-else if(App.isMainCalled=!0,window.onerror=function(e,f,p,n,t){EditorUi.logError("Global: "+(null!=e?e:""),f,p,n,t,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",e,"\nURL:",f,"\nLine:",p,"\nColumn:",n,"\nError:",t)):console.error("Message:",e,"\nURL:",f,"\nLine:",p,"\nColumn:",n,"\nError:",t);window.setTimeout(function(){alert("Error: "+(null!=e?e:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&-"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q)}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&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var y=document.getElementById("geBootstrap");-if(null!=y){var x=mxUtils.getTextContent(y);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(x).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var D=document.getElementById("geMain");null!=D&&(x=mxUtils.getTextContent(D),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(x).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&-("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(e){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||-"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var J=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var K=JSON.parse(localStorage.getItem(mxSettings.key));null!=K&&(J=K.plugins)}catch(e){}K=urlParams.p;App.initPluginCallback();null!=K&&App.loadPlugins(K.split(";"));if(null!=J&&0<-J.length&&"0"!=urlParams.plugins)for(q=0;q<J.length;q++)try{("/"==J[q].charAt(0)&&(J[q]=PLUGINS_BASE_PATH+J[q]),App.isSameDomain(J[q]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(J[q])?null==App.pluginsLoaded[J[q]]&&(App.pluginsLoaded[J[q]]=!0,App.embedModePluginsCount++,mxscript(J[q])):null!=window.console&&console.log("Unknown plugin:",J[q]):null!=window.console&&console.log("Blocked plugin:",J[q])}catch(e){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&-"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var L=window.opener||window.parent,Q=function(e){if(e.source==L)try{var f=JSON.parse(e.data);null!=f&&"configure"==-f.action&&(mxEvent.removeListener(window,"message",Q),Editor.configure(f.config),mxSettings.load(),null!=f.config.darkColor&&document.body.style.setProperty("--dark-color",f.config.darkColor),f.colorSchemeMeta&&mxmeta("color-scheme","dark light"),l())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,e.data)}};mxEvent.addListener(window,"message",Q);L.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",-window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):console.error(e)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var c=localStorage.getItem(Editor.configurationKey);if(null!=c)try{c=JSON.parse(c),null!=c&&(EditorUi.debug("Using local configuration",c),Editor.configure(c),mxSettings.load())}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):-console.error(e)}}}l()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(e){document.body.innerHTML="",J=document.createElement("pre"),mxUtils.write(J,e.stack),document.body.appendChild(J)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;-"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;+else if(mxUtils.lightDarkColorSupported||mxUtils.get("styles/grapheditor.css",mxUtils.bind(this,function(e){if(200<=e.getStatus()&&299>=e.getStatus()){var f=document.createElement("style");f.type="text/css";f.appendChild(document.createTextNode(e.getText().replace(/light-dark\(\s*(var\([^\)]+\)|[^,]+)\s*,\s*(var\([^\)]+\)|[^)]+)\s*\)/g,"$1")));document.head.appendChild(f)}})),App.isMainCalled=!0,window.onerror=function(e,f,p,n,t){EditorUi.logError("Global: "+(null!=e?e:""),f,p,n,t,null,!0);null==+window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",e,"\nURL:",f,"\nLine:",p,"\nColumn:",n,"\nError:",t)):console.error("Message:",e,"\nURL:",f,"\nLine:",p,"\nColumn:",n,"\nError:",t);window.setTimeout(function(){alert("Error: "+(null!=e?e:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var q=document.getElementById("geInfo");+null!=q&&q.parentNode.removeChild(q)}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&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var y=document.getElementById("geBootstrap");if(null!=y){var x=mxUtils.getTextContent(y);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(x).toString()&&+(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var D=document.getElementById("geMain");null!=D&&(x=mxUtils.getTextContent(D),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(x).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||+/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(e){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||+"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var J=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var K=JSON.parse(localStorage.getItem(mxSettings.key));null!=K&&(J=K.plugins)}catch(e){}K=urlParams.p;App.initPluginCallback();null!=K&&App.loadPlugins(K.split(";"));if(null!=J&&0<J.length&&"0"!=urlParams.plugins)for(q=+0;q<J.length;q++)try{("/"==J[q].charAt(0)&&(J[q]=PLUGINS_BASE_PATH+J[q]),App.isSameDomain(J[q]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(J[q])?null==App.pluginsLoaded[J[q]]&&(App.pluginsLoaded[J[q]]=!0,App.embedModePluginsCount++,mxscript(J[q])):null!=window.console&&console.log("Unknown plugin:",J[q]):null!=window.console&&console.log("Blocked plugin:",J[q])}catch(e){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&+"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var L=window.opener||window.parent,Q=function(e){if(e.source==L)try{var f=JSON.parse(e.data);null!=f&&"configure"==f.action&&(mxEvent.removeListener(window,"message",+Q),Editor.configure(f.config),mxSettings.load(),null!=f.config.darkColor&&document.body.style.setProperty("--dark-color",f.config.darkColor),f.colorSchemeMeta&&mxmeta("color-scheme","dark light"),l())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,e.data)}};mxEvent.addListener(window,"message",Q);L.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),+Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):console.error(e)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var c=localStorage.getItem(Editor.configurationKey);if(null!=c)try{c=JSON.parse(c),null!=c&&(EditorUi.debug("Using local configuration",c),Editor.configure(c),mxSettings.load())}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):console.error(e)}}}l()}}else document.body.innerHTML=+'<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(e){document.body.innerHTML="",J=document.createElement("pre"),mxUtils.write(J,e.stack),document.body.appendChild(J)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;+App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;App.loadPlugins=function(b,g){EditorUi.debug("Loading plugins",b);for(var l=0;l<b.length;l++)if(null!=b[l]&&0<b[l].length)try{if(null!=App.pluginRegistry[b[l]]){var d=PLUGINS_BASE_PATH+App.pluginRegistry[b[l]];null==App.pluginsLoaded[d]&&(App.pluginsLoaded[d]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?g?mxinclude(d):mxscript(d):g?mxinclude(d):mxscript(drawDevUrl+d))}else null!=window.console&&console.log("Unknown plugin:",b[l])}catch(q){null!=window.console&&console.log("Error loading plugin:",b[l],q)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};App.prototype.initializeViewerMode=function(){var b=window.opener||window.parent;null!=b&&this.editor.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(){b.postMessage(JSON.stringify(this.createLoadMessage("size")),"*")}))};@@ -13773,12 +13775,12 @@ App.prototype.addRecent=function(b,g,l){if(isLocalStorage&&null!=localStorage){gApp.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(g){}};App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,g=this.getCurrentFile();null==g||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=g&&(b=(null!=g.getTitle()?g.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};-App.prototype.getThumbnail=function(b,g,l){l=null!=l?l:0;var d=!1;try{var q=!0,y=window.setTimeout(mxUtils.bind(this,function(){q=!1;g(null)}),this.timeout),x=mxUtils.bind(this,function(O){window.clearTimeout(y);q&&g(O)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,J=D.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=this.editor.graph.setBackgroundImage;-var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(J):null!=L.viewState&&null!=L.viewState&&(J=L.viewState.backgroundImage,D.setBackgroundImage(J));D.getGlobalVariable=function(O){return"page"==O?L.getName():"pagenumber"==O?1:K.apply(this,arguments)};D.getGlobalVariable=K;document.body.appendChild(D.container);D.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(O){try{D!=this.editor.graph&&null!=D.container.parentNode&&-D.container.parentNode.removeChild(D.container)}catch(N){O=null}x(O)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,D,l,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var Q=document.createElement("canvas"),c=D.getGraphBounds(),e=D.view.translate,f=D.view.scale;null!=J&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+J.x)*f,(e.y+J.y)*f,J.width*f,J.height*f)));var p=b/c.width;p=Math.min(1,Math.min(3*b/(4*c.height),+App.prototype.getThumbnail=function(b,g,l){l=null!=l?l:0;var d=!1;try{var q=!0,y=window.setTimeout(mxUtils.bind(this,function(){q=!1;g(null)}),this.timeout),x=mxUtils.bind(this,function(P){window.clearTimeout(y);q&&g(P)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,J=D.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=this.editor.graph.setBackgroundImage;+var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(J):null!=L.viewState&&null!=L.viewState&&(J=L.viewState.backgroundImage,D.setBackgroundImage(J));D.getGlobalVariable=function(P){return"page"==P?L.getName():"pagenumber"==P?1:K.apply(this,arguments)};D.getGlobalVariable=K;document.body.appendChild(D.container);D.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(P){try{D!=this.editor.graph&&null!=D.container.parentNode&&+D.container.parentNode.removeChild(D.container)}catch(O){P=null}x(P)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,D,l,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var Q=document.createElement("canvas"),c=D.getGraphBounds(),e=D.view.translate,f=D.view.scale;null!=J&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+J.x)*f,(e.y+J.y)*f,J.width*f,J.height*f)));var p=b/c.width;p=Math.min(1,Math.min(3*b/(4*c.height),p));var n=Math.floor(c.x),t=Math.floor(c.y);Q.setAttribute("width",Math.ceil(p*(c.width+4)));Q.setAttribute("height",Math.ceil(p*(c.height+4)));var z=Q.getContext("2d");z.scale(p,p);z.translate(-n,-t);var E=D.background;if(null==E||""==E||E==mxConstants.NONE)E="#ffffff";z.save();z.fillStyle=E;z.fillRect(n,t,Math.ceil(c.width+4),Math.ceil(c.height+4));z.restore();if(null!=J){var C=new Image;C.src=J.src;z.drawImage(C,J.x*p,J.y*p,J.width*p,J.height*p)}var F=new mxJsCanvas(Q),R=new mxAsyncCanvas(this.thumbImageCache);-F.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(O,N){O.shape instanceof mxShape&&O.shape.checkBounds()&&(N.save(),N.translate(.5,.5),O.shape.paint(N),N.translate(-.5,-.5),N.restore())};U.drawText=function(O,N){};U.drawState(D.getView().getState(D.model.root),R);R.finish(mxUtils.bind(this,function(){try{U.drawState(D.getView().getState(D.model.root),F),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(O){Q=null}x(Q)}));-d=!0}}catch(O){d=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}d||window.clearTimeout(y);return d};+F.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(P,O){P.shape instanceof mxShape&&P.shape.checkBounds()&&(O.save(),O.translate(.5,.5),P.shape.paint(O),O.translate(-.5,-.5),O.restore())};U.drawText=function(P,O){};U.drawState(D.getView().getState(D.model.root),R);R.finish(mxUtils.bind(this,function(){try{U.drawState(D.getView().getState(D.model.root),F),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(P){Q=null}x(Q)}));+d=!0}}catch(P){d=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}d||window.clearTimeout(y);return d};(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(g,l){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();g=null!=d?d.getMode():g;g==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):g==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):g==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=g==App.MODE_DEVICE?"pointer":"default")}if(l)try{if(isLocalStorage)localStorage.setItem(".mode",g);else if("undefined"!=typeof Storage){var q=new Date;q.setYear(q.getFullYear()+1);document.cookie="MODE="+g+"; expires="+q.toUTCString()}}catch(y){}}})();App.prototype.appIconClicked=function(b){var g=this.getCurrentFile(),l=null!=g?g.getMode():null;g=null!=g?mxEvent.isAltDown(b)?g.getFolderUrl():g.getFileUrl():null;null!=g?this.openLink(g):l==App.MODE_GOOGLE?this.openLink("https://drive.google.com/?authuser=0"):l==App.MODE_ONEDRIVE?this.openLink("https://onedrive.live.com/"):l==App.MODE_DROPBOX?this.openLink("https://www.dropbox.com/"):l==App.MODE_GITHUB?this.openLink("https://github.com/"):l==App.MODE_GITLAB?this.openLink(DRAWIO_GITLAB_URL):l==App.MODE_TRELLO?@@ -13957,7 +13959,7 @@ Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);nud.style.marginLeft="4px";d.style.cursor="help";d.style.color="blue";var q=document.createElement("img");q.setAttribute("src",Editor.helpImage);q.setAttribute("valign","bottom");q.setAttribute("border","0");q.className="geAdaptiveAsset";mxUtils.setOpacity(q,60);q.style.height="16px";q.style.width="16px";d.appendChild(q);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(y){this.editorUi.hideCurrentMenu();this.editorUi.openLink(l);mxEvent.consume(y)}));return d};Menus.prototype.addLinkToItem=function(l,d){null!=l&&(d=this.createHelpLink(d),d.style.display="inline",d.style.marginLeft="8px",l.firstChild.nextSibling.appendChild(d))};Menus.prototype.removeCustomFont=function(l,d){for(var q=0;q<this.customFonts.length;q++)if(this.customFonts[q].name==l&&this.customFonts[q].url==d){this.customFonts.splice(q,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(l,d){for(var q=0;q<this.customFonts.length;q++)if(this.customFonts[q].name==l&&this.customFonts[q].url==d)return!0;for(q=0;q<this.defaultFonts.length;q++){var y=this.defaultFonts[q];if("string"!==typeof y&&y.fontFamily==l&&y.fontUrl==d||"string"===typeof y&&y==l&&null==d)return!0}return!1};Menus.prototype.addCustomFont=function(l,d){null==l||this.containsFont(l,d)||(this.customFonts.push({name:l,url:d}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var g=Menus.prototype.init;Menus.prototype.init=function(){function l(m,-u,A){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(B,H,T,k,v,G,I,M,P,S,V,W,X){var Z=parseInt(B);!isNaN(Z)&&0<Z&&(d.exportImage(Z/100,H&&"png"==m,T,k,v&&"png"==m,I,!M,P,m,V,null,W,X),null!=A&&A(B,H,T,k,v,G,I,M,P,S,V,W,X))}),!0,u,m,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(B,H,T,k,+u,A){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(B,H,T,k,v,G,I,M,N,S,V,W,X){var Z=parseInt(B);!isNaN(Z)&&0<Z&&(d.exportImage(Z/100,H&&"png"==m,T,k,v&&"png"==m,I,!M,N,m,V,null,W,X),null!=A&&A(B,H,T,k,v,G,I,M,N,S,V,W,X))}),!0,u,m,!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(B,H,T,k,v){d.downloadFile(H&&"png"==m?"xmlpng":m,null,null,B,null,null,T,k,v)}),!1,!0)}g.apply(this,arguments);var d=this.editorUi,q=d.editor.graph,y=mxUtils.bind(q,q.isEnabled);mxClient.IS_SVG||d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(m){return"file"!=m}));d.actions.addAction("new...",function(){var m=d.isOffline(),u=new NewDialog(d,m,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(u.container,m?350:620,m?70:460,!0,!0,function(A){d.sidebar.hideTooltip();A&&null==d.getCurrentFile()&&d.showSplash()});u.init()});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var m=new NewDialog(d,null,!1,function(u){d.hideDialog();if(null!=u){var A=d.editor.graph.getFreeInsertPoint();q.setSelectionCells(d.importXml(u,Math.max(A.x,20),Math.max(A.y,20),!0,null,null,!0));q.scrollCellToVisible(q.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(m.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});m.init()}})).isEnabled=y;var x=d.actions.addAction("shareCursor",function(){d.setShareCursorPosition(!d.isShareCursorPosition())});x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isShareCursorPosition()});x=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});x.setToggleAction(!0);@@ -13970,8 +13972,8 @@ x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isAutoDarkMode(!x=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(m){d.setSketchMode(!Editor.sketchMode)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return Editor.sketchMode});d.actions.addAction("properties...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new FilePropertiesDialog(d,m);d.showDialog(m.container,340,200,!0,!0);m.init()})}).isEnabled=y;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(q.isEnabled()){if(null==d.freehandWindow){var m=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,m?126:90,m)}q.freehand.isDrawing()?q.freehand.stopDrawing():q.freehand.startDrawing();d.freehandWindow.window.setVisible(q.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return y()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var m=document.createElement("div");m.style.whiteSpace="nowrap";var u=null==d.pages||1>=d.pages.length,A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatXml"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";m.appendChild(A);var B=d.addCheckbox(m,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),H=d.addCheckbox(m,mxResources.get("compressed"),Editor.defaultCompressed),T=d.addCheckbox(m,mxResources.get("allPages"),!u,u);T.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?T.setAttribute("disabled",-"disabled"):T.removeAttribute("disabled")});m=new CustomDialog(d,m,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!B.checked,u||!T.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(m,u,A,B,H,T,k,v,G,I,M,P){k=[];B&&G&&k.push("tags=%7B%7D");m=new EmbedDialog(d,-d.createLink(m,u,!0,B,H,T,null,!0,k,null,A,null,P));d.showDialog(m.container,450,240,!0,!0);m.init()},null,!0)}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("export"),null,m,function(u,A,B,H,T,k,v,G,I,M,P,S){d.createHtml(u,A,B,H,T,k,v,G,I,M,P,mxUtils.bind(this,function(V,W){var X=d.getBaseFilename(v);V='\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>'++"disabled"):T.removeAttribute("disabled")});m=new CustomDialog(d,m,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!B.checked,u||!T.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(m,u,A,B,H,T,k,v,G,I,M,N){k=[];B&&G&&k.push("tags=%7B%7D");m=new EmbedDialog(d,+d.createLink(m,u,!0,B,H,T,null,!0,k,null,A,null,N));d.showDialog(m.container,450,240,!0,!0);m.init()},null,!0)}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("export"),null,m,function(u,A,B,H,T,k,v,G,I,M,N,S){d.createHtml(u,A,B,H,T,k,v,G,I,M,N,mxUtils.bind(this,function(V,W){var X=d.getBaseFilename(v);V='\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(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+W+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),S)})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?d.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(m,u){m=null!=d.pages?d.pages.length:1;var A=null==d.pages||1>=d.pages.length,B=d.getPageIndex(d.currentPage);B=null!=B?B+1:1;d.downloadFile("pdf",null,null,!u.selection,A||!u.allPages&&u.pagesFrom==B&&u.pagesTo==B,!u.crop,u.transparent,u.scale,null,u.grid,u.includeCopy,u.allPages||u.pagesFrom==B&&u.pagesTo==B?null:{from:Math.max(0,Math.min(m-1,u.pagesFrom-1)),to:Math.max(0,Math.min(m-1,u.pagesTo-1))},u.border,u.fit,u.sheetsAcross,u.sheetsDown)})):d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,320,null!=d.pages&&1<d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function m(){null!=u&&u.removeDraft();d.fileLoaded(null)}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges")):m()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){q.getSelectionCells();if(1==q.getSelectionCount()){var m=q.getSelectionCell(),@@ -13983,7 +13985,7 @@ x.isEnabled=y);x=d.actions.put("defaultAdaptiveColors",new Action(mxResources.gefunction(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.adaptiveColors="none";q.model.execute(m)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return"none"==q.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],u)})));isLocalStorage&&(x=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var D=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});D.setToggleAction(!0);D.setSelectedCallback(function(){return D.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var m=q.getSelectionCells(),u=[],A=0;A<m.length;A++)q.getModel().isVertex(m[A])&&u.push(m[A]);0<u.length&&(m=new EditGeometryDialog(d,u),d.showDialog(m.container,200,270,!0,!0),m.init())},null,null,Editor.ctrlKey+"+Shift+M");d.actions.addAction("copyStyle",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var m=q.getSelectionCell(),u=q.getCellStyle(m,!1);d.copiedStyle={};var A=[],B=[],H;for(H in u)A.push(u[H]),B.push(H);q.copyCellStyles([m],B,A,d.copiedStyle,d.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");d.actions.addAction("pasteStyle",function(){q.isEnabled()&&!q.isSelectionEmpty()&&null!=d.copiedStyle&&q.pasteCellStyles(q.includeDescendants(q.getSelectionCells()),-d.copiedStyle,d.copiedStyle,!0)},null,null,"Alt+V");d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(m,u,A,B,H,T,k,v,G,I,M,P,S,V){m=parseInt(m);d.lastExportSvgEditable=H;!isNaN(m)&&0<m&&d.exportSvg(m/100,u,A,B,H,T,k,!v,G,I,P,S,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")++d.copiedStyle,d.copiedStyle,!0)},null,null,"Alt+V");d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(m,u,A,B,H,T,k,v,G,I,M,N,S,V){m=parseInt(m);d.lastExportSvgEditable=H;!isNaN(m)&&0<m&&d.exportSvg(m/100,u,A,B,H,T,k,!v,G,I,N,S,V)}),!0,d.lastExportSvgEditable,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){l("png",d.lastExportPngEditable,function(m,u,A,B,H){d.lastExportPngEditable=H})}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){l("jpeg")}));d.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){l("webp")}));x=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var m=mxUtils.sortCells(q.model.getTopmostCells(q.getSelectionCells())),u=mxUtils.getXml(0==m.length?d.editor.getGraphXml():q.encodeCells(m));d.copyImage(m,u)}),null,null,"Ctrl+Alt+X");x.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;x=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){q.setShadowVisible(!q.shadowVisible)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return q.shadowVisible});d.actions.put("about",new Action("v"+EditorUi.VERSION,function(m,u){}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",@@ -14006,8 +14008,8 @@ A);A()}}return u}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{od.adaptiveColorsWindow.window.setVisible(!0)}));x=this.get("viewZoom");var K=x.funct;x.funct=mxUtils.bind(this,function(m,u){K.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(m,["-","outline","fullscreen"],u)});x=this.get("layout");var L=x.funct;x.funct=function(m,u){L.apply(this,arguments);m.addItem(mxResources.get("orgChart"),null,function(){var A=null,B=20,H=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=A&&d.tryAndHandle(mxUtils.bind(this,function(){var V=d.editor.graph,W=new mxOrgChartLayout(V,A,B,H),X=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(X=V.getSelectionCell());W.execute(X)}))},k=document.createElement("div"),v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("orgChartType")+": ");k.appendChild(v);var G=document.createElement("select");G.style.width="160px";G.style.boxSizing="border-box";v=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var I=0;I<v.length;I++){var M=document.createElement("option");mxUtils.write(M,v[I]);M.value=I;2==I&&M.setAttribute("selected","selected");G.appendChild(M)}mxEvent.addListener(G,"change",function(){A=G.value});k.appendChild(G);v=document.createElement("div");v.style.marginTop="6px";v.style.display=-"inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("parentChildSpacing")+": ");k.appendChild(v);var P=document.createElement("input");P.type="number";P.value=B;P.style.width="160px";P.style.boxSizing="border-box";k.appendChild(P);mxEvent.addListener(P,"change",function(){B=P.value});v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("siblingSpacing")+": ");k.appendChild(v);var S=document.createElement("input");-S.type="number";S.value=H;S.style.width="160px";S.style.boxSizing="border-box";k.appendChild(S);mxEvent.addListener(S,"change",function(){H=S.value});v=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(G.value),parentChildSpacing:parseInt(P.value),siblingSpacing:parseInt(S.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});v.className="geBtn";k=new CustomDialog(d,k,function(){null==A&&(A=2);d.loadOrgChartLayouts(T)},+"inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("parentChildSpacing")+": ");k.appendChild(v);var N=document.createElement("input");N.type="number";N.value=B;N.style.width="160px";N.style.boxSizing="border-box";k.appendChild(N);mxEvent.addListener(N,"change",function(){B=N.value});v=document.createElement("div");v.style.marginTop="6px";v.style.display="inline-block";v.style.width="180px";mxUtils.write(v,mxResources.get("siblingSpacing")+": ");k.appendChild(v);var S=document.createElement("input");+S.type="number";S.value=H;S.style.width="160px";S.style.boxSizing="border-box";k.appendChild(S);mxEvent.addListener(S,"change",function(){H=S.value});v=mxUtils.button(mxResources.get("custom")+"...",function(){var V=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(G.value),parentChildSpacing:parseInt(N.value),siblingSpacing:parseInt(S.value)}}];d.hideDialog();d.showCustomLayoutDialog(JSON.stringify(V,null,2))});v.className="geBtn";k=new CustomDialog(d,k,function(){null==A&&(A=2);d.loadOrgChartLayouts(T)},null,null,null,v);d.showDialog(k.container,355,140,!0,!0)},u,null,y());m.addSeparator(u);m.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){d.tryAndHandle(mxUtils.bind(this,function(){var A=new mxParallelEdgeLayout(q);A.checkOverlap=!0;d.prompt(mxResources.get("spacing"),A.spacing,mxUtils.bind(this,function(B){d.tryAndHandle(mxUtils.bind(this,function(){A.spacing=B;d.executeLayout(function(){A.execute(q.getDefaultParent(),q.isSelectionEmpty()?null:q.getSelectionCells())},!1)}))}))}))}),u);m.addSeparator(u);d.menus.addMenuItem(m,"runLayout",u,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(m,u){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(m,["keyboardShortcuts","-","about"],u);else{var A=m.addItem("Search:",null,null,u,null,null,!1);A.style.cursor="default";var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","25");B.style.borderWidth="1px";B.style.marginLeft="8px";mxEvent.addListener(B,"keydown",mxUtils.bind(this,function(H){var T=mxUtils.trim(B.value);13==H.keyCode&&0<T.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(T)),B.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:T}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==H.keyCode&&(B.value="")}));A.firstChild.nextSibling.appendChild(B);mxEvent.addGestureListeners(B,@@ -14018,8 +14020,8 @@ u){this.addMenuItems(m,["languageCode","-"],u);u=m.addItem(mxResources.get("disamxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!q.isSelectionEmpty()){var m=q.cloneCells(q.getSelectionCells()),u=q.getBoundingBoxFromGeometry(m,!0);m=q.moveCells(m,-u.x,-u.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+u.width+", "+u.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(q.encodeCells(m)))+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function m(k){return null==k||null==k.boundingBox||!isNaN(k.boundingBox.x)&&!isNaN(k.boundingBox.y)&&!isNaN(k.boundingBox.width)&&!isNaN(k.boundingBox.height)}var u=q.getGraphBounds(),A=q.view.translate,B=q.view.scale;q.insertVertex(q.getDefaultParent(),null,"",u.x/B-A.x,u.y/B-A.y,u.width/B,u.height/B,"fillColor=none;strokeColor=red;");var H=0,T=0;q.view.states.visit(function(k,v){k=!0;m(v.shape)||(console.log("invalid shape",v.cell.id,v.shape),k=!1);m(v.text)||(console.log("invalid text",v.cell.id,v.text),k=!1);k||H++;T++});console.log("states checked",T,"invalid",H)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var m=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";m=new TextareaDialog(d,-"Paste Data:",m,function(u){if(0<u.length)try{var A=function(v){function G(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=P[ba]){for(;0<P[ba].length;){var ea=P[ba].pop();G(ea)}delete P[ba]}}else mxLog.debug(I+": Visited: "+ba)}var I=v.parentNode.id,M=v.childNodes;v={};for(var P={},S=null,V={},W=0;W<M.length;W++){var X=M[W];if(null!=X.id&&0<X.id.length)if(null==v[X.id]){v[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(I+": Multiple roots: "+X.id):S=X.id:(null==P[Z]&&(P[Z]=[]),P[Z].push(X.id))}else V[X.id]=-X.id}M=Object.keys(V);0<M.length?(M=I+": "+M.length+" Duplicates: "+M.join(", "),mxLog.debug(M+" (see console)")):mxLog.debug(I+": Checked");var Y={};null==S?mxLog.debug(I+": No root"):(G(S),Object.keys(Y).length!=Object.keys(v).length&&(mxLog.debug(I+": Invalid tree: (see console)"),console.log(I+": Invalid tree",P)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var B=mxUtils.parseXml(u),H=d.getPagesForNode(B.documentElement,"mxGraphModel");+"Paste Data:",m,function(u){if(0<u.length)try{var A=function(v){function G(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=N[ba]){for(;0<N[ba].length;){var ea=N[ba].pop();G(ea)}delete N[ba]}}else mxLog.debug(I+": Visited: "+ba)}var I=v.parentNode.id,M=v.childNodes;v={};for(var N={},S=null,V={},W=0;W<M.length;W++){var X=M[W];if(null!=X.id&&0<X.id.length)if(null==v[X.id]){v[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(I+": Multiple roots: "+X.id):S=X.id:(null==N[Z]&&(N[Z]=[]),N[Z].push(X.id))}else V[X.id]=+X.id}M=Object.keys(V);0<M.length?(M=I+": "+M.length+" Duplicates: "+M.join(", "),mxLog.debug(M+" (see console)")):mxLog.debug(I+": Checked");var Y={};null==S?mxLog.debug(I+": No root"):(G(S),Object.keys(Y).length!=Object.keys(v).length&&(mxLog.debug(I+": Invalid tree: (see console)"),console.log(I+": Invalid tree",N)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var B=mxUtils.parseXml(u),H=d.getPagesForNode(B.documentElement,"mxGraphModel");if(null!=H&&0<H.length)try{var T=d.getHashValueForPages(H);mxLog.debug("Checksum: ",T)}catch(v){mxLog.debug("Error: ",v.message)}else mxLog.debug("No pages found for checksum");var k=B.getElementsByTagName("root");for(u=0;u<k.length;u++)A(k[u]);mxLog.show()}catch(v){d.handleError(v),null!=window.console&&console.error(v)}});d.showDialog(m.container,620,460,!0,!0);m.init()}));var Q=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var m=new TextareaDialog(d,"Diff/Sync:","",function(u){var A=d.getCurrentFile();if(0<u.length&&null!=A)try{var B=JSON.parse(u);A.patch([B],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,A){Q=d.getPagesForXml(d.getFileData(!0));m.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(Q)}],["Diff",function(u,A){try{m.textarea.value=JSON.stringify(d.diffPages(Q,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==Q?(Q=d.getPagesForXml(d.getFileData(!0)),m.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(Q)):m.textarea.value=JSON.stringify(d.diffPages(Q,d.pages),null,2);d.showDialog(m.container,620,460,!0,!0);m.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var m=d.getCurrentFile();null!=d.pages&&null!=m?d.spinner.spin(document.body,mxResources.get("loading"))&&m.getLatestVersion(function(u){d.spinner.stop();@@ -14036,16 +14038,16 @@ arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date"time",Date.now()-m+" ms","args",arguments);return u});null!=E?(d.resolveCrossReferences=E,E=null):(E=d.resolveCrossReferences,d.resolveCrossReferences=function(){var m=Date.now(),u=E.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=t?(d.getFileData=t,t=null):(t=d.getFileData,d.getFileData=function(){var m=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",[this],"time",Date.now()-m+" ms","args",arguments);return u});EditorUi.debug("[Performance]",null!=c?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),u);var A=m.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},u);null!=c&&m.addCheckmark(A,Editor.checkmarkImage);this.addMenuItems(m,["-","testShowConsole"],u)})))}d.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(m){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(m){q.isEnabled()&&-(m=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),m.vertex=!0,m=new EditShapeDialog(d,m,mxResources.get("editShape")+":",630,400),d.showDialog(m.container,640,480,!0,!1),m.init())})).isEnabled=y;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",m,function(u,A,B,H,T,k,v,G,I,M,P,S){d.createHtml(u,A,B,H,T,k,v,G,-I,M,P,mxUtils.bind(this,function(V,W){var X=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(V);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);+(m=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),m.vertex=!0,m=new EditShapeDialog(d,m,mxResources.get("editShape")+":",630,400),d.showDialog(m.container,640,480,!0,!1),m.init())})).isEnabled=y;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",m,function(u,A,B,H,T,k,v,G,I,M,N,S){d.createHtml(u,A,B,H,T,k,v,G,+I,M,N,mxUtils.bind(this,function(V,W){var X=new EmbedDialog(d,"\x3c!-- "+d.editor.appName+" diagram --\x3e\n"+V+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(V);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var ea=Z.document.createElement("div");ea.marginLeft="26px";ea.marginTop="26px";mxUtils.write(ea,mxResources.get("updatingDocument"));ba=Z.document.createElement("img");ba.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ba.style.marginLeft="6px";ea.appendChild(ba);Z.document.body.insertBefore(ea,Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));d.actions.put("liveImage",new Action("Live image...",function(){var m=d.getCurrentFile();null!=m&&d.getPublicUrl(m,function(u){null!=u?(u=new EmbedDialog(d,'<img src="'+(m.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+m.getId())+'"/>'),d.showDialog(u.container,450,240,!0,!0),u.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("image"),mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));-d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){var u=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/q.view.scale))+2,null,null,null,m,d.getCurrentFile(),function(A,B,H,T,k,v,G,I,M,P,S,V){var W=[];M&&W.push("tags=%7B%7D");A=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+G+";height:"+I+';" src="'+d.createLink(A,B,!0,T,k,v,"public"==P?m:null,null,W,+d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){var u=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/q.view.scale))+2,null,null,null,m,d.getCurrentFile(),function(A,B,H,T,k,v,G,I,M,N,S,V){var W=[];M&&W.push("tags=%7B%7D");A=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+G+";height:"+I+';" src="'+d.createLink(A,B,!0,T,k,v,"public"==N?m:null,null,W,null,H,S,V)+'"'+(S?' allowtransparency="true"':"")+"></iframe>");d.showDialog(A.container,450,240,!0,!0);A.init()},!0,!0)})}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var m=document.createElement("div");m.style.position="absolute";m.style.bottom="30px";m.style.textAlign="center";m.style.width="100%";m.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));m.appendChild(u);mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");mxUtils.setOpacity(u,0);window.setTimeout(function(){mxUtils.setOpacity(u,100)},300);mxEvent.addListener(u,"click",function(A){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(A)});d.getPublicUrl(d.getCurrentFile(),function(A){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",-m,A,d.getCurrentFile(),function(B,H,T,k,v,G,I,M,P,S,V,W){I=["border=0"];P&&I.push("tags=%7B%7D");B=new EmbedDialog(d,d.createLink(B,H,!0,k,v,G,"public"==S?A:null,null,I,null,T,null,W));d.showDialog(B.container,450,240,!0,!0);B.init()},null,!0)})}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showPublishLinkDialog(null,null,null,null,null,null,m,d.getCurrentFile(),function(u,A,B,H,T,k,v,G,I,M,P,S){v=[];H&&I&&v.push("tags=%7B%7D");+m,A,d.getCurrentFile(),function(B,H,T,k,v,G,I,M,N,S,V,W){I=["border=0"];N&&I.push("tags=%7B%7D");B=new EmbedDialog(d,d.createLink(B,H,!0,k,v,G,"public"==S?A:null,null,I,null,T,null,W));d.showDialog(B.container,450,240,!0,!0);B.init()},null,!0)})}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showPublishLinkDialog(null,null,null,null,null,null,m,d.getCurrentFile(),function(u,A,B,H,T,k,v,G,I,M,N,S){v=[];H&&I&&v.push("tags=%7B%7D");u=new EmbedDialog(d,d.createLink(u,A,!0,H,T,k,"public"==M?m:null,null,v,null,B,null,S));d.showDialog(u.container,450,240,!0,!0);u.init()},null,!0)})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new GoogleSitesDialog(d,m);d.showDialog(m.container,420,256,!0,!0);m.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)x=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&(x=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isHighContrast()}));x=d.actions.addAction("search",function(){if(null!=d.sidebar){var m=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!m);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!m,mxSettings.save())}});x.label=mxResources.get("searchShapes");@@ -14055,9 +14057,9 @@ d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlPam,mxResources.get("cancel"),mxResources.get("discardChanges")):m()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(m,u){d.isExportToCanvas()?(this.addMenuItems(m,["exportPng"],u),d.jpgSupported&&this.addMenuItems(m,["exportJpg"],u),d.webpSupported&&this.addMenuItems(m,["exportWebp"],u)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPng","exportJpg"],u);this.addMenuItems(m,["exportSvg","-"],u);d.isOffline()||d.printPdfExport?this.addMenuItems(m,["exportPdf"],u):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(m,["exportVsdx"],u);this.addMenuItems(m,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(m.addSeparator(u),this.addMenuItem(m,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(m,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(m.addSeparator(u),d.menus.addSubmenu("embed",m,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(m,u){function A(T){T.pickFile(function(k){d.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(k,function(v){var G="data:image/"==v.getData().substring(0,11)?H(v.getTitle()):"text/xml";/\.svg$/i.test(v.getTitle())&&-!d.editor.isDataSvg(v.getData())&&(v.setData(Editor.createSvgDataUri(v.getData())),G="image/svg+xml");B(v.getData(),G,v.getTitle())},function(v){d.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)},T==d.drive)},!0)}var B=mxUtils.bind(this,function(T,k,v){var G=q.view,I=q.getGraphBounds(),M=q.snap(Math.ceil(Math.max(0,I.x/G.scale-G.translate.x)+4*q.gridSize)),P=q.snap(Math.ceil(Math.max(0,(I.y+I.height)/G.scale-G.translate.y)+4*q.gridSize));"data:image/"==T.substring(0,11)?d.loadImage(T,-mxUtils.bind(this,function(S){var V=!0,W=mxUtils.bind(this,function(){d.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(T,k,M,P,Math.round(Z*X),Math.round(Y*X),v,function(ba){d.spinner.stop();q.setSelectionCells(ba);q.scrollCellToVisible(q.getSelectionCell())})}),V)});T.length>d.resampleThreshold?d.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):-d.importFile(T,k,M,P,0,0,v,function(S){d.spinner.stop();q.setSelectionCells(S);q.scrollCellToVisible(q.getSelectionCell())})}),H=mxUtils.bind(this,function(T){var k="text/xml";/\.png$/i.test(T)?k="image/png":/\.jpe?g$/i.test(T)?k="image/jpg":/\.gif$/i.test(T)?k="image/gif":/\.pdf$/i.test(T)&&(k="application/pdf");return k});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&+!d.editor.isDataSvg(v.getData())&&(v.setData(Editor.createSvgDataUri(v.getData())),G="image/svg+xml");B(v.getData(),G,v.getTitle())},function(v){d.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)},T==d.drive)},!0)}var B=mxUtils.bind(this,function(T,k,v){var G=q.view,I=q.getGraphBounds(),M=q.snap(Math.ceil(Math.max(0,I.x/G.scale-G.translate.x)+4*q.gridSize)),N=q.snap(Math.ceil(Math.max(0,(I.y+I.height)/G.scale-G.translate.y)+4*q.gridSize));"data:image/"==T.substring(0,11)?d.loadImage(T,+mxUtils.bind(this,function(S){var V=!0,W=mxUtils.bind(this,function(){d.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(T,k,M,N,Math.round(Z*X),Math.round(Y*X),v,function(ba){d.spinner.stop();q.setSelectionCells(ba);q.scrollCellToVisible(q.getSelectionCell())})}),V)});T.length>d.resampleThreshold?d.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):+d.importFile(T,k,M,N,0,0,v,function(S){d.spinner.stop();q.setSelectionCells(S);q.scrollCellToVisible(q.getSelectionCell())})}),H=mxUtils.bind(this,function(T){var k="text/xml";/\.png$/i.test(T)?k="image/png":/\.jpe?g$/i.test(T)?k="image/jpg":/\.gif$/i.test(T)?k="image/gif":/\.pdf$/i.test(T)&&(k="application/pdf");return k});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&m.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?m.addItem(mxResources.get("oneDrive")+"...",null,function(){A(d.oneDrive)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&m.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?m.addItem(mxResources.get("dropbox")+"...",null,function(){A(d.dropbox)},u):d.isModeEnabled(App.MODE_DROPBOX)&&m.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&m.addItem(mxResources.get("github")+"...",null,function(){A(d.gitHub)},u);d.isModeReady(App.MODE_GITLAB)&&m.addItem(mxResources.get("gitlab")+"...",null,function(){A(d.gitLab)},u);d.isModeReady(App.MODE_TRELLO)?m.addItem(mxResources.get("trello")+"...",null,function(){A(d.trello)},u):d.isModeEnabled(App.MODE_TRELLO)&&m.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&m.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&m.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||(m.addSeparator(u),m.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(d,"",mxResources.get("import"),function(k){if(null!=k&&0<k.length&&@@ -14110,9 +14112,9 @@ u);"1"!=urlParams.sketch&&this.addMenuItems(m,["-","fullscreen"],u)}})));this.puu),m.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.removePage(A)}),u),1<d.pages.length&&(d.menus.addSubmenu("movePage",m,u,mxResources.get("move")),m.addSeparator(u)),m.addSeparator(u),m.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){d.duplicatePage(A,mxResources.get("copyOf",[A.getName()]))}),u),1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||m.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(m,u){var A=d.currentPage;d.editor.graph.isLightboxView()||(m.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(H){d.handleError(H)}}),u,null,d.editor.graph.isEnabled()),m.addSeparator(u));if(null!=d.pages)for(var B=0;B<d.pages.length;B++)mxUtils.bind(this,function(H){var T=null;T=d.pages[H]!=A||d.editor.graph.isLightboxView()?m.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u):d.menus.addSubmenu("currentPage",m,u,d.getShortPageName(A));var k=d.pages[H].getId();T.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=k?" ["+k+"]":""));d.pages[H]==A&&m.addCheckmark(T,Editor.checkmarkImage)})(B)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;x=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();R=!R;d.alert(mxResources.get("restartForChangeRequired"))});-x.setToggleAction(!0);x.setSelectedCallback(function(){return R});var U="1"==urlParams.enableStoreBkp;x=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();U=!U});x.setToggleAction(!0);x.setSelectedCallback(function(){return U});var O="1"==urlParams.isGoogleFontsEnabled;x=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();O=!O;d.alert(mxResources.get("restartForChangeRequired"))});x.setToggleAction(!0);x.setSelectedCallback(function(){return O});d.actions.addAction("openDevTools",-function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var m=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(m.container,320,80,!0,!0);m.init()})}var N=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(m,u){if("simple"==Editor.currentTheme||-"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||d.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",m,u);m.addSeparator(u);null==N||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",m,u);d.menus.addSubmenu("units",+x.setToggleAction(!0);x.setSelectedCallback(function(){return R});var U="1"==urlParams.enableStoreBkp;x=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();U=!U});x.setToggleAction(!0);x.setSelectedCallback(function(){return U});var P="1"==urlParams.isGoogleFontsEnabled;x=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();P=!P;d.alert(mxResources.get("restartForChangeRequired"))});x.setToggleAction(!0);x.setSelectedCallback(function(){return P});d.actions.addAction("openDevTools",+function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var m=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(m.container,320,80,!0,!0);m.init()})}var O=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(m,u){if("simple"==Editor.currentTheme||+"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||d.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",m,u);m.addSeparator(u);null==O||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",m,u);d.menus.addSubmenu("units",m,u);d.menus.addMenuItems(m,"- copyConnect collapseExpand - tooltips animations -".split(" "),u);var A=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(m,["showRemoteCursors"],u),d.menus.addMenuItems(m,["ruler","-"],u));EditorUi.isElectronApp&&d.menus.addMenuItems(m,"- googleFonts spellCheck autoBkp drafts -".split(" "),u);this.addSubmenu("diagramLanguage",m,u);m.addSeparator(u);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(m,"configuration",u);m.addSeparator(u)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",m,u),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",m,u),m.addSeparator(u),A=this.addSubmenu("adaptiveColors",m,u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(A,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(A=this.addMenuItem(m,"mathematicalTypesetting",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(m,["googleFonts","spellCheck","autoBkp","drafts","-"],u),this.addMenuItems(m,["copyConnect","collapseExpand","-"],u),"1"!=urlParams.embed&&(A=d.getCurrentFile(),null!=@@ -14134,14 +14136,14 @@ OneDriveFile||d.menus.addMenuItems(m,["share"],u));m.addSeparator(u);null!=A&&A.u):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||(m.addSeparator(u),B=this.addMenuItem(m,"synchronize",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(m,["-","save","saveAs","-"],u),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==A||this.addMenuItems(m,["share","-"],u),null!=A&&A.isRenamable()&&this.addMenuItems(m,["rename"],u),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(m,["upload"],u):(this.addMenuItems(m,["makeCopy"],u),null!=A&&(A.constructor==OneDriveFile&&this.addMenuItems(m,["moveToFolder"],u),null!=A.getFolderUrl()&&d.menus.addMenuItems(m,["openFolder"],u)))),m.addSeparator(u),this.addSubmenu("importFrom",m,u),this.addSubmenu("exportAs",m,u),m.addSeparator(u),this.addSubmenu("embed",m,u),this.addSubmenu("publish",m,u),m.addSeparator(u),this.addSubmenu("newLibrary",m,u),this.addSubmenu("openLibraryFrom",m,u),d.isRevisionHistorySupported()&&this.addMenuItems(m,["-","revisionHistory"],u),null!=A&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(B=null!=A.getTitle()?A.getTitle():d.defaultFilename,(A.constructor==DriveFile&&null!=A.sync&&A.sync.isConnected()||!/(\.html)$/i.test(B))&&this.addMenuItems(m,["-","properties"])),this.addMenuItems(m,["-","pageSetup"],u),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["print"],u),-this.addMenuItems(m,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(m,u){function A(M){var P=encodeURIComponent(M.name)+(null==M.url?"":"@"+encodeURIComponent(M.url));if(!H[P]){for(var S=M.name,V=0;null!=G[S.toLowerCase()];)S=M.name+" ("+ ++V+")";null==v[P]&&(I.push({name:M.name,url:M.url,label:S,title:M.url}),G[S.toLowerCase()]=M,v[P]=M)}}for(var B=mxUtils.bind(this,function(M,P,S,V,W){var X=d.editor.graph,Z=this.styleChange(m,null!=V?V:M,[mxConstants.STYLE_FONTFAMILY,-"fontSource","FType"],[M,null!=P?encodeURIComponent(P):null,null],null,u,function(){X.setFont(M,P);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[M,null!=P?encodeURIComponent(P):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),-S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(M,P);this.editorUi.hideCurrentMenu();-mxEvent.consume(Y)})));Graph.addFont(M,P);Z.firstChild.nextSibling.style.fontFamily=M;W=null!=V?V:M;null!=P&&(W+=" ("+P+")");Z.setAttribute("title",W)}),H={},T=0;T<this.defaultFonts.length;T++){var k=this.defaultFonts[T];"string"===typeof k?B(k):null!=k.fontFamily&&null!=k.fontUrl&&(H[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,B(k.fontFamily,k.fontUrl))}m.addSeparator(u);var v={},G={},I=[];for(T=0;T<this.customFonts.length;T++)A(this.customFonts[T]);I.sort(function(M,P){return M.label<-P.label?-1:M.label>P.label?1:0});if(0<I.length){for(T=0;T<I.length;T++)B(I[T].name,I[T].url,!0,I[T].label);m.addSeparator(u)}m.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);m.addSeparator(u);m.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var M=this.editorUi.editor.graph,P=M.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",V=null;if(M.isEditing()){var W=-M.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){P=mxUtils.getCssFontFamily(X.fontFamily);X=M.getView().getState(M.cellEditor.getEditingCell());V=null!=X?X.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=W&&W!=M.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){V=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==P){V=null;break}W=W.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?-(V=null,S="g"):S="w")}}}else X=M.getView().getState(M.getSelectionCell()),null!=X&&(P=X.style[mxConstants.STYLE_FONTFAMILY]||P,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",V=W)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==M.cellEditor.textarea&&(Z=M.cellEditor.saveSelection());P=new FontDialog(this.editorUi,P,V,S,mxUtils.bind(this,function(Y,ba,-ea){null!=Z&&(M.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),M.isEditing())M.setFont(Y,ba);else{M.getModel().beginUpdate();try{M.stopEditing(!1),M.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),M.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),M.setCellStyles("FType",null)}finally{M.getModel().endUpdate()}}}));this.editorUi.showDialog(P.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);P.init()}),+this.addMenuItems(m,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(m,u){function A(M){var N=encodeURIComponent(M.name)+(null==M.url?"":"@"+encodeURIComponent(M.url));if(!H[N]){for(var S=M.name,V=0;null!=G[S.toLowerCase()];)S=M.name+" ("+ ++V+")";null==v[N]&&(I.push({name:M.name,url:M.url,label:S,title:M.url}),G[S.toLowerCase()]=M,v[N]=M)}}for(var B=mxUtils.bind(this,function(M,N,S,V,W){var X=d.editor.graph,Z=this.styleChange(m,null!=V?V:M,[mxConstants.STYLE_FONTFAMILY,+"fontSource","FType"],[M,null!=N?encodeURIComponent(N):null,null],null,u,function(){X.setFont(M,N);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[M,null!=N?encodeURIComponent(N):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),+S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(M,N);this.editorUi.hideCurrentMenu();+mxEvent.consume(Y)})));Graph.addFont(M,N);Z.firstChild.nextSibling.style.fontFamily=M;W=null!=V?V:M;null!=N&&(W+=" ("+N+")");Z.setAttribute("title",W)}),H={},T=0;T<this.defaultFonts.length;T++){var k=this.defaultFonts[T];"string"===typeof k?B(k):null!=k.fontFamily&&null!=k.fontUrl&&(H[encodeURIComponent(k.fontFamily)+"@"+encodeURIComponent(k.fontUrl)]=!0,B(k.fontFamily,k.fontUrl))}m.addSeparator(u);var v={},G={},I=[];for(T=0;T<this.customFonts.length;T++)A(this.customFonts[T]);I.sort(function(M,N){return M.label<+N.label?-1:M.label>N.label?1:0});if(0<I.length){for(T=0;T<I.length;T++)B(I[T].name,I[T].url,!0,I[T].label);m.addSeparator(u)}m.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),u);m.addSeparator(u);m.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var M=this.editorUi.editor.graph,N=M.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",V=null;if(M.isEditing()){var W=+M.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){N=mxUtils.getCssFontFamily(X.fontFamily);X=M.getView().getState(M.cellEditor.getEditingCell());V=null!=X?X.style.fontSource:null;for(null!=V&&(V=decodeURIComponent(V));null!=W&&W!=M.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){V=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==N){V=null;break}W=W.parentNode}null!=V&&(Graph.isGoogleFontUrl(V)?+(V=null,S="g"):S="w")}}}else X=M.getView().getState(M.getSelectionCell()),null!=X&&(N=X.style[mxConstants.STYLE_FONTFAMILY]||N,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",V=W)));null!=V&&V.substring(0,PROXY_URL.length)==PROXY_URL&&(V=decodeURIComponent(V.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==M.cellEditor.textarea&&(Z=M.cellEditor.saveSelection());N=new FontDialog(this.editorUi,N,V,S,mxUtils.bind(this,function(Y,ba,+ea){null!=Z&&(M.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),M.isEditing())M.setFont(Y,ba);else{M.getModel().beginUpdate();try{M.stopEditing(!1),M.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),M.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),M.setCellStyles("FType",null)}finally{M.getModel().endUpdate()}}}));this.editorUi.showDialog(N.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);N.init()}),u,null,!0)})))}})();function DiagramPage(b,g){this.node=b;null!=g?this.node.setAttribute("id",g):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;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)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,g,l){this.ui=b;this.page=g;this.previous=this.name=l}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,g,l){this.ui=b;this.oldIndex=g;this.newIndex=l}@@ -14218,12 +14220,12 @@ q.nextSibling,q.parentNode.removeChild(q),q=d;null!=q;){d=q.nextSibling;if(q.nodfunction(K){return this.isTreeEdge(K)}))};Graph.prototype.getIncomingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,q){return this.getTreeEdges(d,q,!1,!0,!1)};var g=EditorUi.prototype.init;EditorUi.prototype.init=function(){g.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(B){return p.isVertex(B)&&y(B)}function q(B){var H=!1;null!=B&&(H="1"==f.getCurrentCellStyle(B).treeMoving);return H}function y(B){var H=!1;null!=B&&(B=p.getParent(B),H=f.view.getState(B),H="tree"==(null!=H?H.style:f.getCellStyle(B)).containerType);return H}function x(B){var H=!1;null!=B&&(B=p.getParent(B),H=f.view.getState(B),f.view.getState(B),H=null!=(null!=H?H.style:f.getCellStyle(B)).childLayout);return H}function D(B){B=f.view.getState(B);if(null!=B){var H=f.getIncomingTreeEdges(B.cell);if(0<H.length&&(H=f.view.getState(H[0]),null!=H&&(H=H.absolutePoints,null!=H&&0<H.length&&(H=H[H.length-1],null!=H)))){if(H.y==B.y&&Math.abs(H.x-B.getCenterX())<B.width/2)return mxConstants.DIRECTION_SOUTH;if(H.y==B.y+B.height&&Math.abs(H.x-B.getCenterX())<B.width/2)return mxConstants.DIRECTION_NORTH;if(H.x>B.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function J(B,H){H=null!=H?H:!0;f.model.beginUpdate();try{var T=f.model.getParent(B),k=f.getIncomingTreeEdges(B),v=f.cloneCells([k[0],B]);f.model.setTerminal(v[0],f.model.getTerminal(k[0],-!0),!0);var G=D(B),I=T.geometry;G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?v[1].geometry.x+=H?B.geometry.width+10:-v[1].geometry.width-10:v[1].geometry.y+=H?B.geometry.height+10:-v[1].geometry.height-10;f.view.currentRoot!=T&&(v[1].geometry.x-=I.x,v[1].geometry.y-=I.y);var M=f.view.getState(B),P=f.view.scale;if(null!=M){var S=mxRectangle.fromRectangle(M);G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?S.x+=(H?B.geometry.width+10:-v[1].geometry.width-10)*P:S.y+=(H?-B.geometry.height+10:-v[1].geometry.height-10)*P;var V=f.getOutgoingTreeEdges(f.model.getTerminal(k[0],!0));if(null!=V){for(var W=G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH,X=I=k=0;X<V.length;X++){var Z=f.model.getTerminal(V[X],!1);if(G==D(Z)){var Y=f.view.getState(Z);Z!=B&&null!=Y&&(W&&H!=Y.getCenterX()<M.getCenterX()||!W&&H!=Y.getCenterY()<M.getCenterY())&&mxUtils.intersects(S,Y)&&(k=10+Math.max(k,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/P),I=10+Math.max(I,(Math.min(S.y+-S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/P))}}W?I=0:k=0;for(X=0;X<V.length;X++)if(Z=f.model.getTerminal(V[X],!1),G==D(Z)&&(Y=f.view.getState(Z),Z!=B&&null!=Y&&(W&&H!=Y.getCenterX()<M.getCenterX()||!W&&H!=Y.getCenterY()<M.getCenterY()))){var ba=[];f.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&f.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});f.moveCells(ba,(H?1:-1)*k,(H?1:-1)*I)}}}return f.addCells(v,T)}finally{f.model.endUpdate()}}function K(B){f.model.beginUpdate();-try{var H=D(B),T=f.getIncomingTreeEdges(B),k=f.cloneCells([T[0],B]);f.model.setTerminal(T[0],k[1],!1);f.model.setTerminal(k[0],k[1],!0);f.model.setTerminal(k[0],B,!1);var v=f.model.getParent(B),G=v.geometry,I=[];f.view.currentRoot!=v&&(k[1].geometry.x-=G.x,k[1].geometry.y-=G.y);f.traverse(B,!0,function(S,V){var W=null!=V&&f.isTreeEdge(V);W&&I.push(V);(null==V||W)&&I.push(S);return null==V||W});var M=B.geometry.width+40,P=B.geometry.height+40;H==mxConstants.DIRECTION_SOUTH?M=0:H==mxConstants.DIRECTION_NORTH?-(M=0,P=-P):H==mxConstants.DIRECTION_WEST?(M=-M,P=0):H==mxConstants.DIRECTION_EAST&&(P=0);f.moveCells(I,M,P);return f.addCells(k,v)}finally{f.model.endUpdate()}}function L(B,H){f.model.beginUpdate();try{var T=f.model.getParent(B),k=f.getIncomingTreeEdges(B),v=D(B);0==k.length&&(k=[f.createEdge(T,null,"",null,null,f.createCurrentEdgeStyle())],v=H);var G=f.cloneCells([k[0],B]);f.model.setTerminal(G[0],B,!0);null==f.model.getTerminal(G[0],!1)&&(f.model.setTerminal(G[0],G[1],!1),f.applyNewEdgeStyle(G[1],-[G[0]],v));k=f.getOutgoingTreeEdges(B);var I=T.geometry;H=[];f.view.currentRoot==T&&(I=new mxRectangle);for(var M=0;M<k.length;M++){var P=f.model.getTerminal(k[M],!1);null!=P&&H.push(P)}var S=f.view.getBounds(H),V=f.view.translate,W=f.view.scale;v==mxConstants.DIRECTION_SOUTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width-G[1].geometry.width)/2:(S.x+S.width)/W-V.x-I.x+10,G[1].geometry.y+=G[1].geometry.height-I.y+40):v==mxConstants.DIRECTION_NORTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width-+!0),!0);var G=D(B),I=T.geometry;G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?v[1].geometry.x+=H?B.geometry.width+10:-v[1].geometry.width-10:v[1].geometry.y+=H?B.geometry.height+10:-v[1].geometry.height-10;f.view.currentRoot!=T&&(v[1].geometry.x-=I.x,v[1].geometry.y-=I.y);var M=f.view.getState(B),N=f.view.scale;if(null!=M){var S=mxRectangle.fromRectangle(M);G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH?S.x+=(H?B.geometry.width+10:-v[1].geometry.width-10)*N:S.y+=(H?+B.geometry.height+10:-v[1].geometry.height-10)*N;var V=f.getOutgoingTreeEdges(f.model.getTerminal(k[0],!0));if(null!=V){for(var W=G==mxConstants.DIRECTION_SOUTH||G==mxConstants.DIRECTION_NORTH,X=I=k=0;X<V.length;X++){var Z=f.model.getTerminal(V[X],!1);if(G==D(Z)){var Y=f.view.getState(Z);Z!=B&&null!=Y&&(W&&H!=Y.getCenterX()<M.getCenterX()||!W&&H!=Y.getCenterY()<M.getCenterY())&&mxUtils.intersects(S,Y)&&(k=10+Math.max(k,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/N),I=10+Math.max(I,(Math.min(S.y++S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/N))}}W?I=0:k=0;for(X=0;X<V.length;X++)if(Z=f.model.getTerminal(V[X],!1),G==D(Z)&&(Y=f.view.getState(Z),Z!=B&&null!=Y&&(W&&H!=Y.getCenterX()<M.getCenterX()||!W&&H!=Y.getCenterY()<M.getCenterY()))){var ba=[];f.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&f.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});f.moveCells(ba,(H?1:-1)*k,(H?1:-1)*I)}}}return f.addCells(v,T)}finally{f.model.endUpdate()}}function K(B){f.model.beginUpdate();+try{var H=D(B),T=f.getIncomingTreeEdges(B),k=f.cloneCells([T[0],B]);f.model.setTerminal(T[0],k[1],!1);f.model.setTerminal(k[0],k[1],!0);f.model.setTerminal(k[0],B,!1);var v=f.model.getParent(B),G=v.geometry,I=[];f.view.currentRoot!=v&&(k[1].geometry.x-=G.x,k[1].geometry.y-=G.y);f.traverse(B,!0,function(S,V){var W=null!=V&&f.isTreeEdge(V);W&&I.push(V);(null==V||W)&&I.push(S);return null==V||W});var M=B.geometry.width+40,N=B.geometry.height+40;H==mxConstants.DIRECTION_SOUTH?M=0:H==mxConstants.DIRECTION_NORTH?+(M=0,N=-N):H==mxConstants.DIRECTION_WEST?(M=-M,N=0):H==mxConstants.DIRECTION_EAST&&(N=0);f.moveCells(I,M,N);return f.addCells(k,v)}finally{f.model.endUpdate()}}function L(B,H){f.model.beginUpdate();try{var T=f.model.getParent(B),k=f.getIncomingTreeEdges(B),v=D(B);0==k.length&&(k=[f.createEdge(T,null,"",null,null,f.createCurrentEdgeStyle())],v=H);var G=f.cloneCells([k[0],B]);f.model.setTerminal(G[0],B,!0);null==f.model.getTerminal(G[0],!1)&&(f.model.setTerminal(G[0],G[1],!1),f.applyNewEdgeStyle(G[1],+[G[0]],v));k=f.getOutgoingTreeEdges(B);var I=T.geometry;H=[];f.view.currentRoot==T&&(I=new mxRectangle);for(var M=0;M<k.length;M++){var N=f.model.getTerminal(k[M],!1);null!=N&&H.push(N)}var S=f.view.getBounds(H),V=f.view.translate,W=f.view.scale;v==mxConstants.DIRECTION_SOUTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width-G[1].geometry.width)/2:(S.x+S.width)/W-V.x-I.x+10,G[1].geometry.y+=G[1].geometry.height-I.y+40):v==mxConstants.DIRECTION_NORTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width-G[1].geometry.width)/2:(S.x+S.width)/W-V.x+-I.x+10,G[1].geometry.y-=G[1].geometry.height+I.y+40):(G[1].geometry.x=v==mxConstants.DIRECTION_WEST?G[1].geometry.x-(G[1].geometry.width+I.x+40):G[1].geometry.x+(G[1].geometry.width-I.x+40),G[1].geometry.y=null==S?B.geometry.y+(B.geometry.height-G[1].geometry.height)/2:(S.y+S.height)/W-V.y+-I.y+10);return f.addCells(G,T)}finally{f.model.endUpdate()}}function Q(B,H,T){B=f.getOutgoingTreeEdges(B);T=f.view.getState(T);var k=[];if(null!=T&&null!=B){for(var v=0;v<B.length;v++){var G=f.view.getState(f.model.getTerminal(B[v],!1));null!=G&&(!H&&Math.min(G.x+G.width,T.x+T.width)>=Math.max(G.x,T.x)||H&&Math.min(G.y+G.height,T.y+T.height)>=Math.max(G.y,T.y))&&k.push(G)}k.sort(function(I,M){return H?I.x+I.width-M.x-M.width:I.y+I.height-M.y-M.height})}return k}function c(B,H){var T=D(B),k=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==k&&T!=H?e.actions.get("selectParent").funct():T==H?(H=f.getOutgoingTreeEdges(B),null!=H&&0<H.length&&f.setSelectionCell(f.model.getTerminal(H[0],!1))):(T=f.getIncomingTreeEdges(B),null!=T&&0<T.length&&(k=Q(f.model.getTerminal(T[0],!0),k,B),B=f.view.getState(B),null!=B&&(B=mxUtils.indexOf(k,B),0<=B&&(B+=H==mxConstants.DIRECTION_NORTH||H==mxConstants.DIRECTION_WEST?-1:1,0<=B&&B<=k.length-1&&f.setSelectionCell(k[B].cell)))))}var e=this,f=e.editor.graph,p=f.getModel(),n=e.menus.createPopupMenu;e.menus.createPopupMenu=function(B,H,T){n.apply(this,arguments);@@ -14231,16 +14233,16 @@ if(1==f.getSelectionCount()){H=f.getSelectionCell();var k=f.getOutgoingTreeEdges1==f.getSelectionCount()){var H=f.getSelectionCell();B=mxEvent.isControlDown(B)?null:f.getOutgoingTreeEdges(H);if(null!=B&&0<B.length){H=[];for(var T=0;T<B.length;T++)H.push(f.model.getTerminal(B[T],!1));f.setSelectionCells(H)}else f.setSelectionCells(f.model.getChildren(H))}},null,null,"Alt+Shift+C");e.actions.addAction("selectDescendants",function(B){var H=f.getSelectionCell();if(f.isEnabled()&&null!=H){var T=[];mxEvent.isControlDown(B)||f.traverse(H,!0,function(k,v){var G=null!=v&&f.isTreeEdge(v);G&&mxEvent.isControlDown(B)&&T.push(v);(null==v||G)&&T.push(k);return null==v||G});if(0==T.length||1==T.length&&T[0]==H)T=f.model.getDescendants(H);f.setSelectionCells(T)}},null,null,"Alt+Shift+X");e.actions.addAction("selectParent",function(B){var H=f.getSelectionCell();f.isEnabled()&&null!=H&&(B=mxEvent.isControlDown(B)?null:f.getIncomingTreeEdges(H),null!=B&&0<B.length?f.setSelectionCell(f.model.getTerminal(B[0],!0)):f.selectParentCell())},null,null,"Alt+Shift+P");e.actions.addAction("selectSiblings",function(B){if(f.isEnabled()&&1==f.getSelectionCount()){var H=f.getSelectionCell(),T=mxEvent.isControlDown(B)?null:f.getIncomingTreeEdges(H);B=[];if(null!=T&&0<T.length&&(T=f.getOutgoingTreeEdges(f.model.getTerminal(T[0],!0)),null!=T))for(var k=0;k<T.length;k++)B.push(f.model.getTerminal(T[k],!1));0==B.length&&(B=f.model.getChildren(f.model.getParent(H)));f.setSelectionCells(B)}},null,null,"Alt+Shift+S");var t=f.removeCells;f.removeCells=function(B,H){H=null!=H?H:!0;null==B&&(B=this.getDeletableCells(this.getSelectionCells()));-H&&(B=this.getDeletableCells(this.addAllEdges(B)));for(var T=[],k=0;k<B.length;k++){var v=B[k];p.isEdge(v)&&y(v)&&(T.push(v),v=p.getTerminal(v,!1));if(d(v)){var G=[];f.traverse(v,!0,function(I,M){var P=null!=M&&f.isTreeEdge(M);P&&G.push(M);(null==M||P)&&G.push(I);return null==M||P});0<G.length&&(T=T.concat(G),v=f.getIncomingTreeEdges(B[k]),B=B.concat(v))}else null!=v&&T.push(B[k])}B=T;return t.apply(this,arguments)};e.hoverIcons.getStateAt=function(B,H,T){return d(B.cell)?null:this.graph.view.getState(this.graph.getCellAt(H,-T))};var z=f.duplicateCells;f.duplicateCells=function(B,H){B=null!=B?B:this.getSelectionCells();for(var T=B.slice(0),k=0;k<T.length;k++){var v=f.view.getState(T[k]);if(null!=v&&d(v.cell)){var G=f.getIncomingTreeEdges(v.cell);for(v=0;v<G.length;v++)mxUtils.remove(G[v],B)}}this.model.beginUpdate();try{var I=z.call(this,B,H);if(I.length==B.length)for(k=0;k<B.length;k++)if(d(B[k])){var M=f.getIncomingTreeEdges(I[k]);G=f.getIncomingTreeEdges(B[k]);if(0==M.length&&0<G.length){var P=this.cloneCell(G[0]);-this.addEdge(P,f.getDefaultParent(),this.model.getTerminal(G[0],!0),I[k])}}}finally{this.model.endUpdate()}return I};var E=f.moveCells;f.moveCells=function(B,H,T,k,v,G,I){for(var M=null,P=[],S=0;S<B.length;S++)(q(B[S])||d(B[S]))&&!x(B[S])&&this.isCellCollapsed(B[S])?P=P.concat(this.getSubtree(B[S])):P.push(B[S]);B=mxUtils.removeDuplicates(P);this.model.beginUpdate();try{P=v;var V=this.getCurrentCellStyle(v);if(null!=B&&d(v)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(S=0;S<B.length;S++)if(d(B[S])||-f.model.isEdge(B[S])&&null==f.model.getTerminal(B[S],!0)){v=f.model.getParent(B[S]);break}if(null!=P&&v!=P&&null!=this.view.getState(B[0])){var W=f.getIncomingTreeEdges(B[0]);if(0<W.length){var X=f.view.getState(f.model.getTerminal(W[0],!0));if(null!=X){var Z=f.view.getState(P);null!=Z&&(H=(Z.getCenterX()-X.getCenterX())/f.view.scale,T=(Z.getCenterY()-X.getCenterY())/f.view.scale)}}}}M=E.apply(this,arguments);if(null!=M&&null!=B&&M.length==B.length)for(S=0;S<M.length;S++)if(this.model.isEdge(M[S]))d(P)&&-0>mxUtils.indexOf(M,this.model.getTerminal(M[S],!0))&&this.model.setTerminal(M[S],P,!0);else if(d(B[S])&&(W=f.getIncomingTreeEdges(B[S]),0<W.length))if(!k)d(P)&&0>mxUtils.indexOf(B,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],P,!0);else if(0==f.getIncomingTreeEdges(M[S]).length){V=P;if(null==V||V==f.model.getParent(B[S]))V=f.model.getTerminal(W[0],!0);k=this.cloneCell(W[0]);this.addEdge(k,f.getDefaultParent(),V,M[S])}}finally{this.model.endUpdate()}return M};if(null!=e.sidebar){var C=+H&&(B=this.getDeletableCells(this.addAllEdges(B)));for(var T=[],k=0;k<B.length;k++){var v=B[k];p.isEdge(v)&&y(v)&&(T.push(v),v=p.getTerminal(v,!1));if(d(v)){var G=[];f.traverse(v,!0,function(I,M){var N=null!=M&&f.isTreeEdge(M);N&&G.push(M);(null==M||N)&&G.push(I);return null==M||N});0<G.length&&(T=T.concat(G),v=f.getIncomingTreeEdges(B[k]),B=B.concat(v))}else null!=v&&T.push(B[k])}B=T;return t.apply(this,arguments)};e.hoverIcons.getStateAt=function(B,H,T){return d(B.cell)?null:this.graph.view.getState(this.graph.getCellAt(H,+T))};var z=f.duplicateCells;f.duplicateCells=function(B,H){B=null!=B?B:this.getSelectionCells();for(var T=B.slice(0),k=0;k<T.length;k++){var v=f.view.getState(T[k]);if(null!=v&&d(v.cell)){var G=f.getIncomingTreeEdges(v.cell);for(v=0;v<G.length;v++)mxUtils.remove(G[v],B)}}this.model.beginUpdate();try{var I=z.call(this,B,H);if(I.length==B.length)for(k=0;k<B.length;k++)if(d(B[k])){var M=f.getIncomingTreeEdges(I[k]);G=f.getIncomingTreeEdges(B[k]);if(0==M.length&&0<G.length){var N=this.cloneCell(G[0]);+this.addEdge(N,f.getDefaultParent(),this.model.getTerminal(G[0],!0),I[k])}}}finally{this.model.endUpdate()}return I};var E=f.moveCells;f.moveCells=function(B,H,T,k,v,G,I){for(var M=null,N=[],S=0;S<B.length;S++)(q(B[S])||d(B[S]))&&!x(B[S])&&this.isCellCollapsed(B[S])?N=N.concat(this.getSubtree(B[S])):N.push(B[S]);B=mxUtils.removeDuplicates(N);this.model.beginUpdate();try{N=v;var V=this.getCurrentCellStyle(v);if(null!=B&&d(v)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(S=0;S<B.length;S++)if(d(B[S])||+f.model.isEdge(B[S])&&null==f.model.getTerminal(B[S],!0)){v=f.model.getParent(B[S]);break}if(null!=N&&v!=N&&null!=this.view.getState(B[0])){var W=f.getIncomingTreeEdges(B[0]);if(0<W.length){var X=f.view.getState(f.model.getTerminal(W[0],!0));if(null!=X){var Z=f.view.getState(N);null!=Z&&(H=(Z.getCenterX()-X.getCenterX())/f.view.scale,T=(Z.getCenterY()-X.getCenterY())/f.view.scale)}}}}M=E.apply(this,arguments);if(null!=M&&null!=B&&M.length==B.length)for(S=0;S<M.length;S++)if(this.model.isEdge(M[S]))d(N)&&+0>mxUtils.indexOf(M,this.model.getTerminal(M[S],!0))&&this.model.setTerminal(M[S],N,!0);else if(d(B[S])&&(W=f.getIncomingTreeEdges(B[S]),0<W.length))if(!k)d(N)&&0>mxUtils.indexOf(B,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],N,!0);else if(0==f.getIncomingTreeEdges(M[S]).length){V=N;if(null==V||V==f.model.getParent(B[S]))V=f.model.getTerminal(W[0],!0);k=this.cloneCell(W[0]);this.addEdge(k,f.getDefaultParent(),V,M[S])}}finally{this.model.endUpdate()}return M};if(null!=e.sidebar){var C=e.sidebar.dropAndConnect;e.sidebar.dropAndConnect=function(B,H,T,k){var v=f.model,G=null;v.beginUpdate();try{if(G=C.apply(this,arguments),d(B))for(var I=0;I<G.length;I++)if(v.isEdge(G[I])&&null==v.getTerminal(G[I],!0)){v.setTerminal(G[I],B,!0);var M=f.getCellGeometry(G[I]);M.points=null;null!=M.getTerminalPoint(!0)&&M.setTerminalPoint(null,!0)}}finally{v.endUpdate()}return G}}var F={67:e.actions.get("selectChildren"),88:e.actions.get("selectDescendants"),80:e.actions.get("selectParent"),83:e.actions.get("selectSiblings")},R={67:e.actions.get("copyStyle"),86:e.actions.get("pasteStyle")},U=e.onKeyDown;e.onKeyDown=function(B){try{var H=f.getSelectionCell();if(f.isEnabled()&&!f.isEditing()&&null!=H){var T=mxEvent.isAltDown(B)&&mxEvent.isShiftDown(B)?F[B.keyCode]:mxEvent.isAltDown(B)?R[B.keyCode]:null;null!=T?(T.funct(B),mxEvent.consume(B)):d(H)&&(T=null,0<f.getIncomingTreeEdges(H).length&&(9==B.which?T=mxEvent.isShiftDown(B)?K(H):L(H):13==B.which&&(T=J(H,!mxEvent.isShiftDown(B)))),null!=T&&0<T.length?(1==T.length&&f.model.isEdge(T[0])?f.setSelectionCell(f.model.getTerminal(T[0],!1)):f.setSelectionCell(T[T.length-1]),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(H)),f.startEditingAtCell(H),mxEvent.consume(B)):37==B.keyCode?(c(H,mxConstants.DIRECTION_WEST),mxEvent.consume(B)):38==B.keyCode?(c(H,mxConstants.DIRECTION_NORTH),mxEvent.consume(B)):39==B.keyCode?(c(H,mxConstants.DIRECTION_EAST),mxEvent.consume(B)):40==B.keyCode&&(c(H,mxConstants.DIRECTION_SOUTH),mxEvent.consume(B)))}}catch(k){e.handleError(k)}mxEvent.isConsumed(B)||-U.apply(this,arguments)};var O=f.connectVertex;f.connectVertex=function(B,H,T,k,v,G,I){var M=f.getIncomingTreeEdges(B);if(d(B)){var P=D(B),S=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,V=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;return P==H||0==M.length?L(B,H):S==V?K(B):J(B,H!=mxConstants.DIRECTION_NORTH&&H!=mxConstants.DIRECTION_WEST)}return O.apply(this,arguments)};f.getSubtree=function(B){var H=[B];!q(B)&&!d(B)||x(B)||f.traverse(B,!0,function(T,k){var v=null!=-k&&f.isTreeEdge(k);v&&0>mxUtils.indexOf(H,k)&&H.push(k);(null==k||v)&&0>mxUtils.indexOf(H,T)&&H.push(T);return null==k||v});return H};var N=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){N.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",+U.apply(this,arguments)};var P=f.connectVertex;f.connectVertex=function(B,H,T,k,v,G,I){var M=f.getIncomingTreeEdges(B);if(d(B)){var N=D(B),S=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST,V=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;return N==H||0==M.length?L(B,H):S==V?K(B):J(B,H!=mxConstants.DIRECTION_NORTH&&H!=mxConstants.DIRECTION_WEST)}return P.apply(this,arguments)};f.getSubtree=function(B){var H=[B];!q(B)&&!d(B)||x(B)||f.traverse(B,!0,function(T,k){var v=null!=+k&&f.isTreeEdge(k);v&&0>mxUtils.indexOf(H,k)&&H.push(k);(null==k||v)&&0>mxUtils.indexOf(H,T)&&H.push(T);return null==k||v});return H};var O=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){O.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),this.redrawMoveHandle(),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;e.hoverIcons.reset();mxEvent.consume(B)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var m=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){m.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){u.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=B?"":"none")};var A=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(B,H){A.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=@@ -14285,39 +14287,39 @@ mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fa){fa.preventDefault()}));mxEvent.addListener(ca,"click",function(fa){"disabled"!=ca.getAttribute("disabled")&&X(fa);mxEvent.consume(fa)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),E.addListener("enabledChanged",W),W());return ca}function f(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=z.statusContainer?C.insertBefore(Z,z.statusContainer):C.appendChild(Z);return Z}function p(){for(var W=C.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}F=C.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>d;var Z=null;W||(Z=c("diagram"));X=W?c("diagram",null,-Editor.menuImage):null;null!=X&&(Z=X);f([Z,e(mxResources.get("shapes"),z.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),z.actions.get("image"),W?Editor.shapesImage:null),e(mxResources.get("format"),z.actions.get("format").funct,null,mxResources.get("format")+" ("+z.actions.get("format").shortcut+")",z.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=c("insert",!0,W?N:null);f([X,e(mxResources.get("delete"),z.actions.get("delete").funct,null,mxResources.get("delete"),-z.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);E.isEnabled()||X.classList.add("mxDisabled");411<=d&&(f([I,M],60),520<=d&&f([P,640<=d?e("",H.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",H,Editor.zoomInImage):null,640<=d?e("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}Q.apply(this,arguments);var n=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=n&&(n.classList.add("geSimple"),+Editor.menuImage):null;null!=X&&(Z=X);f([Z,e(mxResources.get("shapes"),z.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),z.actions.get("image"),W?Editor.shapesImage:null),e(mxResources.get("format"),z.actions.get("format").funct,null,mxResources.get("format")+" ("+z.actions.get("format").shortcut+")",z.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=c("insert",!0,W?O:null);f([X,e(mxResources.get("delete"),z.actions.get("delete").funct,null,mxResources.get("delete"),+z.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);E.isEnabled()||X.classList.add("mxDisabled");411<=d&&(f([I,M],60),520<=d&&f([N,640<=d?e("",H.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",H,Editor.zoomInImage):null,640<=d?e("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}Q.apply(this,arguments);var n=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=n&&(n.classList.add("geSimple"),n.classList.add("geMinimal"));n=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var t=document.createElement("div");t.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";t.style.bottom=n?"32px":"0px";this.sidebar=this.createSidebar(t);if(1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=d&&(b(this,!0),this.formatWindow.window.setVisible(!0));var z=this,E=z.editor.graph;z.toolbar=this.createToolbar(z.createDiv("geToolbar"));z.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.className="geMenubarContainer";var F=null,R=new Menubar(z,C);z.statusContainer=z.createStatusContainer();z.statusContainer.style.position="relative";z.statusContainer.style.maxWidth="";z.statusContainer.style.cursor=-"default";var U=z.hideCurrentMenu;z.hideCurrentMenu=function(){U.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var O=z.descriptorChanged;z.descriptorChanged=function(){O.apply(this,arguments);var W=z.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);C.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else C.removeAttribute("title")};+"default";var U=z.hideCurrentMenu;z.hideCurrentMenu=function(){U.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var P=z.descriptorChanged;z.descriptorChanged=function(){P.apply(this,arguments);var W=z.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);C.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else C.removeAttribute("title")};z.setStatusText(z.editor.getStatus());C.appendChild(z.statusContainer);z.buttonContainer=document.createElement("div");z.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";C.appendChild(z.buttonContainer);z.menubarContainer=z.buttonContainer;z.tabContainer=document.createElement("div");z.tabContainer.className="geTabContainer geTabItem";z.tabContainer.style.cssText=-"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";n=z.diagramContainer.parentNode;t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";z.diagramContainer.style.top="47px";var N=Editor.addBoxImage;if(null!=z.hoverIcons){var m=z.hoverIcons.update;z.hoverIcons.update=function(){E.freehand.isDrawing()||m.apply(this,arguments)}}if(null!=E.freehand){var u=E.freehand.createStyle;E.freehand.createStyle=+"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";n=z.diagramContainer.parentNode;t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";z.diagramContainer.style.top="47px";var O=Editor.addBoxImage;if(null!=z.hoverIcons){var m=z.hoverIcons.update;z.hoverIcons.update=function(){E.freehand.isDrawing()||m.apply(this,arguments)}}if(null!=E.freehand){var u=E.freehand.createStyle;E.freehand.createStyle=function(W){return u.apply(this,arguments)+"sketch=0;"}}z.editor.addListener("statusChanged",mxUtils.bind(this,function(){z.setStatusText(z.editor.getStatus())}));z.setStatusText(z.editor.getStatus());var A=z.menus.get("viewZoom");if(null!=A){var B=function(W){if(mxEvent.isAltDown(W))z.hideCurrentMenu(),z.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))z.hideCurrentMenu(),z.actions.get("smartFit").funct(),mxEvent.consume(W)},-H=z.actions.get("zoomIn"),T=z.actions.get("zoomOut"),k=z.actions.get("resetView"),v=z.actions.get("undo"),G=z.actions.get("redo"),I=e("",v.funct,null,mxResources.get("undo")+" ("+v.shortcut+")",v,Editor.undoImage),M=e("",G.funct,null,mxResources.get("redo")+" ("+G.shortcut+")",G,Editor.redoImage),P=e("",B,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);C.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";+H=z.actions.get("zoomIn"),T=z.actions.get("zoomOut"),k=z.actions.get("resetView"),v=z.actions.get("undo"),G=z.actions.get("redo"),I=e("",v.funct,null,mxResources.get("undo")+" ("+v.shortcut+")",v,Editor.undoImage),M=e("",G.funct,null,mxResources.get("redo")+" ("+G.shortcut+")",G,Editor.redoImage),N=e("",B,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);C.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";var S=R.addMenu("100%",A.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.className="geTabItem";S.style.height=z.tabContainerHeight+"px";S.style.position="absolute";S.style.display="0"!=urlParams.pages?"flex":"none";S.style.alignItems="center";S.style.justifyContent="center";S.style.paddingRight="11px";S.style.whiteSpace="nowrap";S.style.overflow="hidden";S.style.fontSize="11px";S.style.width="51px";S.style.right="0px";S.style.bottom="0px";S.style.boxSizing="content-box";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px top 15px";S.style.backgroundRepeat="no-repeat";S.style.backgroundSize="10px";S.style.zIndex="1";t.appendChild(S);(function(W){mxEvent.addListener(W,"click",B);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*z.editor.graph.view.scale*(null!=ba?ba:1))+"%")});z.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);z.editor.addListener("resetGraphView",X);z.editor.addListener("pageSelected",X);z.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(S);var V=z.setGraphEnabled;z.setGraphEnabled=function(){V.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}t.appendChild(C);t.appendChild(z.diagramContainer);n.appendChild(t);z.updateTabContainer();!EditorUi.windowed&&1E3<=d&&b(this,!0);t.appendChild(z.tabContainer);p();z.addListener("lockedChanged",p);mxEvent.addListener(window,"resize",function(){p();null!=z.sidebarWindow&&z.sidebarWindow.window.fit();null!=z.formatWindow&&z.formatWindow.window.fit();null!=z.actions.outlineWindow&&z.actions.outlineWindow.window.fit();null!=z.actions.layersWindow&&z.actions.layersWindow.window.fit();null!=z.menus.chatWindow&&z.menus.chatWindow.window.fit();null!=z.menus.tagsWindow&&z.menus.tagsWindow.window.fit();null!=z.menus.findWindow&&z.menus.findWindow.window.fit();null!=z.menus.findReplaceWindow&&z.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var g=EditorUi.initTheme;EditorUi.initTheme=function(){g.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,q,y,x){var D=q.y,J=q.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=q){var Q=this,c=new mxCellState,e=this.graph.getView().scale,f=Math.max(2,this.getGuideTolerance()/2);c.x=d.x+J;c.y=d.y+D;c.width=d.width;c.height=d.height;for(var p=[],n=[],t=0;t<this.states.length;t++){var z=this.states[t];z instanceof mxCellState&&(x||!this.graph.isCellSelected(z.cell))&&((c.x>=z.x&&c.x<=z.x+z.width||z.x>=c.x&&z.x<=c.x+c.width)&&(c.y>-z.y+z.height+4||c.y+c.height+4<z.y)?p.push(z):(c.y>=z.y&&c.y<=z.y+z.height||z.y>=c.y&&z.y<=c.y+c.height)&&(c.x>z.x+z.width+4||c.x+c.width+4<z.x)&&n.push(z))}var E=0,C=0,F=z=0,R=0,U=0,O=0,N=0,m=5*e;if(1<p.length){p.push(c);p.sort(function(H,T){return H.y-T.y});var u=!1;t=c==p[0];e=c==p[p.length-1];if(!t&&!e)for(t=1;t<p.length-1;t++)if(c==p[t]){e=p[t-1];t=p[t+1];z=C=F=(t.y-e.y-e.height-c.height)/2;break}for(t=0;t<p.length-1;t++){e=p[t];var A=p[t+1],B=c==e||c==A;A=A.y-e.y-e.height;u|=c==e;if(0==C&&0==-E)C=A,E=1;else if(Math.abs(C-A)<=(B||1==t&&u?f:0))E+=1;else if(1<E&&u){p=p.slice(0,t+1);break}else if(3<=p.length-t&&!u)E=0,z=C=0!=F?F:0,p.splice(0,0==t?1:t),t=-1;else break;0!=z||B||(C=z=A)}3==p.length&&p[1]==c&&(z=0)}if(1<n.length){n.push(c);n.sort(function(H,T){return H.x-T.x});u=!1;t=c==n[0];e=c==n[n.length-1];if(!t&&!e)for(t=1;t<n.length-1;t++)if(c==n[t]){e=n[t-1];t=n[t+1];O=U=N=(t.x-e.x-e.width-c.width)/2;break}for(t=0;t<n.length-1;t++){e=n[t];A=n[t+1];B=c==e||c==A;A=A.x-e.x-e.width;u|=c==e;-if(0==U&&0==R)U=A,R=1;else if(Math.abs(U-A)<=(B||1==t&&u?f:0))R+=1;else if(1<R&&u){n=n.slice(0,t+1);break}else if(3<=n.length-t&&!u)R=0,O=U=0!=N?N:0,n.splice(0,0==t?1:t),t=-1;else break;0!=O||B||(U=O=A)}3==n.length&&n[1]==c&&(O=0)}f=function(H,T,k,v){var G=[];if(v){v=m;var I=0}else v=0,I=m;G.push(new mxPoint(H.x-v,H.y-I));G.push(new mxPoint(H.x+v,H.y+I));G.push(H);G.push(T);G.push(new mxPoint(T.x-v,T.y-I));G.push(new mxPoint(T.x+v,T.y+I));if(null!=k)return k.points=G,k;H=new mxPolyline(G,mxConstants.GUIDE_COLOR,-mxConstants.GUIDE_STROKEWIDTH);H.dialect=mxConstants.DIALECT_SVG;H.pointerEvents=!1;H.init(Q.graph.getView().getOverlayPane());return H};U=function(H,T){if(H&&null!=Q.guidesArrHor)for(H=0;H<Q.guidesArrHor.length;H++)Q.guidesArrHor[H].node.style.visibility="hidden";if(T&&null!=Q.guidesArrVer)for(H=0;H<Q.guidesArrVer.length;H++)Q.guidesArrVer[H].node.style.visibility="hidden"};if(1<R&&R==n.length-1){R=[];N=Q.guidesArrHor;K=[];J=0;t=n[0]==c?1:0;u=n[t].y+n[t].height;if(0<O)for(t=0;t<n.length-1;t++)e=-n[t],A=n[t+1],c==e?(J=A.x-e.width-O,K.push(new mxPoint(J+e.width+m,u)),K.push(new mxPoint(A.x-m,u))):c==A?(K.push(new mxPoint(e.x+e.width+m,u)),J=e.x+e.width+O,K.push(new mxPoint(J-m,u))):(K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(A.x-m,u)));else e=n[0],t=n[2],J=e.x+e.width+(t.x-e.x-e.width-c.width)/2,K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(J-m,u)),K.push(new mxPoint(J+c.width+m,u)),K.push(new mxPoint(t.x-m,u));for(t=0;t<K.length;t+=2)n=K[t],O=K[t+1],n=f(n,O,null!=N?-N[t/2]:null),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=K.length/2;null!=N&&t<N.length;t++)N[t].destroy();Q.guidesArrHor=R;J-=d.x;K=!0}else U(!0);if(1<E&&E==p.length-1){R=[];N=Q.guidesArrVer;L=[];D=0;t=p[0]==c?1:0;E=p[t].x+p[t].width;if(0<z)for(t=0;t<p.length-1;t++)e=p[t],A=p[t+1],c==e?(D=A.y-e.height-z,L.push(new mxPoint(E,D+e.height+m)),L.push(new mxPoint(E,A.y-m))):c==A?(L.push(new mxPoint(E,e.y+e.height+m)),D=e.y+e.height+z,L.push(new mxPoint(E,D-m))):(L.push(new mxPoint(E,e.y+-e.height+m)),L.push(new mxPoint(E,A.y-m)));else e=p[0],t=p[2],D=e.y+e.height+(t.y-e.y-e.height-c.height)/2,L.push(new mxPoint(E,e.y+e.height+m)),L.push(new mxPoint(E,D-m)),L.push(new mxPoint(E,D+c.height+m)),L.push(new mxPoint(E,t.y-m));for(t=0;t<L.length;t+=2)n=L[t],O=L[t+1],n=f(n,O,null!=N?N[t/2]:null,!0),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=L.length/2;null!=N&&t<N.length;t++)N[t].destroy();Q.guidesArrVer=R;D-=d.y;L=!0}else U(!1,!0)}if(K||L)return c=new mxPoint(J,D),p=b.call(this,+z.y+z.height+4||c.y+c.height+4<z.y)?p.push(z):(c.y>=z.y&&c.y<=z.y+z.height||z.y>=c.y&&z.y<=c.y+c.height)&&(c.x>z.x+z.width+4||c.x+c.width+4<z.x)&&n.push(z))}var E=0,C=0,F=z=0,R=0,U=0,P=0,O=0,m=5*e;if(1<p.length){p.push(c);p.sort(function(H,T){return H.y-T.y});var u=!1;t=c==p[0];e=c==p[p.length-1];if(!t&&!e)for(t=1;t<p.length-1;t++)if(c==p[t]){e=p[t-1];t=p[t+1];z=C=F=(t.y-e.y-e.height-c.height)/2;break}for(t=0;t<p.length-1;t++){e=p[t];var A=p[t+1],B=c==e||c==A;A=A.y-e.y-e.height;u|=c==e;if(0==C&&0==+E)C=A,E=1;else if(Math.abs(C-A)<=(B||1==t&&u?f:0))E+=1;else if(1<E&&u){p=p.slice(0,t+1);break}else if(3<=p.length-t&&!u)E=0,z=C=0!=F?F:0,p.splice(0,0==t?1:t),t=-1;else break;0!=z||B||(C=z=A)}3==p.length&&p[1]==c&&(z=0)}if(1<n.length){n.push(c);n.sort(function(H,T){return H.x-T.x});u=!1;t=c==n[0];e=c==n[n.length-1];if(!t&&!e)for(t=1;t<n.length-1;t++)if(c==n[t]){e=n[t-1];t=n[t+1];P=U=O=(t.x-e.x-e.width-c.width)/2;break}for(t=0;t<n.length-1;t++){e=n[t];A=n[t+1];B=c==e||c==A;A=A.x-e.x-e.width;u|=c==e;+if(0==U&&0==R)U=A,R=1;else if(Math.abs(U-A)<=(B||1==t&&u?f:0))R+=1;else if(1<R&&u){n=n.slice(0,t+1);break}else if(3<=n.length-t&&!u)R=0,P=U=0!=O?O:0,n.splice(0,0==t?1:t),t=-1;else break;0!=P||B||(U=P=A)}3==n.length&&n[1]==c&&(P=0)}f=function(H,T,k,v){var G=[];if(v){v=m;var I=0}else v=0,I=m;G.push(new mxPoint(H.x-v,H.y-I));G.push(new mxPoint(H.x+v,H.y+I));G.push(H);G.push(T);G.push(new mxPoint(T.x-v,T.y-I));G.push(new mxPoint(T.x+v,T.y+I));if(null!=k)return k.points=G,k;H=new mxPolyline(G,mxConstants.GUIDE_COLOR,+mxConstants.GUIDE_STROKEWIDTH);H.dialect=mxConstants.DIALECT_SVG;H.pointerEvents=!1;H.init(Q.graph.getView().getOverlayPane());return H};U=function(H,T){if(H&&null!=Q.guidesArrHor)for(H=0;H<Q.guidesArrHor.length;H++)Q.guidesArrHor[H].node.style.visibility="hidden";if(T&&null!=Q.guidesArrVer)for(H=0;H<Q.guidesArrVer.length;H++)Q.guidesArrVer[H].node.style.visibility="hidden"};if(1<R&&R==n.length-1){R=[];O=Q.guidesArrHor;K=[];J=0;t=n[0]==c?1:0;u=n[t].y+n[t].height;if(0<P)for(t=0;t<n.length-1;t++)e=+n[t],A=n[t+1],c==e?(J=A.x-e.width-P,K.push(new mxPoint(J+e.width+m,u)),K.push(new mxPoint(A.x-m,u))):c==A?(K.push(new mxPoint(e.x+e.width+m,u)),J=e.x+e.width+P,K.push(new mxPoint(J-m,u))):(K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(A.x-m,u)));else e=n[0],t=n[2],J=e.x+e.width+(t.x-e.x-e.width-c.width)/2,K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(J-m,u)),K.push(new mxPoint(J+c.width+m,u)),K.push(new mxPoint(t.x-m,u));for(t=0;t<K.length;t+=2)n=K[t],P=K[t+1],n=f(n,P,null!=O?+O[t/2]:null),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=K.length/2;null!=O&&t<O.length;t++)O[t].destroy();Q.guidesArrHor=R;J-=d.x;K=!0}else U(!0);if(1<E&&E==p.length-1){R=[];O=Q.guidesArrVer;L=[];D=0;t=p[0]==c?1:0;E=p[t].x+p[t].width;if(0<z)for(t=0;t<p.length-1;t++)e=p[t],A=p[t+1],c==e?(D=A.y-e.height-z,L.push(new mxPoint(E,D+e.height+m)),L.push(new mxPoint(E,A.y-m))):c==A?(L.push(new mxPoint(E,e.y+e.height+m)),D=e.y+e.height+z,L.push(new mxPoint(E,D-m))):(L.push(new mxPoint(E,e.y++e.height+m)),L.push(new mxPoint(E,A.y-m)));else e=p[0],t=p[2],D=e.y+e.height+(t.y-e.y-e.height-c.height)/2,L.push(new mxPoint(E,e.y+e.height+m)),L.push(new mxPoint(E,D-m)),L.push(new mxPoint(E,D+c.height+m)),L.push(new mxPoint(E,t.y-m));for(t=0;t<L.length;t+=2)n=L[t],P=L[t+1],n=f(n,P,null!=O?O[t/2]:null,!0),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=L.length/2;null!=O&&t<O.length;t++)O[t].destroy();Q.guidesArrVer=R;D-=d.y;L=!0}else U(!1,!0)}if(K||L)return c=new mxPoint(J,D),p=b.call(this,d,c,y,x),K&&!L?c.y=p.y:L&&!K&&(c.x=p.x),p.y!=c.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),p.x!=c.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),c;U(!0,!0);return b.apply(this,arguments)};var g=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){g.call(this,d);var q=this.guidesArrVer,y=this.guidesArrHor;if(null!=q)for(var x=0;x<q.length;x++)q[x].node.style.visibility=d?"visible":"hidden";if(null!=-y)for(x=0;x<y.length;x++)y[x].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var y=0;y<d.length;y++)d[y].destroy();this.guidesArrVer=null}if(null!=q){for(y=0;y<q.length;y++)q[y].destroy();this.guidesArrHor=null}}})();function mxRuler(b,g,l,d){function q(){var E=b.diagramContainer;Q.style.top=E.offsetTop-J+"px";Q.style.left=E.offsetLeft-J+"px";Q.style.width=(l?0:E.offsetWidth)+J+"px";Q.style.height=(l?E.offsetHeight:0)+J+"px"}function y(E,C,F){if(null!=x)return E;var R;return function(){var U=this,O=arguments,N=F&&!R;clearTimeout(R);R=setTimeout(function(){R=null;F||E.apply(U,O)},C);N&&E.apply(U,O)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,+y)for(x=0;x<y.length;x++)y[x].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var y=0;y<d.length;y++)d[y].destroy();this.guidesArrVer=null}if(null!=q){for(y=0;y<q.length;y++)q[y].destroy();this.guidesArrHor=null}}})();function mxRuler(b,g,l,d){function q(){var E=b.diagramContainer;Q.style.top=E.offsetTop-J+"px";Q.style.left=E.offsetLeft-J+"px";Q.style.width=(l?0:E.offsetWidth)+J+"px";Q.style.height=(l?E.offsetHeight:0)+J+"px"}function y(E,C,F){if(null!=x)return E;var R;return function(){var U=this,P=arguments,O=F&&!R;clearTimeout(R);R=setTimeout(function(){R=null;F||E.apply(U,P)},C);O&&E.apply(U,P)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,D=window.cancelAnimationFrame||window.mozCancelAnimationFrame,J=this.RULER_THICKNESS,K=this;this.unit=g;var L=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.className="geRuler";Q.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){L=Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};Q.style[l?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;Q.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(Q);mxEvent.disableContextMenu(Q);this.editorUiRefresh=b.refresh;b.refresh=function(E){K.editorUiRefresh.apply(b,arguments);q()};q();var c=document.createElement("canvas");c.width=Q.offsetWidth;c.height=Q.offsetHeight;Q.style.overflow="hidden";c.style.position="relative";Q.appendChild(c);var e=c.getContext("2d");this.ui=b;var f=b.editor.graph;this.graph=f;this.container=Q;this.canvas=c;var p=function(E,C,F,R,U){E=Math.round(E);C=Math.round(C);F=Math.round(F);R=Math.round(R);e.beginPath();e.moveTo(E+.5,C+.5);e.lineTo(F+.5,R+.5);e.stroke();U&&(l?(e.save(),e.translate(E,C),e.rotate(-Math.PI/2),e.fillText(U,0,0),-e.restore()):e.fillText(U,E,C))},n=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=L.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var E=f.view.scale,C=f.view.getBackgroundPageBounds(),F=f.view.translate,R=f.pageVisible;F=R?J+(l?C.y-f.container.scrollTop:C.x-f.container.scrollLeft):J+(l?F.y*E-f.container.scrollTop:F.x*E-f.container.scrollLeft);var U=0;R&&(U=f.getPageLayout(),U=l?U.y*f.pageFormat.height:U.x*f.pageFormat.width);var O;switch(K.unit){case mxConstants.POINTS:var N=-O=10;var m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:O=10;N=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:O=20;N=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:O=.5>=E||4<=E?8:16,N=mxConstants.PIXELS_PER_INCH/O,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var u=N;2<=E?u=N/(2*Math.floor(E/2)):.5>=E&&(u=N*Math.floor(1/E/2)*(K.unit==mxConstants.MILLIMETERS?2:1));N=null;C=R?Math.min(F+(l?C.height:C.width),l?-c.height:c.width):l?c.height:c.width;if(R)if(e.fillStyle=L.outBkgClr,l){var A=F-J;0<A&&e.fillRect(0,J,J,A);C<c.height&&e.fillRect(0,C,J,c.height)}else A=F-J,0<A&&e.fillRect(J,0,A,J),C<c.width&&e.fillRect(C,0,c.width,J);e.fillStyle=L.fontClr;for(R=R?F:F%(u*E);R<=C;R+=u*E)if(A=Math.round((R-F)/E/u),!(R<J||A==N)){N=A;var B=null;0==A%O&&(B=K.formatText(U+A*u)+"");l?p(J-m[Math.abs(A)%O],R,J,R,B):p(R,J-m[Math.abs(A)%O],R,J,B)}e.lineWidth=1;p(l?0:J,l?J:0,J,J);e.fillStyle=L.cornerClr;e.fillRect(0,0,J,J)},+e.restore()):e.fillText(U,E,C))},n=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=L.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var E=f.view.scale,C=f.view.getBackgroundPageBounds(),F=f.view.translate,R=f.pageVisible;F=R?J+(l?C.y-f.container.scrollTop:C.x-f.container.scrollLeft):J+(l?F.y*E-f.container.scrollTop:F.x*E-f.container.scrollLeft);var U=0;R&&(U=f.getPageLayout(),U=l?U.y*f.pageFormat.height:U.x*f.pageFormat.width);var P;switch(K.unit){case mxConstants.POINTS:var O=+P=10;var m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:P=10;O=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:P=20;O=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:P=.5>=E||4<=E?8:16,O=mxConstants.PIXELS_PER_INCH/P,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var u=O;2<=E?u=O/(2*Math.floor(E/2)):.5>=E&&(u=O*Math.floor(1/E/2)*(K.unit==mxConstants.MILLIMETERS?2:1));O=null;C=R?Math.min(F+(l?C.height:C.width),l?+c.height:c.width):l?c.height:c.width;if(R)if(e.fillStyle=L.outBkgClr,l){var A=F-J;0<A&&e.fillRect(0,J,J,A);C<c.height&&e.fillRect(0,C,J,c.height)}else A=F-J,0<A&&e.fillRect(J,0,A,J),C<c.width&&e.fillRect(C,0,c.width,J);e.fillStyle=L.fontClr;for(R=R?F:F%(u*E);R<=C;R+=u*E)if(A=Math.round((R-F)/E/u),!(R<J||A==O)){O=A;var B=null;0==A%P&&(B=K.formatText(U+A*u)+"");l?p(J-m[Math.abs(A)%P],R,J,R,B):p(R,J-m[Math.abs(A)%P],R,J,B)}e.lineWidth=1;p(l?0:J,l?J:0,J,J);e.fillStyle=L.cornerClr;e.fillRect(0,0,J,J)},t=-1,z=function(){null!=x?(null!=D&&D(t),t=x(n)):n()};this.drawRuler=z;this.sizeListener=g=y(function(){var E=f.container;l?(E=E.offsetHeight+J,c.height!=E&&(c.height=E,Q.style.height=E+"px",z())):(E=E.offsetWidth+J,c.width!=E&&(c.width=E,Q.style.width=E+"px",z()))},10);this.pageListener=function(){z()};this.scrollListener=d=y(function(){var E=l?f.container.scrollTop:f.container.scrollLeft;K.lastScroll!=E&&(K.lastScroll=E,z())},10);this.unitListener=function(E,C){K.setUnit(C.getProperty("unit"))};f.addListener(mxEvent.SIZE,g);f.container.addEventListener("scroll",d);f.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(E){L=E;Q.style.background=L.bkgClr;n()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(E,C,F,R){if(l&&4<E.height||!l&&4<E.width){if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,-K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(v){}var U=K.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=L.guideClr;e.setLineDash([2]);if(l){var O=E.y+U.y+J-this.graph.container.scrollTop;var N=0;var m=O+E.height/2;var u=J/2;var A=O+E.height;var B=0;var H=e.getImageData(N,O-1,J,3);p(N,O,J,O);O--;var T=e.getImageData(u,m-1,J,3);p(u,m,J,m);m--;var k=e.getImageData(B,-A-1,J,3);p(B,A,J,A);A--}else O=0,N=E.x+U.x+J-this.graph.container.scrollLeft,m=J/2,u=N+E.width/2,A=0,B=N+E.width,H=e.getImageData(N-1,O,3,J),p(N,O,N,J),N--,T=e.getImageData(u-1,m,3,J),p(u,m,u,J),u--,k=e.getImageData(B-1,A,3,J),p(B,A,B,J),B--;if(null==K.guidePart||K.guidePart.x1!=N||K.guidePart.y1!=O)K.guidePart={imgData1:H,x1:N,y1:O,imgData2:T,x2:u,y2:m,imgData3:k,x3:B,y3:A}}catch(v){}}else U=K.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=+K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(v){}var U=K.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=L.guideClr;e.setLineDash([2]);if(l){var P=E.y+U.y+J-this.graph.container.scrollTop;var O=0;var m=P+E.height/2;var u=J/2;var A=P+E.height;var B=0;var H=e.getImageData(O,P-1,J,3);p(O,P,J,P);P--;var T=e.getImageData(u,m-1,J,3);p(u,m,J,m);m--;var k=e.getImageData(B,+A-1,J,3);p(B,A,J,A);A--}else P=0,O=E.x+U.x+J-this.graph.container.scrollLeft,m=J/2,u=O+E.width/2,A=0,B=O+E.width,H=e.getImageData(O-1,P,3,J),p(O,P,O,J),O--,T=e.getImageData(u-1,m,3,J),p(u,m,u,J),u--,k=e.getImageData(B-1,A,3,J),p(B,A,B,J),B--;if(null==K.guidePart||K.guidePart.x1!=O||K.guidePart.y1!=P)K.guidePart={imgData1:H,x1:O,y1:P,imgData2:T,x2:u,y2:m,imgData3:k,x3:B,y3:A}}catch(v){}}else U=K.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var E=K.origGuideDestroy.apply(this,arguments);if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3),K.guidePart=null}catch(C){}return E}}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(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};@@ -14328,13 +14330,13 @@ mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setfunction(m){L=m};this.setAutoScroll=function(m){Q=m};this.setOpenFill=function(m){c=m};this.setStopClickEnabled=function(m){p=m};this.setSelectInserted=function(m){n=m};this.setSmoothing=function(m){l=m};this.getSmoothing=function(){return l};this.setPerfectFreehandMode=function(m){E=m};this.isPerfectFreehandMode=function(){return E};this.setBrushSize=function(m){z.size=m};this.getBrushSize=function(){return z.size};var C=function(m){f=m;b.getRubberband().setEnabled(!m);b.graphHandler.setSelectEnabled(!m);b.graphHandler.setMoveEnabled(!m);b.container.style.cursor=m?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return f};var F=mxUtils.bind(this,function(m){if(d){var u=D.length,A=p&&0<x.length&&null!=D&&2>D.length;A||x.push.apply(x,D);D=[];x.push(null);q.push(d);d=null;(A||L)&&this.stopDrawing();L&&(!A||2<=u)&&this.startDrawing();mxEvent.consume(m)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(m){var u=null!=t?t:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=u||m||(u=b.shapeForegroundColor);return u};this.setStrokeColor=function(m){t=m};this.createStyle=function(m){var u=";fillColor=none;";E&&(u=";lineShape=1;");u+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+m+u};this.stopDrawing=function(){if(0<q.length){if(E){for(var m=[],u=0;u<x.length;u++)null!=x[u]&&m.push([x[u].x,-x[u].y]);m=PerfectFreehand.getStroke(m,z);x=[];for(u=0;u<m.length;u++)x.push({x:m[u][0],y:m[u][1]});x.push(null)}m=x[0].x;var A=x[0].x,B=x[0].y,H=x[0].y;for(u=1;u<x.length;u++)null!=x[u]&&(m=Math.max(m,x[u].x),A=Math.min(A,x[u].x),B=Math.max(B,x[u].y),H=Math.min(H,x[u].y));m-=A;B-=H;if(0<m&&0<B){var T=100/m,k=100/B;x.map(function(P){if(null==P)return P;P.x=(P.x-A)*T;P.y=(P.y-H)*k;return P});var v='<shape strokewidth="inherit"><foreground>',G=0;for(u=0;u<x.length;u++){var I=x[u];if(null==I){I=!1;G=+x[u].y]);m=PerfectFreehand.getStroke(m,z);x=[];for(u=0;u<m.length;u++)x.push({x:m[u][0],y:m[u][1]});x.push(null)}m=x[0].x;var A=x[0].x,B=x[0].y,H=x[0].y;for(u=1;u<x.length;u++)null!=x[u]&&(m=Math.max(m,x[u].x),A=Math.min(A,x[u].x),B=Math.max(B,x[u].y),H=Math.min(H,x[u].y));m-=A;B-=H;if(0<m&&0<B){var T=100/m,k=100/B;x.map(function(N){if(null==N)return N;N.x=(N.x-A)*T;N.y=(N.y-H)*k;return N});var v='<shape strokewidth="inherit"><foreground>',G=0;for(u=0;u<x.length;u++){var I=x[u];if(null==I){I=!1;G=x[G];var M=x[u-1];!J&&K&&(I=G.x-M.x,M=G.y-M.y,I=Math.sqrt(I*I+M*M)<=b.tolerance);if(J||I)v+='<line x="'+G.x.toFixed(2)+'" y="'+G.y.toFixed(2)+'"/>';v+="</path>"+(c||J||I?"<fillstroke/>":"<stroke/>");G=u+1}else v=u==G?v+('<path><move x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>'):v+('<line x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=this.createStyle("stencil("+Graph.compress(v)+")");v=b.view.scale;G=b.view.translate;u=new mxCell("",new mxGeometry(A/v-G.x,H/v-G.y,m/v,B/v),u);u.vertex=1;b.model.beginUpdate();try{u=b.addCell(u),b.fireEvent(new mxEventObject("cellsInserted","cells",[u])),b.fireEvent(new mxEventObject("freehandInserted","cell",u))}finally{b.model.endUpdate()}n&&b.setSelectionCells([u])}}for(u=0;u<q.length;u++)q[u].parentNode.removeChild(q[u]);d=null;q=[];x=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(m,u){m=u.getProperty("eventName");u=u.getProperty("event");m==mxEvent.MOUSE_MOVE&&f&&(null!=u.sourceState&&u.sourceState.setCursor("crosshair"),u.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(m,u){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(m=u.getEvent(),f&&!mxEvent.isPopupTrigger(m)&&!mxEvent.isMiddleMouseButton(m)&&!mxEvent.isMultiTouchEvent(m))){var A=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);A=Math.max(1,A*b.view.scale);var B=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");-d.setAttribute("fill",E?B:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",B);d.setAttribute("stroke-width",A);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(B=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",B=B.split(" ").map(function(H){return parseFloat(H)*A}).join(" "),d.setAttribute("stroke-dasharray",B));e=[];m=U(m);O(m);y="M"+m.x+" "+m.y;x.push(m);D=[];d.setAttribute("d",E?PerfectFreehand.getSvgPathFromStroke([[m.x,m.y]],z):y);g.appendChild(d);u.consume()}}),-mouseMove:mxUtils.bind(this,function(m,u){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){m=u.getEvent();m=U(m);O(m);var A=N(0);if(A)if(x.push(A),E){var B=[];for(A=0;A<x.length;A++)B.push([x[A].x,x[A].y]);D=[];for(var H=2;H<e.length;H+=2)A=N(H),B.push([A.x,A.y]),D.push(A);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(B,z))}else{y+=" L"+A.x+" "+A.y;B="";D=[];for(H=2;H<e.length;H+=2)A=N(H),B+=" L"+A.x+" "+A.y,D.push(A);d.setAttribute("d",y+B)}Q&&(A=b.view.translate,b.scrollRectToVisible((new mxRectangle(m.x--A.x,m.y-A.y)).grow(20)));u.consume()}}),mouseUp:mxUtils.bind(this,function(m,u){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(F(u.getEvent()),u.consume())})});var U=function(m){return mxUtils.convertPoint(b.container,mxEvent.getClientX(m),mxEvent.getClientY(m))},O=function(m){for(e.push(m);e.length>l;)e.shift()},N=function(m){var u=e.length;if(1===u%2||u>=l){var A=0,B=0,H,T=0;for(H=m;H<u;H++)T++,m=e[H],A+=m.x,B+=m.y;return{x:A/T,y:B/T}}return null}}}+d.setAttribute("fill",E?B:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",B);d.setAttribute("stroke-width",A);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(B=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",B=B.split(" ").map(function(H){return parseFloat(H)*A}).join(" "),d.setAttribute("stroke-dasharray",B));e=[];m=U(m);P(m);y="M"+m.x+" "+m.y;x.push(m);D=[];d.setAttribute("d",E?PerfectFreehand.getSvgPathFromStroke([[m.x,m.y]],z):y);g.appendChild(d);u.consume()}}),+mouseMove:mxUtils.bind(this,function(m,u){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){m=u.getEvent();m=U(m);P(m);var A=O(0);if(A)if(x.push(A),E){var B=[];for(A=0;A<x.length;A++)B.push([x[A].x,x[A].y]);D=[];for(var H=2;H<e.length;H+=2)A=O(H),B.push([A.x,A.y]),D.push(A);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(B,z))}else{y+=" L"+A.x+" "+A.y;B="";D=[];for(H=2;H<e.length;H+=2)A=O(H),B+=" L"+A.x+" "+A.y,D.push(A);d.setAttribute("d",y+B)}Q&&(A=b.view.translate,b.scrollRectToVisible((new mxRectangle(m.x-+A.x,m.y-A.y)).grow(20)));u.consume()}}),mouseUp:mxUtils.bind(this,function(m,u){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(F(u.getEvent()),u.consume())})});var U=function(m){return mxUtils.convertPoint(b.container,mxEvent.getClientX(m),mxEvent.getClientY(m))},P=function(m){for(e.push(m);e.length>l;)e.shift()},O=function(m){var u=e.length;if(1===u%2||u>=l){var A=0,B=0,H,T=0;for(H=m;H<u;H++)T++,m=e[H],A+=m.x,B+=m.y;return{x:A/T,y:B/T}}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;DrawioUser=function(b,g,l,d,q){this.id=b;this.email=g;this.displayName=l;this.pictureUrl=d;this.locale=q};DrawioComment=function(b,g,l,d,q,y,x){this.file=b;this.id=g;this.content=l;this.modifiedDate=d;this.createdDate=q;this.isResolved=y;this.user=x;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,g,l,d,q){g()};DrawioComment.prototype.editComment=function(b,g,l){g()};DrawioComment.prototype.deleteComment=function(b,g){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];LucidImporter={};diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.jsindex 183b16593..21d03258e 100644--- a/src/main/webapp/js/viewer-static.min.js+++ b/src/main/webapp/js/viewer-static.min.js@@ -30,7 +30,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"26.0.13",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.15",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),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||@@ -1970,12 +1970,12 @@ Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFiEditor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,u){e.undoableEditHappened(u.getProperty("edit"))};var g=mxUtils.bind(this,function(m,u){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,u){m=u.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);u=!1;if(0<m.length){for(var p=[],B=0;B<m.length;B++)null!=b.view.getState(m[B])&&(p.push(m[B]),u||(b.scrollCellToVisible(m[B]),u=!0));b.setSelectionCells(p)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};-function Dialog(b,e,g,m,u,p,B,H,S,G,O){this.editorUi=b;var R=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&+function Dialog(b,e,g,m,u,p,B,H,S,G,P){this.editorUi=b;var R=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=z+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var F=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=F.x+"px";this.bg.style.top=F.y+"px";t+=F.x;C+=F.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",C+=b.embedViewport.y,t+=b.embedViewport.x);u&&document.body.appendChild(this.bg);var N=b.createDiv(S?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),-p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!O)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||-null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=J.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);J=Math.max(1,Math.round((J.width-g-l)/2));var ea=Math.max(1,Math.round((z-m-b.footerHeight)/3));ea=this.getPosition(J,ea,g,m);J=ea.x;ea=ea.y;var da=mxUtils.getDocumentScrollOrigin(document);J+=da.x;-ea+=da.y;Editor.inlineFullscreen||null==b.embedViewport||(ea+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=ea+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ea+14+"px",this.dialogImg.style.left=J+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=+p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!P)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||+null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=J.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);J=Math.max(1,Math.round((J.width-g-l)/2));var da=Math.max(1,Math.round((z-m-b.footerHeight)/3));da=this.getPosition(J,da,g,m);J=da.x;da=da.y;var ea=mxUtils.getDocumentScrollOrigin(document);J+=ea.x;+da+=ea.y;Editor.inlineFullscreen||null==b.embedViewport||(da+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=da+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=J+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=B;this.container=N;b.editor.fireEvent(new mxEventObject("showDialog"))}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";@@ -1983,44 +1983,44 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&this.container.parentNode.removeChild(this.container)};-var ErrorDialog=function(b,e,g,m,u,p,B,H,S,G,O){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);R.appendChild(c)}e=-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=O&&O()}),G.className="geBtn",g.appendChild(G));+var ErrorDialog=function(b,e,g,m,u,p,B,H,S,G,P){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);R.appendChild(c)}e=+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=P&&P()}),G.className="geBtn",g.appendChild(G));var f=mxUtils.button(m,function(){S&&b.hideDialog();null!=u&&u()});f.className="geBtn";g.appendChild(f);null!=B&&(m=mxUtils.button(B,function(){S&&b.hideDialog();null!=H&&H()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){f.focus()};R.appendChild(g);this.container=R},PrintDialog=function(b,e,g){this.create(b,e,g)};-PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(R.value)/100;isNaN(t)&&(t=1,R.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(O.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):+PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(R.value)/100;isNaN(t)&&(t=1,R.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(P.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):l=!0;l=PrintDialog.createPrintPreview(g,C,z,0,F,N,l);l.open();f&&PrintDialog.printPreview(l)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(B);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));H.appendChild(S);mxEvent.addListener(S,"click",function(f){B.checked=!B.checked;G.checked=!B.checked;mxEvent.consume(f)});mxEvent.addListener(B,"change",function(){G.checked=!B.checked});p.appendChild(H);u.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(G);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,-"click",function(f){G.checked=!G.checked;B.checked=!G.checked;mxEvent.consume(f)});p.appendChild(H);var O=document.createElement("input");O.setAttribute("value","1");O.setAttribute("type","number");O.setAttribute("min","1");O.setAttribute("size","4");O.setAttribute("disabled","disabled");O.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(O);mxUtils.write(H," "+mxResources.get("pages")+" (max)");p.appendChild(H);u.appendChild(p);mxEvent.addListener(G,"change",-function(){G.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";H.appendChild(R);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;+"click",function(f){G.checked=!G.checked;B.checked=!G.checked;mxEvent.consume(f)});p.appendChild(H);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(P);mxUtils.write(H," "+mxResources.get("pages")+" (max)");p.appendChild(H);u.appendChild(p);mxEvent.addListener(G,"change",+function(){G.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";H.appendChild(R);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&H.appendChild(S);if(PrintDialog.previewEnabled){var c=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});c.className="geBtn";H.appendChild(c)}c=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});c.className="geBtn gePrimaryBtn";H.appendChild(c);b.editor.cancelFirst||H.appendChild(S);p.appendChild(H);u.appendChild(p);m.appendChild(u);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};PrintDialog.createPrintPreview=function(b,e,g,m,u,p,B){e=new mxPrintPreview(b,e,g,m,u,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";e.backgroundColor=B;var H=e.isTextLabel;e.isTextLabel=function(G){return"geHint"==!G.className&&H.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(G){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};PrintDialog.previewEnabled=!0;-var PageSetupDialog=function(b){function e(){var t=R;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(O.style.backgroundImage="url("+t.src+")",O.style.display="inline-block"):(O.style.backgroundImage="",O.style.display="none");O.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(O.style.backgroundColor=c,O.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");+var PageSetupDialog=function(b){function e(){var t=R;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(P.style.backgroundImage="url("+t.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(P.style.backgroundColor=c,P.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");p.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",g.pageFormat);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");p.appendChild(B);B=document.createElement("td");B.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=g.getGridSize();B.appendChild(S);mxEvent.addListener(S,"change",function(){var t=parseInt(S.value);S.value=Math.max(1,isNaN(t)?g.getGridSize():t)});p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");-p.appendChild(B);B=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var O=document.createElement("div");O.style.display="inline-block";O.style.verticalAlign="middle";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="contain";O.style.border="1px solid lightGray";O.style.borderRadius="4px";O.style.marginRight="14px";O.style.height="32px";-O.style.width="64px";O.style.cursor="pointer";O.style.padding="4px";var R=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),R=z,f=N);c=F;e()},R,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(O,"click",l);e();B.appendChild(O);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");+p.appendChild(B);B=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";+P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var R=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),R=z,f=N);c=F;e()},R,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(P,"click",l);e();B.appendChild(P);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");G=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});G.className="geBtn";b.editor.cancelFirst&&B.appendChild(G);l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(S.value);isNaN(t)||g.gridSize===t||g.setGridSize(t);t=new ChangePageSetup(b,c,R,H.get());t.ignoreColor=g.background==c;t.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=R?R.src:null);null!=f&&(t.shadowVisible=f);g.pageFormat.width==t.previousFormat.width&&g.pageFormat.height==t.previousFormat.height&&t.ignoreColor&&t.ignoreImage&&t.shadowVisible==g.shadowVisible||g.model.execute(t)});l.className="geBtn gePrimaryBtn";B.appendChild(l);b.editor.cancelFirst||B.appendChild(G);p.appendChild(B);u.appendChild(p);m.appendChild(u);this.container=m};PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var u=document.createElement("input");u.setAttribute("name",e);u.setAttribute("type","radio");u.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","landscape");var B=document.createElement("select");B.style.marginBottom="4px";B.style.borderRadius="4px";B.style.borderWidth="1px";B.style.borderStyle="solid";B.style.boxSizing="border-box";B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));-H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var O=document.createElement("input");O.setAttribute("size","7");O.setAttribute("title",mxResources.get("width"));O.style.textAlign="right";G.appendChild(O);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);+H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";G.appendChild(P);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);var c=document.createElement("select");c.style.marginLeft="4px";c.style.maxWidth="78px";c.style.width="78px";for(var f=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],l=0;l<f.length;l++){var t=document.createElement("option");t.setAttribute("value",f[l].unit);mxUtils.write(t,f[l].label);c.appendChild(t)}c.value=Editor.pageSizeUnit;G.appendChild(c);H.style.display="none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var J=C[K];null!=J.format&&("a4"==J.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==J.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==J.format.width&&g.height==J.format.height?(B.value=J.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==J.format.height&&g.height==J.format.width&&(B.value=J.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?-(O.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(O.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",-H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(O.value);if(isNaN(K)||0>=K)O.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(O.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});-mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(O,"blur",N);mxEvent.addListener(O,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){O.value=Editor.toUnit(Editor.fromUnit(O.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,-Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:O,heightInput:R}};+(P.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(P.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",+H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});+mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",N);mxEvent.addListener(P,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,+Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:P,heightInput:R}};PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};-var FilenameDialog=function(b,e,g,m,u,p,B,H,S,G,O){S=null!=S?S:!0;var R=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";+var FilenameDialog=function(b,e,g,m,u,p,B,H,S,G,P){S=null!=S?S:!0;var R=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";l.style.textOverflow="ellipsis";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.fontSize="10pt";l.style.padding="2px 0";l.setAttribute("title",u||mxResources.get("filename"));mxUtils.write(l,(u||mxResources.get("filename"))+":");f.appendChild(l);c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",e||"");t.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==p||p(t.value))S&&b.hideDialog(),m(t.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=-u||null==B)if(null!=O?Editor.selectFilename(t):(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var C=c.parentNode;if(null!=C){var F=null;mxEvent.addListener(C,"dragleave",function(N){null!=F&&(F.style.backgroundColor="",F=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=t,F.style.backgroundColor=+u||null==B)if(null!=P?Editor.selectFilename(t):(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var C=c.parentNode;if(null!=C){var F=null;mxEvent.addListener(C,"dragleave",function(N){null!=F&&(F.style.backgroundColor="",F=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=t,F.style.backgroundColor="#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(N){null!=F&&(F.style.backgroundColor="",F=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(t.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),z.click());N.stopPropagation();N.preventDefault()}))}}};f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.gap="4px";f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);-null==u&&null!=B||null==O||null==b.editor.diagramFileTypes||(f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.textOverflow="ellipsis",f.style.justifyContent="flex-end",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("type")+":"),c.appendChild(f),f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.whiteSpace="nowrap",c.appendChild(f),e=FilenameDialog.createFileTypes(b,t,b.editor.diagramFileTypes),-e.style.width="100%",f.appendChild(e));null!=B&&c.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=O?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});f.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));+null==u&&null!=B||null==P||null==b.editor.diagramFileTypes||(f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.textOverflow="ellipsis",f.style.justifyContent="flex-end",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("type")+":"),c.appendChild(f),f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.whiteSpace="nowrap",c.appendChild(f),e=FilenameDialog.createFileTypes(b,t,b.editor.diagramFileTypes),+e.style.width="100%",f.appendChild(e));null!=B&&c.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});f.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));b.editor.cancelFirst&&row.appendChild(f);mxEvent.addListener(t,"keypress",function(C){13==C.keyCode&&z.click()});row.appendChild(z);b.editor.cancelFirst||row.appendChild(f);c.appendChild(row);R.appendChild(c);this.container=R};FilenameDialog.filenameHelpLink=null;FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var u=document.createElement("option");u.setAttribute("value",b);mxUtils.write(u,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(u)}mxEvent.addListener(m,"change",function(p){p=g[m.value].extension;var B=e.value.lastIndexOf(".drawio.");B=0<B?B:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<B?e.value.substring(0,B+1)+p:e.value+"."+p;"createEvent"indocument?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var B=0,H=0;H<g.length;H++){var S=g[H].extension,G=null;"drawio"!=S&&(G=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=G&&p.substring(p.length-G.length-1)=="."+G){B=H;break}}m.value=B};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};@@ -2028,37 +2028,37 @@ var WrapperWindow=function(b,e,g,m,u,p,B){var H=b.createSidebarContainer();B(H);(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=B.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(H),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(B.container),S.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){B.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(G)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(G))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=H,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};-mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var O=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=O&&this.gridColor!=O.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(O=G.background);if(G.isGridEnabled()||G.gridVisible){l=+mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var P=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(P=G.background);if(G.isGridEnabled()||G.gridVisible){l=10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=S%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*-this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=O,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=-"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,"1"==urlParams.transparent?G.container.style.background="transparent":!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=O:(B.style.backgroundColor=G.diagramBackgroundColor,-G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],O=1;O<this.gridSteps;O++){var R=O*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'++this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=P,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=+"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,"1"==urlParams.transparent?G.container.style.background="transparent":!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=P:(B.style.backgroundColor=G.diagramBackgroundColor,+G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],P=1;P<this.gridSteps;P++){var R=P*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;-mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,O=this.view.translate,R=-this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;S=f.height;var l=new mxRectangle(G*O.x,G*O.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=-0;J<=K;J++){var ea=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(J+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(J+1)*l.height))]:[new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(F))];null!=N[J]?(N[J].points=ea,N[J].redraw()):(ea=new mxPolyline(ea,this.pageBreakColor),ea.dialect=this.dialect,ea.isDashed=this.pageBreakDashed,ea.pointerEvents=!1,ea.init(this.view.backgroundPane),ea.redraw(),N[J]=ea)}for(J=-K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var O=this.graph.getCellGeometry(H[G]);if(null!=O&&O.relative)return!1}}return e.apply(this,arguments)};var g=+mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,P=this.view.translate,R=+this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;S=f.height;var l=new mxRectangle(G*P.x,G*P.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=+0;J<=K;J++){var da=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(J+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(J+1)*l.height))]:[new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(F))];null!=N[J]?(N[J].points=da,N[J].redraw()):(da=new mxPolyline(da,this.pageBreakColor),da.dialect=this.dialect,da.isDashed=this.pageBreakDashed,da.pointerEvents=!1,da.init(this.view.backgroundPane),da.redraw(),N[J]=da)}for(J=+K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var P=this.graph.getCellGeometry(H[G]);if(null!=P&&P.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){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(),H=0<B.width?B.x/-this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,O=this.graph.pageScale,R=G.width*O;G=G.height*O;O=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+O*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-O)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,-H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,O,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=-mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var G=this.graph.model.getParent(B);if(H){var O=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);O=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=O&&O.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(O=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))O=G,this.graph.isTable(O)||(O=this.graph.model.getParent(O)),-O=!this.graph.selectionCellsHandler.isHandled(O)||this.graph.isCellSelected(O)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return O};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),O=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);-O=O||R;if(R||!O&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var W=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,ma=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ha.x+ba.x)*ma,(ha.y+ba.y)*ma,ba.width*ma,ba.height*ma))}return W};u.useCssTransforms&&+this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,P=this.graph.pageScale,R=G.width*P;G=G.height*P;P=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+P*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-P)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,+H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,P,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=+mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var G=this.graph.model.getParent(B);if(H){var P=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);P=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=P&&P.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(P=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))P=G,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),+P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),P=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);+P=P||R;if(R||!P&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var W=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,la=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ha.x+ba.x)*la,(ha.y+ba.y)*la,ba.width*la,ba.height*la))}return W};u.useCssTransforms&&(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(W,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(W){for(var ba=W.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(W.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(W){try{u.getModel().isEdge(W)?-S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(W,!1),ha=[],ma=[],Y;for(Y in ba)ha.push(ba[Y]),ma.push(Y);u.getModel().isEdge(W)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ha,"cells",[W],"force",!0));u.getModel().isEdge(W)?S=u.pasteEdgeStyle=!0:H=!0}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=+S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(W,!1),ha=[],la=[],Y;for(Y in ba)ha.push(ba[Y]),la.push(Y);u.getModel().isEdge(W)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ha,"cells",[W],"force",!0));u.getModel().isEdge(W)?S=u.pasteEdgeStyle=!0:H=!0}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(W,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(W,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(W){null==W&&(W=window.event);return u.isEditing()||null!=W&&this.isSelectionAllowed(W)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var W=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{W=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return W}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(W){if(null!=W){var ba=mxEvent.getSource(W);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(W)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||-9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var O=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();O.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,+9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var P=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(W){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(W)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(W)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(W,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(W){16==W.which?this.shiftDown=!0:32!=W.which||u.isEditing()?mxEvent.isConsumed(W)||27!=W.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(W)!=u.container||mxEvent.consume(W))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(W){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(W){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(W.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(W.getEvent()))&&(!mxEvent.isControlDown(W.getEvent())&&mxEvent.isRightMouseButton(W.getEvent())||mxEvent.isMiddleMouseButton(W.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(W){return f.apply(this,arguments)||13==W.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W)||mxClient.IS_SF&&mxEvent.isShiftDown(W))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var W=this.toolbar.container.firstChild,ba=[];null!=W;){var ha=W.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,W)&&(W.parentNode.removeChild(W),ba.push(W));-W=ha}W=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var ma=0;ma<F.length;ma++)this.toolbar.container.appendChild(F[ma]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=W;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();+W=ha}W=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var la=0;la<F.length;la++)this.toolbar.container.appendChild(F[la]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=W;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));W=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var J=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(W,ba){try{J.apply(this,-arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(W){}var ea=u.fireMouseEvent;u.fireMouseEvent=function(W,ba,ha){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};var da=u.foldCells;u.foldCells=function(W,ba,ha,ma,Y){try{da.apply(this,arguments)}catch(la){m.handleError(la)}};u.popupMenuHandler.autoExpand=+arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(W){}var da=u.fireMouseEvent;u.fireMouseEvent=function(W,ba,ha){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(la){m.handleError(la)}};var ea=u.foldCells;u.foldCells=function(W,ba,ha,la,Y){try{ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};u.popupMenuHandler.autoExpand=!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(W,ba,ha){this.menus.createPopupMenu(W,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(W){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(W,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(W,ba){W=ba.getProperty("force");(this.updateDefaultStyle||W)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(ba=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||@@ -2077,28 +2077,28 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"arguments);g.updateActionStates()};b.showLinkDialog=mxUtils.bind(g,g.showLinkDialog);b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,u=0;u<e.length;u++){var p=b.getCurrentCellStyle(e[u]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[u],e,m),m=!1)}this.updateSelectionStateForTableCells(g);return g};EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,S=1,G=1,O=0,R=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;O<e.length-1;){var c=e[++O];null==R||R!=c||null!=H&&S!=H||(H=S,S=0,G++,m=g.getParent(R),R=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);-if(c==g.getChildAt(m,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}O==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,S=1,G=1,P=0,R=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;P<e.length-1;){var c=e[++P];null==R||R!=c||null!=H&&S!=H||(H=S,S=0,G++,m=g.getParent(R),R=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);+if(c==g.getChildAt(m,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}P==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,u=null,p=mxUtils.bind(this,function(H){u.clear()&&(m=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(H):this.handleError(H))}),B=window.setTimeout(p,null!=b?b:this.timeout);u={clear:function(){window.clearTimeout(B);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(u)}),p);return u};EditorUi.prototype.tryAndHandle=function(b,e){try{b()}catch(g){null!=e?e(g):this.handleError(g)}};-EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<u.length;S++)try{var G=H[u[S]];if(mxUtils.isLightDarkColor(G)){var O=mxUtils.getLightDarkColor(G);m.setCellStyles(u[S],O.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&-"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){O=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,O.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};+EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<u.length;S++)try{var G=H[u[S]];if(mxUtils.isLightDarkColor(G)){var P=mxUtils.getLightDarkColor(G);m.setCellStyles(u[S],P.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&+"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){P=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,P.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};EditorUi.prototype.updateSelectionStateForCell=function(b,e,g,m){g=this.editor.graph;b.cells.push(e);if(g.getModel().isVertex(e)){b.connections=0<g.model.getEdgeCount(e);b.unlocked=b.unlocked&&!g.isCellLocked(e);b.resizable=b.resizable&&g.isCellResizable(e);b.rotatable=b.rotatable&&g.isCellRotatable(e);b.movable=b.movable&&g.isCellMovable(e)&&!g.isTableRow(e)&&!g.isTableCell(e);b.swimlane=b.swimlane||g.isSwimlane(e);b.table=b.table||g.isTable(e);b.cell=b.cell||g.isTableCell(e);b.row=b.row||g.isTableRow(e);b.vertices.push(e);var u=g.getCellGeometry(e);if(null!=u&&(0<u.width?null==b.width?b.width=u.width:b.width!=u.width&&(b.width=""):b.containsLabel=!0,0<u.height?null==b.height?b.height=u.height:b.height!=u.height&&(b.height=""):b.containsLabel=!0,!u.relative||null!=u.offset)){var p=u.relative?u.offset.x:u.x;u=u.relative?u.offset.y:u.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=u:b.y!=u&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=!1);p=g.view.getState(e);null!=p&&(b.html=b.html&&g.isHtmlLabel(e),b.autoSize=b.autoSize||g.isAutoSizeState(p),b.glass=b.glass&&g.isGlassState(p),b.rounded=b.rounded&&g.isRoundedState(p),b.lineJumps=b.lineJumps&&g.isLineJumpState(p),b.image=b.image||g.isImageState(p),b.shadow=b.shadow&&g.isShadowState(p),b.fill=b.fill&&g.isFillState(p),b.gradient=b.fill&&g.isGradientState(p),b.stroke=b.stroke&&g.isStrokeState(p),e=mxUtils.getValue(p.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==e,g.mergeStyle(p.style,b.style,m))};EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,G){"mouseDown"==G.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(O.x,O.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",-g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,O){var R=O.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?B.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(S.cell);c=b.getCellGeometry(t);for(O.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=-t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(O.getGraphX(),O.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,R,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var O=-G.getProperty("arrow"),R=G.getProperty("direction"),c=G.getProperty("event");O=O.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+O.x-f.x;f=b.container.scrollTop+O.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,R,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},-function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),R,!0);null!=z&&(this.centerShapePicker(z,O,l,f,R),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H)}))}};+b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",+g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,P){var R=P.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?B.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(S.cell);c=b.getCellGeometry(t);for(P.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=+t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.getGraphX(),P.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,R,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var P=+G.getProperty("arrow"),R=G.getProperty("direction"),c=G.getProperty("event");P=P.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+P.x-f.x;f=b.container.scrollTop+P.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,R,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},+function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),R,!0);null!=z&&(this.centerShapePicker(z,P,l,f,R),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H)}))}};EditorUi.prototype.centerShapePicker=function(b,e,g,m,u){if(u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();u==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,m-=p.height+6):u==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,m+=e.height+6):u==mxConstants.DIRECTION_WEST?(g-=p.width+6,m-=p.height/2-10):u==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=p.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};EditorUi.prototype.showShapePicker=function(b,e,g,m,u,p,B,H,S){var G=null;this.editor.graph.freehand.isDrawing()||(H=H||null==g,G=this.createShapePicker(b,e,g,m,u,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,H),p,B,H,S),null!=G&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=G));return G};-EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,S,G,O){O=null!=O?O:!0;var R=this.editor.graph,c=null;S=null!=S?S:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(R.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-z),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;R=this.editor.graph;c=document.createElement("div");+EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,S,G,P){P=null!=P?P:!0;var R=this.editor.graph,c=null;S=null!=S?S:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(R.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-z),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;R=this.editor.graph;c=document.createElement("div");u=R.view.getState(g);var l=null==g||null!=u&&R.isTransparentState(u)?null:R.copyStyle(g);u=6>B.length?35*B.length:140;c.className="geToolbarContainer geSidebarContainer geShapePicker";c.setAttribute("title",mxResources.get("sidebarTooltip"));c.style.left=Math.round(b)+"px";c.style.top=Math.round(e)+"px";c.style.width=u+"px";mxClient.IS_POINTER&&(c.style.touchAction="none");H||mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");R.container.appendChild(c);u=mxUtils.bind(this,function(t){var z=document.createElement("a");z.className="geToolbarButton";z.style.display="inline-block";z.style.position="relative";z.style.overflow="hidden";z.style.cursor="pointer";z.style.width="30px";z.style.height="30px";z.style.padding="1px";c.appendChild(z);null!=l&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(l,[t]):this.sidebar.graph.pasteCellStyles([t],R.currentVertexStyle,R.currentEdgeStyle);var C=t.geometry;R.model.isEdge(t)&&(C=C.getTerminalPoint(!1),C=new mxRectangle(0,0,C.x,C.y));null!=C&&-z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&R.isSelectionEmpty()){var N=R.cloneCell(t);if(null!=m)m(N);else{var K=S([N]);R.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);R.model.beginUpdate();try{R.addCell(N),R.model.isVertex(N)&&R.isAutoSizeCell(N)&&R.updateCellSize(N)}finally{R.model.endUpdate()}R.setSelectionCell(N);R.scrollCellToVisible(N);O&&+z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&R.isSelectionEmpty()){var N=R.cloneCell(t);if(null!=m)m(N);else{var K=S([N]);R.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);R.model.beginUpdate();try{R.addCell(N),R.model.isVertex(N)&&R.isAutoSizeCell(N)&&R.updateCellSize(N)}finally{R.model.endUpdate()}R.setSelectionCell(N);R.scrollCellToVisible(N);P&&R.startEditing(N);null!=f.hoverIcons&&f.hoverIcons.update(R.view.getState(N))}}else N=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(t,N);null!=p&&p(F);mxEvent.consume(F)}),25,25,null,null,g))});for(G=0;G<(H?Math.min(B.length,4):B.length);G++)u(B[G]);B=c.offsetTop+c.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<B&&(c.style.top=Math.max(R.container.scrollTop+22,e-B)+"px");B=c.offsetLeft+c.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<B&&(c.style.left=Math.max(R.container.scrollLeft+22,b-B)+"px")}return c};EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,u=mxUtils.bind(this,function(p,B,H,S){return m.createVertex(null,null,S||"",0,0,B||120,H||60,p,!1)});e=mxUtils.bind(this,function(p,B,H){p=new mxCell(H||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=B?B:0),!1);p.geometry.points=null!=B?[new mxPoint(p.geometry.width/2,B)]:[];p.geometry.relative=!0;p.edge=@@ -2117,47 +2117,47 @@ e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:b==mxConstants.Ae?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),g=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(e.isEnabled())};-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},S=p.createCellLookup(B),G=p.cloneCells(B,null,H),O=new mxGraphModel,R=O.getChildAt(O.getRoot(),-0),c=0;c<G.length;c++){O.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!O.isEdge(B[c])&&null==S[mxObjectIdentity.get(O.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},S=p.createCellLookup(B),G=p.cloneCells(B,null,H),P=new mxGraphModel,R=P.getChildAt(P.getRoot(),+0),c=0;c<G.length;c++){P.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!P.isEdge(B[c])&&null==S[mxObjectIdentity.get(P.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=g.apply(this,arguments);b.updatePasteActionStates();return B};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,B){u.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;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 P=this.graph.getPageLayout(),U=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*U.width),this.scale*(this.translate.y+P.y*U.height),this.scale*P.width*U.width,-this.scale*P.height*U.height)};b.getPreferredPageSize=function(P,U,X){P=this.getPageLayout();U=this.getPageSize();return new mxRectangle(0,0,P.width*U.width,P.height*U.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,U,X,aa){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,-wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;P=P?Math.max(.3,Math.min(U||1,Ea/wa.width)):qa;U=(Ea-P*wa.width)/2/P;var ra=0==this.lightboxVerticalDivider?0:(za-P*wa.height)/this.lightboxVerticalDivider/P;pa&&(U=Math.max(U,0),ra=Math.max(ra,-0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(P,Math.floor(U-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*P/qa,b.container.scrollLeft=Ba*P/qa;else if(0!=X||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+X/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,-"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var O=this.graph.getPageLayout(),T=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+O.x*T.width),this.scale*(this.translate.y+O.y*T.height),this.scale*O.width*T.width,+this.scale*O.height*T.height)};b.getPreferredPageSize=function(O,T,X){O=this.getPageLayout();T=this.getPageSize();return new mxRectangle(0,0,O.width*T.width,O.height*T.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(O,T,X,aa){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,+wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;O=O?Math.max(.3,Math.min(T||1,Ea/wa.width)):qa;T=(Ea-O*wa.width)/2/O;var ra=0==this.lightboxVerticalDivider?0:(za-O*wa.height)/this.lightboxVerticalDivider/O;pa&&(T=Math.max(T,0),ra=Math.max(ra,+0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(O,Math.floor(T-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*O/qa,b.container.scrollLeft=Ba*O/qa;else if(0!=X||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+X/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(O){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(O){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=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 p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(P,U,X){B++;-var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=X&&aa.setAttribute("title",X);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",U);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(P){window.location.href=-H;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var O=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,P+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());-S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());O.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";O.style.paddingLeft="4px";O.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(O.style.display="",S.style.display="",G.style.display="inline-block"):-(O.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){var U=new mxPopupMenu(f.funct);U.div.className+=" geMenubarMenu";U.smartSeparators=!0;U.showDisabled=!0;U.autoExpand=!0;U.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(U,arguments);U.destroy()});var X=mxUtils.getOffset(G);U.popup(X.x,X.y+G.offsetHeight,null,P);mxEvent.addListener(U.div,-"mouseleave",mxUtils.bind(this,function(){U.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?-(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),-600)}),P||200)}),C=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var U=F.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=-U.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));U=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-U.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var J=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(P){null!=-J?window.location.href=J:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=-document.body))&&p(mxUtils.bind(this,function(P){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),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(P){mxEvent.isTouchEvent(P)||-(mxEvent.isShiftDown(P)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?z():C(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||C(30)}));var ea=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,U){this.startX=U.getGraphX();this.startY=U.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,U){},mouseUp:function(P,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ea&&Math.abs(this.scrollTop-b.container.scrollTop)<-ea&&Math.abs(this.startX-U.getGraphX())<ea&&Math.abs(this.startY-U.getGraphY())<ea&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ca=new mxPoint,W=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;W=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,-!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ca,1);var U=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(U.x!=this.translate.x||U.y!=this.translate.y)this.invalidate(),this.translate.x=U.x,this.translate.y=U.y}U=b.getPagePadding();var X=b.getPageSize();P=U.x-(this.x0||0)*X.width;U=U.y-(this.y0||0)*X.height;if(this.translate.x!=P||this.translate.y!=U)this.invalidate(),this.translate.x=P,this.translate.y=U}da.apply(this,arguments)};-if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var P=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var U=this.getPageLayout(),X=this.getDefaultTranslate(U),aa=this.view.translate.x,ja=this.view.translate.y;if(X.x!=aa||X.y!=ja){this.view.x0=U.x;this.view.y0=U.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((X.x-aa)*this.view.scale),this.container.scrollTop+=-Math.round((X.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ma=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Z=null,k=null,A=null,I=null,T=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||A)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&-(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",ma.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",ma.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";ma.style.transform=""},0)):(Y.style.transform="",ma.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=-"");var U=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+X.x,pa=b.container.offsetHeight/2-Z.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=U.x-k.x,pa+=U.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=-ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,U,X,aa){aa=null!=aa?aa:this.zoomFactor;(U=U||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var O=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=O?parseInt(O["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(O,T,X){B++;+var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",O);null!=X&&aa.setAttribute("title",X);O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("src",T);O.style.width="36px";O.style.filter="invert(100%)";aa.appendChild(O);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(O){window.location.href=+H;mxEvent.consume(O)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(O){this.actions.get("previousPage").funct();mxEvent.consume(O)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var P=p(mxUtils.bind(this,function(O){this.actions.get("nextPage").funct();mxEvent.consume(O)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var O=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,O+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());+S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(O-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(O+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display="",G.style.display="inline-block"):+(P.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(O){var T=new mxPopupMenu(f.funct);T.div.className+=" geMenubarMenu";T.smartSeparators=!0;T.showDisabled=!0;T.autoExpand=!0;T.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(T,arguments);T.destroy()});var X=mxUtils.getOffset(G);T.popup(X.x,X.y+G.offsetHeight,null,O);mxEvent.addListener(T.div,+"mouseleave",mxUtils.bind(this,function(){T.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(O){this.actions.get("zoomOut").funct();mxEvent.consume(O)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){this.actions.get("zoomIn").funct();mxEvent.consume(O)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){b.isLightboxView()?+(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(O)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(O){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),+600)}),O||200)}),C=mxUtils.bind(this,function(O){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,O||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(O){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var T=F.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=+T.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));T=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=+T.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(O)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(O){null!=this.editor.editButtonFunc?+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(O)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var J=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(O){null!=+J?window.location.href=J:window.location.reload();mxEvent.consume(O)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(O){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(O)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=+document.body))&&p(mxUtils.bind(this,function(O){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(O))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||+(mxEvent.isShiftDown(O)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(O){mxEvent.consume(O)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(O){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(O)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(O){mxEvent.isShiftDown(O)?z():C(100);mxEvent.consume(O)}));mxEvent.addListener(this.chromelessToolbar,+"mouseleave",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||C(30)}));var da=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(O,T){this.startX=T.getGraphX();this.startY=T.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(O,T){},mouseUp:function(O,T){mxEvent.isTouchEvent(T.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<da&&Math.abs(this.scrollTop-b.container.scrollTop)<+da&&Math.abs(this.startX-T.getGraphX())<da&&Math.abs(this.startY-T.getGraphY())<da&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ea=b.view.validate,ca=new mxPoint,W=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;W=!0;var O=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,+!0);null==O&&(O=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));O=b.getPageLayout(O,ca,1);var T=b.getDefaultTranslate(O);this.x0=O.x;this.y0=O.y;if(T.x!=this.translate.x||T.y!=this.translate.y)this.invalidate(),this.translate.x=T.x,this.translate.y=T.y}T=b.getPagePadding();var X=b.getPageSize();O=T.x-(this.x0||0)*X.width;T=T.y-(this.y0||0)*X.height;if(this.translate.x!=O||this.translate.y!=T)this.invalidate(),this.translate.x=O,this.translate.y=T}ea.apply(this,arguments)};+if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var O=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var T=this.getPageLayout(),X=this.getDefaultTranslate(T),aa=this.view.translate.x,ja=this.view.translate.y;if(X.x!=aa||X.y!=ja){this.view.x0=T.x;this.view.y0=T.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;O||(this.container.scrollLeft+=Math.round((X.x-aa)*this.view.scale),this.container.scrollTop+=+Math.round((X.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var la=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ma=null,Z=null,k=null,A=null,I=null,U=function(O){null!=ma&&window.clearTimeout(ma);0<=O&&window.setTimeout(function(){if(!b.isMouseDown||A)ma=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&+(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",la.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",la.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";la.style.transform=""},0)):(Y.style.transform="",la.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=+"");var T=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+X.x,pa=b.container.offsetHeight/2-Z.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=T.x-k.x,pa+=T.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=+ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=ma=null}),null!=O?O:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(O,T,X,aa){aa=null!=aa?aa:this.zoomFactor;(T=T||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));O?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,-160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=U||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=U||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop--b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+P+")";ma.style.transformOrigin=aa+"px "+ja+"px";ma.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(U||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(U||null==Z?b.container.clientHeight/-2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}T(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},-null,function(P){1!=b.cumulativeZoomFactor&&T(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,U,X,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(P))X=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(X.x+(U?-aa:aa),X.y):b.view.setTranslate(X.x,X.y+(U?-aa:-aa));else if(X||b.isZoomWheelEvent(P))for(var pa=mxEvent.getSource(P);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),A=X,X=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?X=1+Math.abs(P.deltaY)/20*(X-1):null!=P.movementY&&"pointermove"==P.type&&(X=1+Math.max(1,Math.abs(P.movementY))/20*(X-1),aa=-1),b.lazyZoom(U,null,aa,X),mxEvent.consume(P),-!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};+160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);O=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=T||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=T||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-+b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+O+")";la.style.transformOrigin=aa+"px "+ja+"px";la.style.transform="scale("+O+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(T||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(T||null==Z?b.container.clientHeight/+2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+O+")")):b.view.validateBackgroundStyles(O,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",O))}U(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(O){null!=ma&&window.clearTimeout(ma)},+null,function(O){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(O){null==ma||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(O,T,X,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(O))X=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(O)?b.view.setTranslate(X.x+(T?-aa:aa),X.y):b.view.setTranslate(X.x,X.y+(T?+aa:-aa));else if(X||b.isZoomWheelEvent(O))for(var pa=mxEvent.getSource(O);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),A=X,X=b.zoomFactor,aa=null,O.ctrlKey&&null!=O.deltaY&&40>Math.abs(O.deltaY)&&Math.round(O.deltaY)!=O.deltaY?X=1+Math.abs(O.deltaY)/20*(X-1):null!=O.movementY&&"pointermove"==O.type&&(X=1+Math.max(1,Math.abs(O.movementY))/20*(X-1),aa=-1),b.lazyZoom(T,null,aa,X),mxEvent.consume(O),+!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(O){b.cumulativeZoomFactor=O.scale;b.lazyZoom(0<O.scale,!0);mxEvent.consume(O)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,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))};EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};@@ -2213,11 +2213,11 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(g,100);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setOpacity(g,0);window.setTimeout(mxUtils.bind(this,function(){null!=g.parentNode&&g.parentNode.removeChild(g)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.style.textOverflow="ellipsis";e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.minWidth="0";e.setAttribute("title",b);e.innerHTML=Graph.sanitizeHtml(b);return e};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 e=document.createElement("div");e.className=b;return e};-EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(R){if(null!=B){var c=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(R);H!=O()&&(S=!0,G=null)}}function p(R){u(R);B=H=null}var B=null,H=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var O=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){B=new mxPoint(mxEvent.getClientX(R),-mxEvent.getClientY(R));H=O();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=O();m(c);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};+EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(R){if(null!=B){var c=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(R);H!=P()&&(S=!0,G=null)}}function p(R){u(R);B=H=null}var B=null,H=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){B=new mxPoint(mxEvent.getClientX(R),+mxEvent.getClientY(R));H=P();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=P();m(c);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};EditorUi.prototype.prompt=function(b,e,g){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){g(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};EditorUi.prototype.handleError=function(b,e,g,m,u){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(u=mxUtils.htmlEntities(b.message));this.showError(e,u,p,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};-EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,S,G,O,R,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,R,H,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,O||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,S,G);this.dialogs.push(this.dialog)};+EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,S,G,P,R,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,R,H,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,P||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,S,G);this.dialogs.push(this.dialog)};EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var u=this.dialogs.length-1;0<=u;u--)if(!this.dialogs[u].closing){m=this.dialogs[u];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog","dialog",m)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(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 e=b.getSelectionCells(),g=new mxDictionary,m=[],u=0;u<e.length;u++){var p=b.isTableCell(e[u])?b.model.getParent(e[u]):e[u];null==p||g.get(p)||(g.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(B){this.handleError(B)}};@@ -2228,7 +2228,7 @@ EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var u=this.base64ToBlEditorUi.prototype.writeTextToClipboard=function(b,e){navigator.clipboard.writeText(b)["catch"](e)};EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var g=b.indexOf("<mxGraphModel ");if(0<=g){var m=b.lastIndexOf("</mxGraphModel>");m>g&&(e=b.substring(g,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(u){}return e};EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var m=decodeURIComponent(g);this.isCompatibleString(m)&&(g=m)}b(g)}),"text")}),"html")};EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(u){try{var p=this.parseHtmlData(u),B="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var H=B.lastIndexOf("%3E");-0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(O){}try{var S=p.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(O){}}catch(O){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});+0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(P){}try{var S=p.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(P){}}catch(P){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});else b(null)}))["catch"](function(g){b(null)})};EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(g?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&@@ -2251,7 +2251,7 @@ l=0,37==R?l=-c:38==R?t=-c:39==R?l=c:40==R&&(t=c),F.currentDx+=l*C,F.currentDy+=t(null==g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(c=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=c)return c.funct;if(null!=H[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[R.keyCode],m.defaultEdgeLength,R,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return S.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(R,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},-c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,O=u.escape;u.escape=function(R){O.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,+c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,P=u.escape;u.escape=function(R){P.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,"zoomIn");u.bindAction(222,!0,"zoomIn");u.bindAction(173,!0,"zoomOut");u.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)u.bindAction(79,!0,"outline",!0),u.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),u.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),u.bindControlKey(13,function(){G.ctrlEnter()}),u.bindAction(8,!1,"delete"),u.bindAction(8,!0,"deleteAll"),u.bindAction(8,!1,"deleteLabels",!0),u.bindAction(46,!1,"delete"),u.bindAction(46,!0,"deleteAll"),u.bindAction(46,!1,"deleteLabels",!0),u.bindAction(36,!1,"resetView"),u.bindAction(72,!0,"fitWindow",!0),u.bindAction(74,!0,"fitPage"),u.bindAction(74,!0,"fitTwoPages",!0),u.bindAction(48,!0,"customZoom"),u.bindAction(82,!0,"turn"),u.bindAction(82,!0,"clearDefaultStyle",!0),u.bindAction(83,!0,"save"),u.bindAction(83,!0,"saveAs",!0),u.bindAction(65,!0,"selectAll"),u.bindAction(65,!0,"selectNone",!0),u.bindAction(73,!0,"selectVertices",!0),u.bindAction(69,!0,"selectEdges",!0),u.bindAction(69,!0,"editStyle"),u.bindAction(66,!0,"bold"),u.bindAction(66,!0,"toBack",!0),u.bindAction(70,!0,"toFront",!0),u.bindAction(68,!0,"duplicate"),u.bindAction(68,!0,"setAsDefaultStyle",!0),u.bindAction(90,!0,"undo"),u.bindAction(90,!0,"redo",!0),u.bindAction(89,!0,"redo"),u.bindAction(89,!0,"autosize",!0),u.bindAction(88,!0,"cut"),u.bindAction(67,!0,"copy"),u.bindAction(86,!0,"paste"),u.bindAction(71,!0,"group"),u.bindAction(77,!0,"editData"),u.bindAction(71,!0,"grid",!0),u.bindAction(73,!0,"italic"),u.bindAction(76,@@ -2264,43 +2264,43 @@ null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gnull}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var u=0;u<b.length;u++)m=m.replace(new RegExp("&"+b[u][0]+";","g"),"&#"+b[u][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,u,p,B){return g(Graph.sanitizeHtml(m),u,p,B)}})();Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}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,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var u=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=-arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var S=e(this)?Object(new this(H)):Array(H),G=0,O;G<H;)O=u[G],S[G]=p?"undefined"===typeof B?p(O,G):p.call(B,O,G):O,G+=1;S.length=H;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");+arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var S=e(this)?Object(new this(H)):Array(H),G=0,P;G<H;)P=u[G],S[G]=p?"undefined"===typeof B?p(P,G):p.call(B,P,G):P,G+=1;S.length=H;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");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(e){}})();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="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,g){return null};-mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};+mxImageShape.prototype.getImageDataUri=function(){var b=String(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};(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,u,p){return"default"==u&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var O=G.getElementsByTagName("img");0<O.length&&(O[0].className="geToolbarButton geAdaptiveAsset",O[0].style.margin="4px",O[0].style.width="18px")}return G}})();+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var P=G.getElementsByTagName("img");0<P.length&&(P[0].className="geToolbarButton geAdaptiveAsset",P[0].style.margin="4px",P[0].style.width="18px")}return G}})();Graph=function(b,e,g,m,u,p){mxGraph.call(this,b,e,g,m);this.themes=u||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);-return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,O=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);-if(null==I||null==I.getHandleForEvent(Z)){var T=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),P=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=P+2;T.grow(P);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+-I,Z.getGraphY()-I))){var U=this.model.getParent(A.cell);I=this.model.getParent(U);if(!this.isCellSelected(I)){P*=k;var X=2*P;if(this.model.getChildAt(I,0)!=U&&mxUtils.intersects(T,new mxRectangle(A.x,A.y-P,A.width,X))||this.model.getChildAt(U,0)!=A.cell&&mxUtils.intersects(T,new mxRectangle(A.x-P,A.y,X,A.height))||mxUtils.intersects(T,new mxRectangle(A.x,A.y+A.height-P,A.width,X))||mxUtils.intersects(T,new mxRectangle(A.x+A.width-P,A.y,X,A.height)))U=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,-Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(P=I.getHandleForEvent(Z),null!=P&&(I.start(Z.getGraphX(),Z.getGraphY(),P),I.blockDelayedSelection=!U,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(T,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||-0<I.height)&&mxUtils.intersects(T,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(P=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),P),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&-this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),O=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));-this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var T=null;mxEvent.isShiftDown(k.getEvent())||(T=this.selectionCellsHandler.getHandler(A.cell));if(null!=T&&null!=-T.bends&&0<T.bends.length){T.redrawHandles();var P=null!=G?G:T.getHandleForEvent(H),U=this.view.getEdgeStyle(A),X=U==mxEdgeStyle.EntityRelation;I=A.absolutePoints;O||(P=G);P!=mxEvent.LABEL_HANDLE&&null!=I&&(P=G,null==P&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?P=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?P=T.bends.length-1:null!=I&&(null==U&&null==P||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&-(null!=U&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?P=2:(P=mxUtils.findNearestSegment(A,B.x,B.y),P=null==U?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Z=P==mxEvent.LABEL_HANDLE||0==P||P==T.bends.length-1;if(!X&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)T.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?-this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,T),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||T.destroy());O=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);T=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==-Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?T="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(A),U==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&-U!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(T=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,-A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))T="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))T="col-resize";for(k=A;null==T&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),-P=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*P+(0==I.x?k.width*P:0),k.y,1,k.height))?T="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*P+(0==I.y?k.height:0),k.width,1))&&(T="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=T&&A.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=+return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,P=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);+if(null==I||null==I.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),O=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=O+2;U.grow(O);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()++I,Z.getGraphY()-I))){var T=this.model.getParent(A.cell);I=this.model.getParent(T);if(!this.isCellSelected(I)){O*=k;var X=2*O;if(this.model.getChildAt(I,0)!=T&&mxUtils.intersects(U,new mxRectangle(A.x,A.y-O,A.width,X))||this.model.getChildAt(T,0)!=A.cell&&mxUtils.intersects(U,new mxRectangle(A.x-O,A.y,X,A.height))||mxUtils.intersects(U,new mxRectangle(A.x,A.y+A.height-O,A.width,X))||mxUtils.intersects(U,new mxRectangle(A.x+A.width-O,A.y,X,A.height)))T=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,+Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(O=I.getHandleForEvent(Z),null!=O&&(I.start(Z.getGraphX(),Z.getGraphY(),O),I.blockDelayedSelection=!T,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(U,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||+0<I.height)&&mxUtils.intersects(U,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(O=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),O),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&+this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),P=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));+this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(A.cell));if(null!=U&&null!=+U.bends&&0<U.bends.length){U.redrawHandles();var O=null!=G?G:U.getHandleForEvent(H),T=this.view.getEdgeStyle(A),X=T==mxEdgeStyle.EntityRelation;I=A.absolutePoints;P||(O=G);O!=mxEvent.LABEL_HANDLE&&null!=I&&(O=G,null==O&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?O=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?O=U.bends.length-1:null!=I&&(null==T&&null==O||T==mxEdgeStyle.SegmentConnector||T==mxEdgeStyle.OrthConnector)&&+(null!=T&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?O=2:(O=mxUtils.findNearestSegment(A,B.x,B.y),O=null==T?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE));Z=O==mxEvent.LABEL_HANDLE||0==O||O==U.bends.length-1;if(!X&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)U.start(k.getGraphX(),k.getGraphX(),O),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?+this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,U),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||U.destroy());P=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);U=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==+Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?U="pointer":(T=this.view.getEdgeStyle(A),T==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(U="crosshair",T!=mxEdgeStyle.SegmentConnector&&+T!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(U=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,+A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))U="col-resize";for(k=A;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),+O=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*O+(0==I.x?k.width*O:0),k.y,1,k.height))?U="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*O+(0==I.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&A.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=function(Z){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Z.lastLabelValue!=k&&(Z.lastLabelValue=k,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(k),c.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(c,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=c.innerHTML)),k=Z.lastSanitizedLabelValue));return k};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(Z,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,T=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var P=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)k.push(new mxRectangle(((U.x+X)*T+I.x)*P,(U.y*A+I.y)*P,T*P,A*P));for(X=1;X<U.height;X++)k.push(new mxRectangle((U.x*T+I.x)*P,((U.y+X)*A+I.y)*P,T*P,A*P));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],T=0;T<k.length;T++){var P=-this.graph.isTableCell(Z)&&this.graph.isTableCell(k[T])&&this.graph.isCellSelected(k[T])?this.graph.model.getParent(k[T]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[T])&&this.graph.isCellSelected(k[T])?k[T]:this.graph.getCompositeParent(k[T]);null==P||A.get(P)||(A.put(P,!0),I.push(P))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var T=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?T=!0:Z=this.graph.model.getParent(Z));T||this.graph.isTableRow(Z)&&-this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,T,P){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[U]);return U};var z=new mxRubberband(this);this.getRubberband=function(){return z};+this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,U=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var O=this.graph.view.scale,T=this.graph.getPageLayout(),X=0;X<T.width;X++)k.push(new mxRectangle(((T.x+X)*U+I.x)*O,(T.y*A+I.y)*O,U*O,A*O));for(X=1;X<T.height;X++)k.push(new mxRectangle((T.x*U+I.x)*O,((T.y+X)*A+I.y)*O,U*O,A*O));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],U=0;U<k.length;U++){var O=+this.graph.isTableCell(Z)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==O||A.get(O)||(A.put(O,!0),I.push(O))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&+this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,U,O){var T=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[T]);return T};var z=new mxRubberband(this);this.getRubberband=function(){return z};var C=(new Date).getTime(),F=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;N.apply(this,arguments);Z!=this.currentState?(C=(new Date).getTime(),F=0):F=(new Date).getTime()-C};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<F||(null==this.currentState||-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var J=this.isToggleEvent;this.isToggleEvent=function(Z){return J.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var ea=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return ea.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};-var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=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=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ca=this.click;this.click=function(Z){var k=null==Z.state&&+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var J=this.isToggleEvent;this.isToggleEvent=function(Z){return J.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var da=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return da.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};+var ea=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ea=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=ea)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ca=this.click;this.click=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ca.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var I=this.getClickableLinkForCell(A);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,A):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var ba=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return ba.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=-function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var ma=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=ma.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):-Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),la=null==Z||this.isSelectionEmpty()||-this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);la=null;k.consume()}}));this.connectionHandler.selectCells=+function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var la=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=la.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):+Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var ma=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),ma=null==Z||this.isSelectionEmpty()||+this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=ma?this.addSelectionCells(ma):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);ma=null;k.consume()}}));this.connectionHandler.selectCells=function(Z,k){this.graph.setSelectionCell(k||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,k){var A=Z.view.graph;return k&&(A.isCellSelected(Z.cell)||A.isTableRow(Z.cell)&&A.selectionCellsHandler.isHandled(A.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}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.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/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">';@@ -2314,9 +2314,9 @@ Graph.createSvgImage=function(b,e,g,m,u){g=unescape(encodeURIComponent(Graph.svgGraph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};Graph.createSvgNode=function(b,e,g,m,u){var p=mxUtils.createXmlDocument(),B=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=u&&B.setAttribute("style","background: "+u.light+"; background-color: "+u.cssText+";");null==p.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);B.setAttribute("version","1.1");B.setAttribute("width",g+"px");B.setAttribute("height",m+"px");B.setAttribute("viewBox",b+" "+e+" "+g+" "+m);p.appendChild(B);return B};-Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(O){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);H.onerror=+Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(P){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);H.onerror=function(G){m(null)};H.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=u?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+u+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};-Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){B=null;for(var G=0;G<p[S].style.length;G++){var O=p[S].style.item(G),R=p[S].style.getPropertyValue(O);H=u(p[S],O,R)||H}"FONT"==p[S].nodeName&&+Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){B=null;for(var G=0;G<p[S].style.length;G++){var P=p[S].style.item(G),R=p[S].style.getPropertyValue(P);H=u(p[S],P,R)||H}"FONT"==p[S].nodeName&&""==p[S].style.getPropertyValue("color")&&(R=p[S].getAttribute("color"),H=u(p[S],"color",R)||H);null!=e&&null!=B&&p[S].setAttribute(e,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var u=b[m].getAttribute(e);if(null!=u){b[m].removeAttribute(e);var p=JSON.parse(u),B;for(B in p){var H=p[B];""==H?(b[m].style[B]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[B]=H;g=!0}}}catch(S){}return g};Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var u=JSON.parse(m);null!=u&&null!=u[e]&&("color"==e&&"FONT"==b.nodeName&&""==u[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=u[e]&&(g=u[e]))}}catch(p){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,u=g?"color":"background-color",p=b.getElementsByTagName("*"),B=[],H=0;H<p.length;H++)B.push({node:p[H],value:p[H].style[u]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<B.length&&B[H].node==b[H]&&B[H].value!=b[H].style[u]&&""==b[H].style[u])try{if(p=b[H].getAttribute(Graph.backupStyleAttribute),null!=p){var S=JSON.parse(p);S[u]=@@ -2327,24 +2327,24 @@ Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var g=b.bGraph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),u=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+e.length-1;g++){if(b[g]!=e.charCodeAt(u))return Graph.arrayBufferIndexOfString(b,e,p+1);u++}return u==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?e:Graph.zapGremlins(e)};Graph.fadeNodes=function(b,e,g,m,u){u=null!=u?u:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+u+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},u)},0)};-Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(O,R){if(O.getModel().isVertex(R)){var c=O.container.scrollWidth/2,f=O.container.scrollHeight/2;O.rootCell=R.referenceCell||R;O.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&-!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=O.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,O.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()+-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<R.startIndex){var ea=O.createVertex(null,null,mxResources.get("previousPage")+-" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ea.referenceCell=l;ea.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,ea)}if(z.length>(R.startIndex||0)+pageSize){var da=O.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");-da.referenceCell=l;da.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,da)}for(var ca in O.getModel().cells){var W=O.getModel().getCell(ca);W!=O.rootCell&&!O.getModel().isAncestor(O.rootCell,W)&&O.getModel().isVertex(W)&&O.removeCells([W])}O.addCells(K);var ba=O.getModel().getGeometry(O.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,O.getModel().setGeometry(O.rootCell,ba));R=[];for(ca in O.getModel().cells)W=O.getModel().getCell(ca),W!=O.rootCell&&O.getModel().isVertex(W)&&-O.getModel().getParent(W)==O.getDefaultParent()&&(R.push(W),ba=O.getModel().getGeometry(W),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,ma=2*Math.PI/ha,Y=Math.max(minSize,Math.min(O.container.scrollWidth/2.5-80,O.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=O.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*ma),ba.y+=Y*Math.cos(c*ma),O.getModel().setGeometry(R[c],ba))}finally{O.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=+Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(P,R){if(P.getModel().isVertex(R)){var c=P.container.scrollWidth/2,f=P.container.scrollHeight/2;P.rootCell=R.referenceCell||R;P.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&+!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=P.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,P.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()++";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<R.startIndex){var da=P.createVertex(null,null,mxResources.get("previousPage")++" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=l;da.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,da)}if(z.length>(R.startIndex||0)+pageSize){var ea=P.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");+ea.referenceCell=l;ea.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,ea)}for(var ca in P.getModel().cells){var W=P.getModel().getCell(ca);W!=P.rootCell&&!P.getModel().isAncestor(P.rootCell,W)&&P.getModel().isVertex(W)&&P.removeCells([W])}P.addCells(K);var ba=P.getModel().getGeometry(P.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,P.getModel().setGeometry(P.rootCell,ba));R=[];for(ca in P.getModel().cells)W=P.getModel().getCell(ca),W!=P.rootCell&&P.getModel().isVertex(W)&&+P.getModel().getParent(W)==P.getDefaultParent()&&(R.push(W),ba=P.getModel().getGeometry(W),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,la=2*Math.PI/ha,Y=Math.max(minSize,Math.min(P.container.scrollWidth/2.5-80,P.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=P.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*la),ba.y+=Y*Math.cos(c*la),P.getModel().setGeometry(R[c],ba))}finally{P.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position="absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=-"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(O){27==O.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(O){if(mxClient.isBrowserSupported()){var R=new Graph(O);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=-function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);O.parentNode.removeChild(O);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];+"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(P){27==P.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(P){if(mxClient.isBrowserSupported()){var R=new Graph(P);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=+function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);P.parentNode.removeChild(P);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(J){N.spacing=Math.min(60,Math.max(30,60-5*J.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();z=!1}))});p(R,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};-Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var g=document.createElement("div");g.style.position="absolute";g.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),u=m.indexOf("<svg");if(0<=u){g.innerHTML=Graph.sanitizeHtml(m.substring(u));var p=g.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(g);try{m=e=-1;var B=p[0].getAttribute("width"),H=p[0].getAttribute("height");B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;H=null!=H&&"%"!=H.charAt(H.length-1)?parseFloat(H):NaN;var S=p[0].getAttribute("viewBox");u=null;if(null!=S&&!isNaN(B)&&!isNaN(H)){var G=S.split(" ");4<=S.length&&(e=parseFloat(G[2])/B,m=parseFloat(G[3])/H,u=new mxRectangle(parseFloat(G[0]),parseFloat(G[1]),parseFloat(G[2]),parseFloat(G[3])))}var O=p[0].getBBox();0<O.width&&0<O.height&&(null==u||O.width*O.height<u.width*u.height*-.7)&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",O.x+" "+O.y+" "+O.width+" "+O.height),g.getElementsByTagName("svg")[0].setAttribute("width",O.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",O.height/m))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(R){}return b};+Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var g=decodeURIComponent(escape(atob(b.substring(26)))),m=g.indexOf("<svg");if(0<=m){e.innerHTML=Graph.sanitizeHtml(g.substring(m));var u=e.getElementsByTagName("svg");if(0<u.length){document.body.appendChild(e);try{m=g=1;var p=u[0].getAttribute("width"),B=u[0].getAttribute("height");p=null!=p&&"%"!=p.charAt(p.length-+1)?parseFloat(p):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var H=u[0].getAttribute("viewBox");if(null!=H&&!isNaN(p)&&!isNaN(B)){var S=H.split(" ");4<=H.length&&(g=parseFloat(S[2])/p,m=parseFloat(S[3])/B,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var G=u[0].getBBox();if(0<G.width&&0<G.height){p=0;var P=u[0].querySelectorAll("[stroke-width]");for(B=0;B<P.length;B++)p=Math.max(p,parseFloat(P[B].getAttribute("stroke-width")));G=new mxRectangle(G.x,+G.y,G.width,G.height);G.grow(p/2);e.getElementsByTagName("svg")[0].setAttribute("viewBox",G.x+" "+G.y+" "+G.width+" "+G.height);e.getElementsByTagName("svg")[0].setAttribute("width",G.width/g);e.getElementsByTagName("svg")[0].setAttribute("height",G.height/m)}}catch(R){}finally{document.body.removeChild(e)}b=Editor.createSvgDataUri(mxUtils.getXml(u[0]))}}}catch(R){}return b};Graph.createRemoveIcon=function(b,e){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",e);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.rewritePageLinks=function(b,e){function g(u,p){var B=u.getAttribute(p);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var H=p;e&&"xlink:href"==p&&(u.removeAttribute(p),H="href");u.setAttribute(H,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;@@ -2352,33 +2352,33 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBaGraph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(O){p=!0;B=new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O))}),S=mxUtils.bind(this,function(O){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(O))<u&&Math.abs(B.y-mxEvent.getClientY(O))<u}),G=mxUtils.bind(this,function(O){if(p)for(var R=mxEvent.getSource(O);null!=-R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,O);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,H,S,G);mxEvent.addListener(m.node,"click",function(O){mxEvent.consume(O)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(P){p=!0;B=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(P))<u&&Math.abs(B.y-mxEvent.getClientY(P))<u}),G=mxUtils.bind(this,function(P){if(p)for(var R=mxEvent.getSource(P);null!=+R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,P);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,H,S,G);mxEvent.addListener(m.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(m)&&mxEvent.consume(g))}))}}this.initLayoutManager()};(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(B){return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(B){return this.isFillState(B)&&"wire"!=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var S=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,H?"color":"background-color");null==S&&null!=B&&B!=this.cellEditor.textarea.parentNode;)S=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,"color"),B=B.parentNode;if("rgba(0, 0, 0, 0)"==S||"transparent"==S)S=mxConstants.NONE;return S};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return"label"==B||"rectangle"==B||"internalStorage"==B||"ext"==B||"umlLifeline"==B||"swimlane"==B||"process"==B};Graph.prototype.isRoundedState=function(B){return null!=B.shape?B.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(B.style,mxConstants.STYLE_CURVED,!1)&&("connector"==H||"filledEdge"==H||"wire"==H)};Graph.prototype.isAutoSizeState=function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,H){B=null!=B?B:!0;H=null!=H?H:!0;var S=this.model;return S.filterDescendants(function(G){return B&&S.isVertex(G)||H&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=-function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),O;for(O in G)this.setCellStyles(O,G[O],H),"edgeStyle"==O&&"elbowEdgeStyle"==G[O]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},S=0;S<B.length;S++){var G=this.view.getState(B[S]);null!=G&&this.mergeStyle(G.style,H,0==S)}return H};-Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var G={},O;for(O in B){var R=B[O];null!=R&&(G[O]=!0,null==H[O]&&S?H[O]=R:H[O]!=R&&delete H[O])}for(O in H)G[O]||delete H[O]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,-0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(O){return 0>mxUtils.indexOf(S,O)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=-function(B,H,S,G,O,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete O[H[t]]:O[H[t]]=S[t]};Graph.prototype.includeDescendants=-function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,O){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;O=null!=O?O:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=-null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var ea=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(ea,K))for(var da=0;da<ea.length;da++){var ca=mxUtils.indexOf(t,ea[da]);0<=ca&&t.splice(ca,1)}}}}var W=this.model.isEdge(c);l=W?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||O)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=+function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),P;for(P in G)this.setCellStyles(P,G[P],H),"edgeStyle"==P&&"elbowEdgeStyle"==G[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},S=0;S<B.length;S++){var G=this.view.getState(B[S]);null!=G&&this.mergeStyle(G.style,H,0==S)}return H};+Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var G={},P;for(P in B){var R=B[P];null!=R&&(G[P]=!0,null==H[P]&&S?H[P]=R:H[P]!=R&&delete H[P])}for(P in H)G[P]||delete H[P]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,+0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=+function(B,H,S,G,P,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete P[H[t]]:P[H[t]]=S[t]};Graph.prototype.includeDescendants=+function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,P){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=+null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var da=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(da,K))for(var ea=0;ea<da.length;ea++){var ca=mxUtils.indexOf(t,da[ea]);0<=ca&&t.splice(ca,1)}}}}var W=this.model.isEdge(c);l=W?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||P)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=mxUtils.setStyle(f,K,ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),W&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=-this.getCellStyle(H[S],!1),O=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,O,[H[S]])}}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,H,S,G,O,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,O,R){G=null!=G?G:!0;O=null!=O?O:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));-if(null!=S)for(var c=this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,O,R);if(null!=l)return l;if(this.isCellVisible(f)&&(O&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}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 H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=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.getCompositeParents=function(B){for(var H=new mxDictionary,S=[],G=0;G<B.length;G++){var O=this.getCompositeParent(B[G]);-this.isTableCell(O)&&(O=this.graph.model.getParent(O));this.isTableRow(O)&&(O=this.graph.model.getParent(O));null==O||H.get(O)||(H.put(O,!0),S.push(O))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);+this.getCellStyle(H[S],!1),P=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[H[S]])}}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,H,S,G,P,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,P,R){G=null!=G?G:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));+if(null!=S)for(var c=this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,P,R);if(null!=l)return l;if(this.isCellVisible(f)&&(P&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}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 H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=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.getCompositeParents=function(B){for(var H=new mxDictionary,S=[],G=0;G<B.length;G++){var P=this.getCompositeParent(B[G]);+this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));null==P||H.get(P)||(H.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);if(!this.model.isVertex(H))break;B=H}return B};Graph.prototype.filterSelectionCells=function(B){var H=this.getSelectionCells();if(null!=B){for(var S=[],G=0;G<H.length;G++)B(H[G])||S.push(H[G]);H=S}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var H=this.currentScale,S=this.currentTranslate;B=new mxRectangle((B.x+2*S.x)*H-S.x,(B.y+2*S.y)*H-S.y,B.width*H,B.height*H)}b.apply(this,arguments)};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 H=this.graph.currentTranslate,S=this.graph.currentScale;B=new mxRectangle((B.x+H.x)*S,(B.y+H.y)*S,B.width*S,B.height*S)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(B){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=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var g=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(B){B=g.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=m.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTable(B[S])||this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=B.parentNode,this.useCssTransforms){var H=B.getAttribute("transform");B.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};-var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.useCssTransforms,O=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=-new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=O,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};+var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.useCssTransforms,P=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=+new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=P,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,g){var m=e.getAttribute("href");m!=Graph.sanitizeLink(m)&&Graph.sanitizeNode(e);if(null!=m&&!this.isCustomLink(m)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(m)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(m),b);mxEvent.consume(g)}};Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var u=b.split("#")[1];window.location.hash=="#"+u&&(window.location.hash="");window.location.hash=u}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(p){}return m};Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,e){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};@@ -2393,7 +2393,7 @@ Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var u={};u.id=b[m].id;var p=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(u.value=this.getLabel(b[m]));if(null!=p)for(var B=0;B<p.length;B++)u[p[B].nodeName]=p[B].nodeValue;else u.label=this.convertValueToString(b[m]);g.push(u)}return g};Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var u=this.cellRenderer.getShapesForState(m),p=0;p<u.length;p++)null!=u[p]&&null!=u[p].node&&e.push(u[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var u=this.view.getState(b[m]);null!=u&&null!=u.shape&&(this.model.isEdge(u.cell)&&null!=u.absolutePoints&&1<u.absolutePoints.length?g.push(this.createEdgeWipeAnimation(u,e)):this.model.isVertex(u.cell)&&null!=u.shape.bounds&&g.push(this.createVertexWipeAnimation(u,e)))}return g};-Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,O=1;O<p;O++)if(G<=m[O-1]){S.push(new mxPoint(g[O-1].x+(g[O].x-g[O-1].x)*G/m[O-1],g[O-1].y+(g[O].y-g[O-1].y)*G/m[O-1]));break}else G-=m[O-1],S.push(g[O]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=+Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,P=1;P<p;P++)if(G<=m[P-1]){S.push(new mxPoint(g[P-1].x+(g[P].x-g[P-1].x)*G/m[P-1],g[P-1].y+(g[P].y-g[P-1].y)*G/m[P-1]));break}else G-=m[P-1],S.push(g[P]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=H)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,u){null!=b.shape&&(u=m/u,e||(u=1-u),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*u,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=u))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var u=null,p=0,B=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(u);for(var H=0;H<b.length;H++)b[H].stop();null!=e&&e()}else for(H=0;H<b.length;H++)b[H].execute(p,g);p++});u=window.setInterval(B,m);B()};@@ -2408,11 +2408,11 @@ Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);retGraph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};Graph.prototype.formatDate=function(b,e,g){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 m=this.dateFormatCache,u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,B=function(C,F){C=String(C);for(F=F||2;C.length<F;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",S=b[H+"Date"](),G=b[H+"Day"](),O=b[H+"Month"](),R=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:S,dd:B(S),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:O+1,mm:B(O+1),mmm:m.i18n.monthNames[O],mmmm:m.i18n.monthNames[O++/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",S=b[H+"Date"](),G=b[H+"Day"](),P=b[H+"Month"](),R=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:S,dd:B(S),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:P+1,mm:B(P+1),mmm:m.i18n.monthNames[P],mmmm:m.i18n.monthNames[P+12],yy:String(R).slice(2),yyyy:R,h:c%12||12,hh:B(c%12||12),H:c,HH:B(c),M:f,MM:B(f),s:l,ss:B(l),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>c?"a":"p",tt:12>c?"am":"pm",T:12>c?"A":"P",TT:12>c?"AM":"PM",Z:g?"UTC":(String(b).match(u)||[""]).pop().replace(p,""),o:(0<t?"-":"+")+B(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in z?z[C]:C.slice(1,C.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};-Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(O.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(O.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=-"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[S]));var O=document.createElement("img");O.setAttribute("draggable","false");O.setAttribute("align","absmiddle");O.setAttribute("border","0");O.style.position="relative";O.style.width="16px";O.style.padding="0px 6px 0 4px";e&&(O.style.filter="invert(100%)",O.style.top="-2px");G.appendChild(O);mxUtils.write(G,S);g.appendChild(G);+Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=+"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";e&&(P.style.filter="invert(100%)",P.style.top="-2px");G.appendChild(P);mxUtils.write(G,S);g.appendChild(G);mxEvent.addListener(G,"click",function(){m.setVisible(B,!m.isVisible(B));H();null!=b&&b(B)});H()})(m.getChildAt(m.root,p));return g};Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var u=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var B=null;if(match.index>u&&"%"==e.charAt(match.index-1))B=p.substring(1);else{var H=p.substring(1,p.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)B=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var G=this.getCellGeometry(b);null!=G&&(B=G.width,5<H.length&&(B=Editor.toUnit(B,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))G=this.getCellGeometry(b),null!=G&&(B=G.height,6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(G=b;null!=G&&!this.model.isEdge(G);)G=this.model.getParent(G);G=this.view.getState(G);null!=G&&(B=Math.round(G.length/this.view.scale),6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])))}else if(0>H.indexOf("{"))for(S=b;null==B&&null!=@@ -2426,13 +2426,13 @@ Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=this.model.isEdge(b)&&this.model.isEdge(e[p]))if(g){var B=this.model.getStyle(e[p]);if(null!=B){var H=B.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(e[p],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[p]]);this.setCellStyles("points",null,[e[p]]);this.pasteStyle(u,[e[p]],null,!0)}else u=this.copyStyle(e[p]),this.model.setStyle(e[p],m),this.pasteStyle(u,[e[p]]);"1"==mxUtils.getValue(this.getCellStyle(e[p],!1),"composite","0")&&this.removeChildCells(e[p])}}finally{this.model.endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(e)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&null!=g.geometry&&g.geometry.relative&&g.parent!=b.parent;)g=this.model.getParent(g);null!=g&&null!=g.parent&&g.parent==b.parent&&(e=g.parent.getIndex(g),this.model.add(g.parent,b,e))};-Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),O=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(O.x+=G.geometry.width/2,O.y-=g):e==-mxConstants.DIRECTION_SOUTH?(O.x+=G.geometry.width/2,O.y+=G.geometry.height+g):(O.x=e==mxConstants.DIRECTION_WEST?O.x-g:O.x+(G.geometry.width+g),O.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(O.x+=b.parent.geometry.x,O.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+O.x*g,c+O.y*g)).grow(40*g);p=null!=p?+Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(P.x+=G.geometry.width/2,P.y-=g):e==+mxConstants.DIRECTION_SOUTH?(P.x+=G.geometry.width/2,P.y+=G.geometry.height+g):(P.x=e==mxConstants.DIRECTION_WEST?P.x-g:P.x+(G.geometry.width+g),P.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+P.x*g,c+P.y*g)).grow(40*g);p=null!=p?this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==R||null==z||mxUtils.intersects(R,z)||(l=p[t])}}var C=-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?O.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=b.geometry.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-b.geometry.width/2:O.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=S?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],-!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var ea=this.getCellGeometry(N);null!=ea&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?O.y-=ea.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=ea.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-ea.width/2:O.x+ea.width/2),ea.x=O.x-ea.width/2,ea.y=O.y-ea.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&-mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=da&&(F.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=da&&da.geometry.setTerminalPoint(O,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[da]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+O.x*g,c+O.y*g,u)};+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=S?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],+!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var da=this.getCellGeometry(N);null!=da&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?P.y-=da.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=da.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-da.width/2:P.x+da.width/2),da.x=P.x-da.width/2,da.y=P.y-da.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var ea=mxEvent.isControlDown(m)&&+mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=ea&&(F.push(ea),this.applyNewEdgeStyle(b,[ea],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ea,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=ea&&ea.geometry.setTerminalPoint(P,!1);null!=ea&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[ea]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+P.x*g,c+P.y*g,u)};Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,u=0;u<b.length;u++)if(m=b[u],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),null==g&&(g=e.getAttribute("label")||"");return g||""}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,e){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),e||(b=mxUtils.removeJavascriptProtocol(b)),b):null};@@ -2443,8 +2443,8 @@ mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYGraph.prototype.getDefaultColor=function(b,e,g){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(b=mxUtils.getLightDarkColor(g),g="light-dark("+b.dark+", "+b.light+")");return g};Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};Graph.prototype.updateAlternateBounds=function(b,e,g){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};-Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var S=0,G=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var O=this.useCssTransforms?1:this.view.scale;-S=Math.round(H.width-B.width/O);G=Math.round(H.height-B.height/O)}if(0!=G||0!=S){var R=this.model.getParent(g[p]),c=this.layoutManager.getLayout(R);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,R,S,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(R,c,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};+Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var S=0,G=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;+S=Math.round(H.width-B.width/P);G=Math.round(H.height-B.height/P)}if(0!=G||0!=S){var R=this.model.getParent(g[p]),c=this.layoutManager.getLayout(R);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,R,S,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(R,c,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var u=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<u.length;e++)if(u[e]!=b.cell){var p=this.view.getState(u[e]),B=this.getCellGeometry(u[e]);null!=p&&null!=B&&(B=B.clone(),B.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(u[e],B))}}finally{this.model.endUpdate()}};Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var u=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==u&&!e.resizeLast;){var p=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=p&&(p=p.clone(),e.horizontal?p.width+=g+Math.min(0,B.width/this.view.scale-p.width):p.height+=m+Math.min(0,B.height/this.view.scale-p.height),this.model.setGeometry(b,p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};@@ -2486,7 +2486,7 @@ HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),u=g.getGraphX(),p=HoverIcons.prototype.execute=function(b,e,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&-(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,S,G){if(null!=g){var O=new mxRectangle(S,G,H.clientWidth,H.clientHeight);mxUtils.intersects(O,g)&&(H==this.arrowUp?G-=O.y+O.height-g.y:H==this.arrowRight?S+=g.x+g.width-O.x:H==this.arrowDown?G+=g.y+g.height-O.y:H==this.arrowLeft&&(S-=O.x+O.width-g.x))}H.style.left=S+"px";H.style.top=G+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-+(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,S,G){if(null!=g){var P=new mxRectangle(S,G,H.clientWidth,H.clientHeight);mxUtils.intersects(P,g)&&(H==this.arrowUp?G-=P.y+P.height-g.y:H==this.arrowRight?S+=g.x+g.width-P.x:H==this.arrowDown?G+=g.y+g.height-P.y:H==this.arrowLeft&&(S-=P.x+P.width-g.x))}H.style.left=S+"px";H.style.top=G+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),u=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==u&&u==b&&(b=u=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,S){var G=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,this.currentState.cell)||this.graph.isSwimlane(H)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(e,this.arrowRight);B(m,this.arrowLeft);B(u,this.arrowUp);B(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),@@ -2505,37 +2505,37 @@ Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCellGraph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:120;m=null!=m?m:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";H=null!=H?H:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";u=this.createVertex(null,null,null!=u?u:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==u?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(u),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);u.geometry.width+=p;u.geometry.height+=p;B=this.createVertex(null,null,"",0,p,e*g+p,m,B);u.insert(this.createParent(B,this.createVertex(null,null,"",p,0,g,m,H),e,g,0));return 1<b?(B.geometry.y=m+p,this.createParent(u,this.createParent(B,this.createVertex(null,null,"",p,0,g,m,S),e,g,0),b-1,0,m)):u};-Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),S=null,G=[],O=0;O<B.length;O++){var R=this.getCellGeometry(B[O]),c={cell:B[O],rospan:1,colspan:1,row:u,col:O,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;c.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+p.x),R.height+(null!=g&&null!=-g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[O]&&1<g[O].rowspan?(c.rowspan=g[O].rowspan-1,c.colspan=g[O].colspan,c.actual=g[O].actual):null!=S&&1<S.colspan?(c.rowspan=S.rowspan,c.colspan=S.colspan-1,c.actual=S.actual):(S=this.getCurrentCellStyle(B[O],!0),null!=S&&(c.rowspan=parseInt(S.rowspan||1),c.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,+Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),S=null,G=[],P=0;P<B.length;P++){var R=this.getCellGeometry(B[P]),c={cell:B[P],rospan:1,colspan:1,row:u,col:P,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;c.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+p.x),R.height+(null!=g&&null!=+g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[P]&&1<g[P].rowspan?(c.rowspan=g[P].rowspan-1,c.colspan=g[P].colspan,c.actual=g[P].actual):null!=S&&1<S.colspan?(c.rowspan=S.rowspan,c.colspan=S.colspan-1,c.actual=S.actual):(S=this.getCurrentCellStyle(B[P],!0),null!=S&&(c.rowspan=parseInt(S.rowspan||1),c.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,m.length,b.x+(S?p.x:0),b.y+(S?p.y:0));G.push(c);S=c}g=G}};Graph.prototype.getTableLines=function(b,e,g){var m=[],u=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,B,H,S,G){e&&p.row<H-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<B-1&&(null==u[p.col]&&(u[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&u[p.col].push(null),u[p.col].push(p.point))}));return m.concat(u)};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,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(S,G))}}var O=this.getCellGeometry(p);null!=O&&(g||(g=b==B[B.length-1]),g&&(O=O.clone(),O.height+=e,m.setGeometry(p,O)))}}finally{m.endUpdate()}};-Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),G=0;G<S.length;G++){u=S[G];B=m.getChildCells(u,!0);var O=B[b],R=this.getCellGeometry(O);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(O,R));b<B.length-1&&(O=B[b+1],R=this.getCellGeometry(O),null!=R&&(R=R.clone(),-R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(O,R)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};+Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(S,G))}}var P=this.getCellGeometry(p);null!=P&&(g||(g=b==B[B.length-1]),g&&(P=P.clone(),P.height+=e,m.setGeometry(p,P)))}}finally{m.endUpdate()}};+Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),G=0;G<S.length;G++){u=S[G];B=m.getChildCells(u,!0);var P=B[b],R=this.getCellGeometry(P);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(P,R));b<B.length-1&&(P=B[b+1],R=this.getCellGeometry(P),null!=R&&(R=R.clone(),+R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(P,R)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.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,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var u=this.graph.getCellGeometry(b[m]);null!=u&&(g+=e?u.width:u.height)}return g};TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var u=[];m=m.x;for(var p=0;p<g.length;p++){var B=this.graph.getCellGeometry(g[p]);null!=B&&(m+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*e/b,u.push(Math.round(m)))}return u};TableLayout.prototype.layoutRow=function(b,e,g,m){var u=this.graph.getModel(),p=u.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var G=this.graph.getCellGeometry(p[S]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=e?(G.x=e[S],G.width=e[S+1]-G.x,S==p.length-1&&S<e.length-2&&(G.width=m-G.x-b.x-b.width)):(G.x=B,B+=G.width,S==p.length-1?G.width=m-b.x-b.width-H:H+=G.width),G.alternateBounds=new mxRectangle(0,0,G.width,G.height),u.setGeometry(p[S],G))}return H};-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,O=B.getChildCells(b,!0),R=0;R<O.length;R++)B.setVisible(O[R],!0);var c=this.getSize(O,!1);if(0<S&&0<G&&0<-O.length&&0<c){if(u){var f=this.graph.getCellGeometry(O[O.length-1]);null!=f&&(f=f.clone(),f.height=S-c+f.height,B.setGeometry(O[O.length-1],f))}var l=p?null:this.getRowLayout(O[0],G),t=[],z=e.y;for(R=0;R<O.length;R++)f=this.graph.getCellGeometry(O[R]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*S,f.height=Math.round(z)-f.y,B.setGeometry(O[R],f)),H=Math.max(H,this.layoutRow(O[R],l,f.height,G,t));m&&S<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,-g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(R=0;R<O.length;R++)B.setVisible(O[R],+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,P=B.getChildCells(b,!0),R=0;R<P.length;R++)B.setVisible(P[R],!0);var c=this.getSize(P,!1);if(0<S&&0<G&&0<+P.length&&0<c){if(u){var f=this.graph.getCellGeometry(P[P.length-1]);null!=f&&(f=f.clone(),f.height=S-c+f.height,B.setGeometry(P[P.length-1],f))}var l=p?null:this.getRowLayout(P[0],G),t=[],z=e.y;for(R=0;R<P.length;R++)f=this.graph.getCellGeometry(P[R]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*S,f.height=Math.round(z)-f.y,B.setGeometry(P[R],f)),H=Math.max(H,this.layoutRow(P[R],l,f.height,G,t));m&&S<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,+g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(R=0;R<P.length;R++)B.setVisible(P[R],!1)}finally{B.endUpdate()}}};(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(R,c){c=null!=c?c:!0;var f=this.getState(R);null!=f&&c&&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=e.apply(this,arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var R=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=R)for(var c=0;c<R.length;c++)if("hidden"!=R[c].getAttribute("visibility"))return R[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,c){return u.apply(this,arguments)||null!=R.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);-this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,la,Z){var k=new mxPoint(la,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=la||k.y!=Z},z=.5*this.scale;-f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var ea=0;ea<this.validEdges.length;ea++){var da=this.validEdges[ea],ca=da.absolutePoints;if(null!=ca&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var W=null;for(da=0;da<ca.length-1;da++){var ba=ca[da+1],ha=ca[da];for(J=ca[da+2];da<ca.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,J.x,J.y,ba.x,ba.y)<1*this.scale*-this.scale;)ba=J,da++,J=ca[da+2];var ma=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=ma&&(Math.abs(ma.x-N.x)>z||Math.abs(ma.y-N.y)>z)&&(Math.abs(ma.x-F.x)>z||Math.abs(ma.y-F.y)>z)&&(null==W||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,W.x,W.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){J=ma.x-N.x;W=ma.y-N.y;ma={distSq:J*J+W*W,x:ma.x,y:ma.y};for(J=0;J<K.length;J++)if(K[J].distSq>-ma.distSq){K.splice(J,0,ma);ma=null;break}null==ma||0!=K.length&&K[K.length-1].x===ma.x&&K[K.length-1].y===ma.y||K.push(ma)}W=ha}}}for(da=0;da<K.length;da++)f=t(1,K[da].x,K[da].y)||f}ma=c[c.length-1];f=t(0,ma.x,ma.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,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)B.apply(this,-arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;R.begin();for(var ea=0;ea<this.state.routedPoints.length;ea++){var da=this.state.routedPoints[ea],ca=new mxPoint(da.x/this.scale,da.y/this.scale);0==ea?ca=c[0]:ea==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var W=-!1;if(null!=F&&1==da.type){var ba=this.state.routedPoints[ea+1];da=ba.x/this.scale-ca.x;ba=ba.y/this.scale-ca.y;da=da*da+ba*ba;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);da>t*t&&0<N&&(da=F.x-ca.x,ba=F.y-ca.y,da=da*da+ba*ba,da>t*t&&(W=new mxPoint(ca.x-J.x,ca.y-J.y),da=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(W),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(W.x--J.y*K,W.y+J.x*K),R.lineTo(da.x-J.y*K,da.y+J.x*K),R.lineTo(da.x,da.y)):"line"==z?(R.moveTo(W.x+J.y*K,W.y-J.x*K),R.lineTo(W.x-J.y*K,W.y+J.x*K),R.moveTo(da.x-J.y*K,da.y+J.x*K),R.lineTo(da.x+J.y*K,da.y-J.x*K),R.moveTo(da.x,da.y)):"arc"==z?(K*=1.3,R.curveTo(W.x-J.y*K,W.y+J.x*K,da.x-J.y*K,da.y+J.x*K,da.x,da.y)):(R.moveTo(da.x,da.y),C=!0),K=[da],W=!0))}else J=null;W||(K.push(ca),F=ca)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=+this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,ma,Z){var k=new mxPoint(ma,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=ma||k.y!=Z},z=.5*this.scale;+f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var da=0;da<this.validEdges.length;da++){var ea=this.validEdges[da],ca=ea.absolutePoints;if(null!=ca&&mxUtils.intersects(R,ea)&&"1"!=ea.style.noJump){var W=null;for(ea=0;ea<ca.length-1;ea++){var ba=ca[ea+1],ha=ca[ea];for(J=ca[ea+2];ea<ca.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,J.x,J.y,ba.x,ba.y)<1*this.scale*+this.scale;)ba=J,ea++,J=ca[ea+2];var la=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=la&&(Math.abs(la.x-N.x)>z||Math.abs(la.y-N.y)>z)&&(Math.abs(la.x-F.x)>z||Math.abs(la.y-F.y)>z)&&(null==W||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,W.x,W.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){J=la.x-N.x;W=la.y-N.y;la={distSq:J*J+W*W,x:la.x,y:la.y};for(J=0;J<K.length;J++)if(K[J].distSq>+la.distSq){K.splice(J,0,la);la=null;break}null==la||0!=K.length&&K[K.length-1].x===la.x&&K[K.length-1].y===la.y||K.push(la)}W=ha}}}for(ea=0;ea<K.length;ea++)f=t(1,K[ea].x,K[ea].y)||f}la=c[c.length-1];f=t(0,la.x,la.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,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)B.apply(this,+arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;R.begin();for(var da=0;da<this.state.routedPoints.length;da++){var ea=this.state.routedPoints[da],ca=new mxPoint(ea.x/this.scale,ea.y/this.scale);0==da?ca=c[0]:da==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var W=+!1;if(null!=F&&1==ea.type){var ba=this.state.routedPoints[da+1];ea=ba.x/this.scale-ca.x;ba=ba.y/this.scale-ca.y;ea=ea*ea+ba*ba;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);ea>t*t&&0<N&&(ea=F.x-ca.x,ba=F.y-ca.y,ea=ea*ea+ba*ba,ea>t*t&&(W=new mxPoint(ca.x-J.x,ca.y-J.y),ea=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(W),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(W.x-+J.y*K,W.y+J.x*K),R.lineTo(ea.x-J.y*K,ea.y+J.x*K),R.lineTo(ea.x,ea.y)):"line"==z?(R.moveTo(W.x+J.y*K,W.y-J.x*K),R.lineTo(W.x-J.y*K,W.y+J.x*K),R.moveTo(ea.x-J.y*K,ea.y+J.x*K),R.lineTo(ea.x+J.y*K,ea.y-J.x*K),R.moveTo(ea.x,ea.y)):"arc"==z?(K*=1.3,R.curveTo(W.x-J.y*K,W.y+J.x*K,ea.x-J.y*K,ea.y+J.x*K,ea.x,ea.y)):(R.moveTo(ea.x,ea.y),C=!0),K=[ea],W=!0))}else J=null;W||(K.push(ca),F=ca)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(R,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,c,f,l){if(null==c||null==R||"1"!=c.style.snapToPoint&&"1"!=R.style.snapToPoint)S.apply(this,arguments);else{c=this.getTerminalPort(R,c,l);var t=this.getNextPoint(R,f,l),z=this.graph.isOrthogonal(R),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(R.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=function(R,c,f,l,t){if(null!=c&&null!=R){R=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=R)for(var z=0;z<R.length;z++){var C=this.graph.getConnectionPoint(c,R[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,c,f){var l=G.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,-l));return l};var O=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return O.apply(this,arguments)}})();+l));return l};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var u=e[m];if(!mxStencilRegistry.isFileLoaded(u))if(mxStencilRegistry.setFileLoaded(u),".xml"==u.toLowerCase().substring(u.length-4,u.length))mxStencilRegistry.loadStencilSet(u,null);else if(".js"==u.toLowerCase().substring(u.length-3,u.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(u);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,g,e,u,B)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};@@ -2559,8 +2559,8 @@ M,Q,V){M=null!=M?M:0;Q=null!=Q?Q:0;var ia=new mxCodec(x.ownerDocument),ka=new mxka.getChildren(xa[0]);null!=ua&&(x=this.moveCells(ua,M,Q,!1,this.getDefaultParent()),oa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ia,ta,oa),this.updateCustomLinks(oa,x),V)){this.isGridEnabled()&&(M=this.snap(M),Q=this.snap(Q));var Fa=this.getBoundingBoxFromGeometry(x,!0);null!=Fa&&this.moveCells(x,M-Fa.x,Q-Fa.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var M={},Q=this.cloneCells(x,null,M),V=new mxDictionary,ia=0;ia<x.length;ia++)V.put(x[ia],!0);var ka=new mxCodec,oa=new mxGraphModel,xa=oa.getChildAt(oa.getRoot(),0);for(ia=0;ia<Q.length;ia++){oa.add(xa,Q[ia]);var ta=this.view.getState(x[ia]);if(null!=ta){var ua=this.getCellGeometry(Q[ia]);null!=ua&&ua.relative&&!this.model.isEdge(x[ia])&&null==V.get(this.model.getParent(x[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,this.createCellLookup(x)),Q);return ka.encode(oa)};Graph.prototype.isSwimlane=function(x,M){var Q=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(Q=this.getCurrentCellStyle(x,M)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(x){return null!=x&&H.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellEditable(this.model.getParent(x)):-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&S.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var M=this.model.getParent(x);if(null!=M){var Q=this.getCurrentCellStyle(M);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==M||!this.isTable(M))};var O=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(x,M,Q,V,ia,ka,oa,xa){null==xa&&(xa=this.model.getParent(x),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=O.apply(this,[x,M,Q,V,ia,ka,oa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(M=0;M<ta.length;M++){var ua=this.getCellGeometry(ta[M]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[M])}var Fa=this.getChildCells(x,!0);for(M=0;M<Fa.length;M++)ua=this.getCellGeometry(Fa[M]),+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&S.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var M=this.model.getParent(x);if(null!=M){var Q=this.getCurrentCellStyle(M);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==M||!this.isTable(M))};var P=Graph.prototype.splitEdge;+Graph.prototype.splitEdge=function(x,M,Q,V,ia,ka,oa,xa){null==xa&&(xa=this.model.getParent(x),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=P.apply(this,[x,M,Q,V,ia,ka,oa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(M=0;M<ta.length;M++){var ua=this.getCellGeometry(ta[M]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[M])}var Fa=this.getChildCells(x,!0);for(M=0;M<Fa.length;M++)ua=this.getCellGeometry(Fa[M]),null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Fa[M]);var Na=this.model.getTerminal(Q,!1);if(null!=Na){var Wa=this.getCurrentCellStyle(Na);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var R=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,M,Q){if(M||Q)R.apply(this,arguments);else{var V=this.getSelectionCell(),ia=null,ka=[],oa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==V)ia=ka.length-1;else if(x&&null==V&&0<ka.length||null!=ia&&x&&ka.length>ia||!x&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)oa(this.model.getChildAt(xa,ta))});oa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(x?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};Graph.prototype.swapShapes=function(x,M){if(this.model.isVertex(x)&&this.model.isVertex(M)&&2==this.getMovableCells([x,M]).length){var Q=this.getCellGeometry(x),V=this.getCellGeometry(M);if(null!=Q&&null!=V){var ia=Q.clone(),ka=V.clone();this.model.beginUpdate();try{ia.x=V.getCenterX()-Q.width/2,ia.y=V.getCenterY()-Q.height/2,ka.x=Q.getCenterX()-V.width/2,ka.y=Q.getCenterY()-V.height/2,this.model.setGeometry(x,ia),this.model.setGeometry(M,ka)}finally{this.model.endUpdate()}}}};var c=Graph.prototype.moveCells;@@ -2665,13 +2665,13 @@ M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getBorderColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getMinimumSize=function(x){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,Q=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/Q-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/Q-M.y);Q=this.graph.view.unit;this.hint.innerHTML=e(x,Q)+", "+e(M,Q);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&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ea=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){ea.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=-parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=da.apply(this,+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var da=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){da.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=+parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var ea=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=ea.apply(this,arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ca=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ca.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var W=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return W.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(x){var M=ha.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,M){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(M.getEvent())};-mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var ma=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ma.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 Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||la.apply(this,arguments)&&+mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return la.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 Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ma=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||ma.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var Z=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Z.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,A=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var x=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var M=function(ab,Oa,Qa){for(var kb=[],cb=0;cb<ab.length;cb++){var Ya=ab[cb];kb.push(null==Ya?null:new mxPoint((ta+Ya.x+Oa)*ka,(ua+Ya.y+Qa)*ka))}return kb},Q=this,V=this.graph,ia=V.model,ka=V.view.scale,oa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+V.view.translate.x,ua=this.state.origin.y+V.view.translate.y;null==x&&(x=[]);var Fa=V.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Fa.length){var Na=ia.getChildCells(Fa[0].cell,!0),Wa=V.getTableLines(this.state.cell,!1,!0),Xa=V.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Fa.length;ia++)mxUtils.bind(this,function(ab){var Oa=Fa[ab],Qa=null;if(V.isCellMovable(Oa.cell)){Qa=ab<Fa.length-1?Fa[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa.cell):null;var kb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:@@ -2686,13 +2686,13 @@ this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMovethis.graph,M=x.model,Q=[],V=0;V<M.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ia){if(null!=ia&&M.isVertex(ia.cell)&&x.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ia.cell,oa),mxEvent.consume(oa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(M.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=-function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var T=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){T.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();+function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();-x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=+x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var O=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ia=this.customHandles[V].shape.bounds,ka=ia.getCenterX(),oa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-oa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-oa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/=2,this.graph.isTable(this.state.cell)&&(M+=7),x.x=-this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=P.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){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+"°";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/+this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=O.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){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+"°";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/x),M)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.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 U=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){U.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){X.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 T=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){T.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){X.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 aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,M){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,M,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(M.x/ia-V.x);V=this.roundLength(M.y/ia-V.y);var oa=this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');@@ -2736,11 +2736,11 @@ mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=ththis.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=M&&(Q=Math.max(Q,M.y+M.height)),this.linkHint.style.left=x.x+x.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Za=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Za.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();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 La=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(La.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=-function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.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(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function O(){mxCylinder.call(this)}function R(){mxShape.call(this)}-function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function J(){mxActor.call(this)}function ea(){mxActor.call(this)}function da(){mxActor.call(this)}function ca(d,n){this.canvas=d;this.canvas.setLineJoin("round");+function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.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(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function R(){mxShape.call(this)}+function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function J(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(){mxActor.call(this)}function ca(d,n){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ca.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ca.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ca.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ca.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function ma(){mxActor.call(this)}function Y(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function T(){mxEllipse.call(this)}-function P(){mxShape.call(this)}function U(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);+mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function la(){mxActor.call(this)}function Y(){mxActor.call(this)}function ma(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function U(){mxEllipse.call(this)}+function O(){mxShape.call(this)}function T(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Aa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Za(){mxActor.call(this)}function La(){mxActor.call(this)}function $a(){mxActor.call(this)}function Da(){mxActor.call(this)}function x(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,fa,L,va){E+=L;var na=q.clone();q.x-=v*(2*E+L);q.y-=D*(2*E+L);v*=E+L;D*=E+L;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);va?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==@@ -2757,7 +2757,7 @@ p);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=functionn,(.5-Ya)*n),d.lineTo(.5*n,(1-Ya)*n)):(d.translate((q-n)/2,(v-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*Ya),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-Ya)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,v-n),d.curveTo(q,v+n/3,0,v+n/3,0,v-n),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(G,mxCylinder);G.prototype.size=30;G.prototype.darkOpacity=0;G.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(0,v);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),-d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(O,G);mxCellRenderer.registerShape("note2",O);O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=+d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(P,G);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=15;R.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*v);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,v-D);d.lineTo(.5*q,v);d.lineTo(0,v-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,v);d.stroke()};mxCellRenderer.registerShape("isoCube2",R);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",c);mxUtils.extend(f,mxCylinder);f.prototype.size=15;f.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D)):(d.moveTo(0,0),d.arcTo(.5*q,D,0,0,0,.5*q,D),d.arcTo(.5*q,D,@@ -2776,11 +2776,11 @@ q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",thifunction(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*n),0,0)}return null};f.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(n/=2);return new mxRectangle(0,Math.min(d.height*this.scale,2*n*this.scale),0,Math.max(0,.3*n*this.scale))}return null};t.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};z.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*-this.scale,0,0,0):null};O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,+this.scale,0,0,0):null};P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(d,-n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",J);mxUtils.extend(ea,mxActor);-ea.prototype.size=.5;ea.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ea);mxUtils.extend(da,mxActor);-da.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ca.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ca.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,+n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",J);mxUtils.extend(da,mxActor);+da.prototype.size=.5;da.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",da);mxUtils.extend(ea,mxActor);+ea.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ea);ca.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ca.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)};ca.prototype.quadTo=function(d,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ca.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ca.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ca.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),fa=this.defaultVariation;5>E&&(E=5,fa/=3);var L=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var va=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,L*D+this.lastX-va*v,y*D+this.lastY-va*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n};ca.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};var hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;@@ -2792,18 +2792,18 @@ D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,function(d,n,y,q,v){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,v*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+v);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",W);mxCellRenderer.registerShape("process2",W);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",-this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(ma,mxActor);ma.prototype.size=.2;ma.prototype.fixedSize=20;ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(d,+this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(0,v),new mxPoint(n,v/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",-ma);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,-0),new mxPoint(q-n,0),new mxPoint(q,.5*v),new mxPoint(q-n,v),new mxPoint(n,v),new mxPoint(0,.5*v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(la,mxRectangleShape);la.prototype.isHtmlAllowed=function(){return!1};la.prototype.paintForeground=function(d,n,y,q,v){var D=Math.min(q/5,v/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+v-D);d.moveTo(n+D,y+v/2);d.lineTo(n+q-D,y+v/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};-mxCellRenderer.registerShape("plus",la);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||+la);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,+0),new mxPoint(q-n,0),new mxPoint(q,.5*v),new mxPoint(q-n,v),new mxPoint(n,v),new mxPoint(0,.5*v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(ma,mxRectangleShape);ma.prototype.isHtmlAllowed=function(){return!1};ma.prototype.paintForeground=function(d,n,y,q,v){var D=Math.min(q/5,v/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+v-D);d.moveTo(n+D,y+v/2);d.lineTo(n+q-D,y+v/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};+mxCellRenderer.registerShape("plus",ma);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&(d.setShadow(!1),db.apply(this,[d,n,y,q,v]))}};mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};Z.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var D=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var fa=this.style["symbol"+D+"Align"],L=this.style["symbol"+D+"VerticalAlign"],va=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=fa==mxConstants.ALIGN_CENTER?bb+(q-va)/2:fa==mxConstants.ALIGN_RIGHT?bb+(q-va-Va):bb+Va;Ga=L==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:L==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();fa=new E;fa.style=this.style;E.prototype.paintVertexShape.call(fa,d,bb,Ga,va,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",Z);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,n,y,q,v,D){D?(d.moveTo(0,0),d.lineTo(q/2,v/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(0,v),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.ellipse(q/4,0,q/2,v/4);d.fillAndStroke();d.begin();d.moveTo(q/2,v/4);d.lineTo(q/2,2*v/3);d.moveTo(q/2,v/3);d.lineTo(0,v/3);d.moveTo(q/2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};I.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",-I);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",T);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(U,mxShape);-U.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};U.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};U.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(X,mxRectangleShape);X.prototype.size=+I);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(O,mxShape);O.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",O);mxUtils.extend(T,mxShape);+T.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};T.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};T.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(X,mxRectangleShape);X.prototype.size=40;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};X.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=X&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};X.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,D))};mxCellRenderer.registerShape("umlLifeline",X);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,@@ -2817,7 +2817,7 @@ mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAd=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?J.prototype.fixedSize:J.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa)]);va=d.getCenterX();d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",-mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?ma.prototype.fixedSize:ma.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,+mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?la.prototype.fixedSize:la.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,d),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,d),new mxPoint(E+L,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(na,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(na,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*@@ -2934,7 +2934,7 @@ d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectanMath.min(n.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),q=Math.max(1.5*aa.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,-"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,+"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ma.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Da.prototype.fixedSize:Da.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[jb(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));mxUtils.getValue(this.state.style,"base",ha.prototype.base);return new mxPoint(y.x+v*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ha.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["position2"],function(y){var q=@@ -2948,8 +2948,8 @@ return new mxPoint(n.x+(n.width+y)/2,n.y+q)},function(n,y){this.state.style.dx=MMath.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(n.x+3*n.width/4,n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},tape:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));-return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(ma.prototype.size,!0,null,-!0,ma.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(ea.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=+return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(la.prototype.size,!0,null,+!0,la.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(da.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=ib[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=ib[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=ib[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(zb),Math.sin(zb));var rb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,fa=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==fa&&null!=n&&(fa=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var L=sb.x,va=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=fa){d=function(Ga,Ka,Ja){Ga-=bb.x;var Ia=Ka-bb.y;Ka=(Va*Ga-na*Ia)/(L*Va-va*na);Ga=(va*Ga-L*Ia)/(va*na-L*Va);fb?@@ -2961,7 +2961,7 @@ new mxElbowEdgeHandler(d);y.snapToTerminals=!1;return y}return Cb.apply(this,arg0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-q)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-q)));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};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))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.getConstraints=+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;ma.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y+q)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};C.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y+q)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,@@ -2983,7 +2983,7 @@ mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05.5),!1)];Ba.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)];l.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)];F.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)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,+[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)];la.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)];ja.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,@@ -3004,72 +3004,72 @@ mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),n0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};X.prototype.constraints=null;x.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)];M.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)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.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(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.cellLabelChanged(G[O],"")}finally{p.getModel().endUpdate()}}}function g(G,O,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,-l));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,O,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var m=this.editorUi,u=m.editor,p=u.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),-function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,O=p.container.scrollLeft,R=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(O-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&-p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,O){try{var R=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(R.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=+Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),P=0;P<G.length;P++)p.cellLabelChanged(G[P],"")}finally{p.getModel().endUpdate()}}}function g(G,P,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,+l));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var m=this.editorUi,u=m.editor,p=u.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),+function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,P=p.container.scrollLeft,R=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(P-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&+p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,P){try{var R=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(R.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=B;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var G=new EditDiagramDialog(m);m.showDialog(G.container,620,420,!0,!1);G.init()}).isEnabled=B;this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,-320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=m.copyXml(),null!=G&&p.removeCells(G,!1)}catch(O){}try{null==-G&&mxClipboard.cut(p)}catch(O){m.handleError(O)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){m.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(O){if(null!=O){p.getModel().beginUpdate();try{m.pasteXml(O,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),-G=!0)}catch(O){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function O(c){if(null!=c){for(var f=!0,l=0;l<c.length&&f;l++)f=f&&p.model.isEdge(c[l]);var t=p.view.translate;l=p.view.scale;var z=t.x,C=t.y;t=null;if(1==c.length&&f){var F=p.getCellGeometry(c[0]);null!=F&&(t=F.getTerminalPoint(!0))}t=null!=t?t:p.getBoundingBoxFromGeometry(c,f);null!=t&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/l-z)),l=Math.round(p.snap(p.popupMenuHandler.triggerY/-l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function R(){p.getModel().beginUpdate();try{O(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{O(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else R()}),G=!0)}catch(c){}G||R()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],-G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),O=0;O<G.length;O++)if(p.getModel().isVertex(G[O])){var R=p.getCellGeometry(G[O]);-null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(G[O],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),-mxUtils.bind(this,function(O){m.handleError(O)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(O){m.handleError(O)}))}catch(O){m.handleError(O)}});this.addAction("pasteData",function(G,O){function R(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=O?O:G;var c=-p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)R(c.getRoot(),m.copiedValue);else for(O=0;O<f.length;O++)R(f[O],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,O){G=null!=O?O:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",+320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=m.copyXml(),null!=G&&p.removeCells(G,!1)}catch(P){}try{null==+G&&mxClipboard.cut(p)}catch(P){m.handleError(P)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){m.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(P){if(null!=P){p.getModel().beginUpdate();try{m.pasteXml(P,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),+G=!0)}catch(P){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function P(c){if(null!=c){for(var f=!0,l=0;l<c.length&&f;l++)f=f&&p.model.isEdge(c[l]);var t=p.view.translate;l=p.view.scale;var z=t.x,C=t.y;t=null;if(1==c.length&&f){var F=p.getCellGeometry(c[0]);null!=F&&(t=F.getTerminalPoint(!0))}t=null!=t?t:p.getBoundingBoxFromGeometry(c,f);null!=t&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/l-z)),l=Math.round(p.snap(p.popupMenuHandler.triggerY/+l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function R(){p.getModel().beginUpdate();try{P(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{P(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else R()}),G=!0)}catch(c){}G||R()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],+G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),P=0;P<G.length;P++)if(p.getModel().isVertex(G[P])){var R=p.getCellGeometry(G[P]);+null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(G[P],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),+mxUtils.bind(this,function(P){m.handleError(P)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(P){m.handleError(P)}))}catch(P){m.handleError(P)}});this.addAction("pasteData",function(G,P){function R(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=P?P:G;var c=+p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)R(c.getRoot(),m.copiedValue);else for(P=0;P<f.length;P++)R(f[P],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,P){G=null!=P?P:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(G){m.handleError(G)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var G=m.getSelectionState();if(null!=G.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",G.rowspan,[G.mergeCell]),p.setCellStyles("colspan",-G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=m.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,O){G=null!=O?O:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),+G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=m.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,P){G=null!=P?P:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=G?mxEvent.isShiftDown(G):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(G){G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.addSelectionCells(p.getEdges(G))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,-!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),O=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(O,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,+!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,G);p.setCellStyles(mxConstants.STYLE_DELETABLE,R,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,R,G);p.setCellStyles("locked",1==R?0:1,G);p.setCellStyles("connectable",R,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(G){p.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(G){p.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(p.isEnabled()){var G=mxUtils.sortCells(p.getSelectionCells(),!0);1!=G.length||p.isTable(G[0])||p.isTableRow(G[0])?(G=p.getCellsForGroup(G),1<G.length&&p.setSelectionCell(p.groupCells(null,0,G))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",-function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var O=p.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)p.model.contains(G[R])&&(0==p.model.getChildCount(G[R])&&p.model.isVertex(G[R])&&p.setCellStyles("container","0",[G[R]]),O.push(G[R]))}finally{p.model.endUpdate()}0<O.length&&p.setSelectionCells(O)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var O=-[],R=0;R<G.length;R++)p.isTableRow(G[R])||p.isTableCell(G[R])||O.push(G[R]);p.removeCellsFromParent(O);0<O.length&&p.scrollCellToVisible(O[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var O=-"";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(O=R)}O=new TextareaDialog(m,mxResources.get("editTooltip")+":",O,function(c){p.setTooltipForCell(G,c)});m.showDialog(O.container,320,200,!0,!0);O.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());-null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var O=p.getLinkForCell(G,!0)||"";m.showLinkDialog(O,mxResources.get("ok"),function(R,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<R.length?R:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&-!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,O,R){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=O&&0<O.length&&(c=O[0].iconUrl,f=O[0].name||O[0].type,f=f.charAt(0).toUpperCase()+-f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));O=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));O.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([O],!0));O.geometry.x=c.x;O.geometry.y=c.y;p.setAttributeForCell(O,"linkTarget",R);p.setLinkForCell(O,G);p.cellSizeUpdated(O,!0);p.getModel().beginUpdate();try{O=p.addCell(O),-p.fireEvent(new mxEventObject("cellsInserted","cells",[O]))}finally{p.getModel().endUpdate()}p.setSelectionCell(O);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),O=p.getParentByName(G,"A",p.cellEditor.textarea),R="";if(null==O&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==O;f++)c[f].textContent==-G.textContent&&(O=c[f]);null!=O&&"A"==O.nodeName&&(R=O.getAttribute("href")||"",p.selectNode(O));var l=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=-G[O];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var O=p.getEditableCells(p.getSelectionCells()),-R=0;R<O.length;R++)if(state=p.getView().getState(O[R]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[O[R]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[O[R]])}}m.fireEvent(new mxEventObject("styleChanged",-"keys",["html"],"values",[null!=G?G:"0"],"cells",O))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),O="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(O=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,O)});this.addAction("rotation",function(){var G="0",O=p.getView().getState(p.getSelectionCell());null!=O&&(G=O.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(m,G,mxResources.get("apply"),+function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var P=p.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)p.model.contains(G[R])&&(0==p.model.getChildCount(G[R])&&p.model.isVertex(G[R])&&p.setCellStyles("container","0",[G[R]]),P.push(G[R]))}finally{p.model.endUpdate()}0<P.length&&p.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var P=+[],R=0;R<G.length;R++)p.isTableRow(G[R])||p.isTableCell(G[R])||P.push(G[R]);p.removeCellsFromParent(P);0<P.length&&p.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=+"";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(P=R)}P=new TextareaDialog(m,mxResources.get("editTooltip")+":",P,function(c){p.setTooltipForCell(G,c)});m.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());+null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=p.getLinkForCell(G,!0)||"";m.showLinkDialog(P,mxResources.get("ok"),function(R,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<R.length?R:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&+!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,P,R){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=P&&0<P.length&&(c=P[0].iconUrl,f=P[0].name||P[0].type,f=f.charAt(0).toUpperCase()++f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));P=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));P.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([P],!0));P.geometry.x=c.x;P.geometry.y=c.y;p.setAttributeForCell(P,"linkTarget",R);p.setLinkForCell(P,G);p.cellSizeUpdated(P,!0);p.getModel().beginUpdate();try{P=p.addCell(P),+p.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{p.getModel().endUpdate()}p.setSelectionCell(P);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),P=p.getParentByName(G,"A",p.cellEditor.textarea),R="";if(null==P&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==P;f++)c[f].textContent==+G.textContent&&(P=c[f]);null!=P&&"A"==P.nodeName&&(R=P.getAttribute("href")||"",p.selectNode(P));var l=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=+G[P];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var P=p.getEditableCells(p.getSelectionCells()),+R=0;R<P.length;R++)if(state=p.getView().getState(P[R]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[P[R]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[P[R]])}}m.fireEvent(new mxEventObject("styleChanged",+"keys",["html"],"values",[null!=G?G:"0"],"cells",P))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),P="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,P)});this.addAction("rotation",function(){var G="0",P=p.getView().getState(p.getSelectionCell());null!=P&&(G=P.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(m,G,mxResources.get("apply"),function(R){null!=R&&0<R.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){p.pageVisible&&p.isSelectionEmpty()?p.fitPages():m.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(2):this.get("pageView").funct()}),-null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(O){O=parseInt(O);!isNaN(O)&&0<O&&p.zoomTo(O/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,-300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(O){O=parseInt(O);!isNaN(O)&&0<O&&(O=new ChangePageSetup(m,null,null,null,O/100),O.ignoreColor=!0,O.ignoreImage=!0,p.model.execute(O))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}));var H=null;H=this.addAction("grid",+null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&p.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,+300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(m,null,null,null,P/100),P.ignoreColor=!0,P.ignoreImage=!0,p.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}));var H=null;H=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.isGridEnabled()});H.setEnabled(!1);H=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});H.setEnabled(!1);H=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;m.fireEvent(new mxEventObject("enableAnimationsChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return Editor.enableAnimations});H=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});H=this.addAction("collapseExpand",function(){var G=new ChangePageSetup(m);G.ignoreColor=!0;G.ignoreImage=!0;G.foldingEnabled=!p.foldingEnabled;p.model.execute(G)});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.foldingEnabled});H.isEnabled=B;H=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return p.pageVisible});H=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionArrowsEnabled});H=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});H=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());m.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});H.isEnabled=B;H=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});H.setToggleAction(!0);H.setSelectedCallback(function(){return m.editor.autosave});H.isEnabled=B;H.visible=!1;this.addAction("help",function(){var G="";mxResources.isLanguageSupported(mxClient.language)&&-(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));H=mxUtils.bind(this,function(G,O,R,c){return this.addAction(G,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,-O,f);(O&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(f,function(t){t.style.fontWeight=null;"B"==t.nodeName&&p.replaceElement(t)}):(O&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(t){t.style.fontStyle=null;"I"==t.nodeName&&p.replaceElement(t)}):(O&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(t){t.style.textDecoration=null;"U"==t.nodeName&&p.replaceElement(t)});for(var l=0;l<f.length;l++)0==p.model.getChildCount(f[l])&&+(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));H=mxUtils.bind(this,function(G,P,R,c){return this.addAction(G,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,+P,f);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(f,function(t){t.style.fontWeight=null;"B"==t.nodeName&&p.replaceElement(t)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(t){t.style.fontStyle=null;"I"==t.nodeName&&p.replaceElement(t)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(t){t.style.textDecoration=null;"U"==t.nodeName&&p.replaceElement(t)});for(var l=0;l<f.length;l++)0==p.model.getChildCount(f[l])&&p.autoSizeCell(f[l],!1)}finally{p.getModel().endUpdate()}}},null,null,c)});H("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");H("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");H("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",p.shapeForegroundColor)});this.addAction("strokeColor...",function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",p.shapeBackgroundColor)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,-"backcolor",null,"default",p.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("removeFormat",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&!p.isEditing()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.removeTextStyleForCell(G[O],!0)}finally{p.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,+"backcolor",null,"default",p.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("removeFormat",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&!p.isEditing()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),P=0;P<G.length;P++)p.removeTextStyleForCell(G[P],!0)}finally{p.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});-this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),O=p.getCurrentCellStyle(G[0]),-R="1"==mxUtils.getValue(O,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,-"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),O="1";null!=G&&null!=p.getFoldingImage(G)&&(O="0");p.setCellStyles("collapsible",O);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[O],"cells",p.getSelectionCells()))});this.addAction("editStyle...",-mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var O=p.getModel();O=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",O.getStyle(G[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),G)},null,null,400,220);this.editorUi.showDialog(O.container,420,300,!0,!0);O.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var O=u.graph.selectionCellsHandler.getHandler(G);if(O instanceof mxEdgeHandler){var R=p.view.translate,c=p.view.scale,f=R.x;R=R.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,R+=l.y,G=-p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-R));O.addPointAt(O.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=-G[O];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=G[O];if(p.getModel().isEdge(R)){var c=p.getCellGeometry(R);+this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(G[0]),+R="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,+"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),P="1";null!=G&&null!=p.getFoldingImage(G)&&(P="0");p.setCellStyles("collapsible",P);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",p.getSelectionCells()))});this.addAction("editStyle...",+mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var P=p.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(G[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),G)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var P=u.graph.selectionCellsHandler.getHandler(G);if(P instanceof mxEdgeHandler){var R=p.view.translate,c=p.view.scale,f=R.x;R=R.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,R+=l.y,G=+p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-R));P.addPointAt(P.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=+G[P];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=G[P];if(p.getModel().isEdge(R)){var c=p.getCellGeometry(R);null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(R,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,G-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,-mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",O=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=O&&(R=O.style[mxConstants.STYLE_IMAGE]||R,c=O.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();-m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ea=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ea.x;K[0].geometry.y=-ea.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var da=p.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var W=-p.getModel().getGeometry(ca);null!=W&&(W=W.clone(),W.width=t,W.height=z,p.getModel().setGeometry(ca,W))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var O=p.getCurrentCellStyle(G),R=O[mxConstants.STYLE_IMAGE],-c=O[mxConstants.STYLE_SHAPE];R&&"image"==c&&(O=new CropImageDialog(m,R,O[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(O.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",+mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=P&&(R=P.style[mxConstants.STYLE_IMAGE]||R,c=P.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();+m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var da=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=da.x;K[0].geometry.y=+da.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var ea=p.getCurrentCellStyle(K[0]);"image"!=ea[mxConstants.STYLE_SHAPE]&&"label"!=ea[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var W=+p.getModel().getGeometry(ca);null!=W&&(W=W.clone(),W.width=t,W.height=z,p.getModel().setGeometry(ca,W))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var P=p.getCurrentCellStyle(G),R=P[mxConstants.STYLE_IMAGE],+c=P[mxConstants.STYLE_SHAPE];R&&"image"==c&&(P=new CropImageDialog(m,R,P[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(P.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),-this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G&&null!=G.geometry){var O=-new ConnectionPointsDialog(m,G);m.showDialog(O.container,350,450,!0,!1,function(){O.destroy()});O.init()}},null,null,"Alt+Shift+Q").isEnabled=B};Actions.prototype.addAction=function(b,e,g,m,u){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,g,m,u))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};+this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G&&null!=G.geometry){var P=+new ConnectionPointsDialog(m,G);m.showDialog(P.container,350,450,!0,!1,function(){P.destroy()});P.init()}},null,null,"Alt+Shift+Q").isEnabled=B};Actions.prototype.addAction=function(b,e,g,m,u){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,g,m,u))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,g,m,u){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=g?g:!0;this.iconCls=m;this.shortcut=u;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;@@ -3080,24 +3080,24 @@ function(B){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,B))}),u,p):this.updDrawioFile.prototype.updateFile=function(b,e,g,m,u){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",u,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(p){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[p]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=p?this.mergeFile(p,b,e,m,u):this.reloadFile(b,e))}catch(B){null!=e&&e(B)}}),e))};DrawioFile.prototype.mergeFile=function(b,e,g,m,u){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=m?m:B,p)],S=this.ignorePatches(H);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var G=this.isModified()?this.ui.diffPages(B,-this.isRealtime()?this.ownPages:this.ui.pages):null,O=this.ui.patchPages(this.ui.clonePages(B),H[0]),R=this.ui.getHashValueForPages(O,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",O,"patches",H,"changes",G,"checksum",R,"current",c,"valid",R==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=R&&R!=c)this.checksumError(g,H,null,null,"mergeFile",+this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(B),H[0]),R=this.ui.getHashValueForPages(P,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",P,"patches",H,"changes",G,"checksum",R,"current",c,"valid",R==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=R&&R!=c)this.checksumError(g,H,null,null,"mergeFile",R,c,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var f=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?G:null,null,u);null==f||mxUtils.isEmptyObject(f)||H.push(f)}this.patch(H,DrawioFile.LAST_WRITE_WINS?G:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(z);try{var l=this.getCurrentUser(),t=null!=l?l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,z)}catch(C){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(z){null!=g&&g(z)}};DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var u=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,u,!0);g.appendChild(u)}return mxUtils.getPrettyXml(g)};DrawioFile.prototype.compressReportData=function(b,e,g){e=null!=e?e:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),G=null!=S?S.id:"unknown",O=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,c=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):+DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),G=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,c=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):null}this.getLatestVersion(mxUtils.bind(this,function(f){try{var l=null!=c?"report":"error",t=this.ui.getHashValueForPages(f.getShadowPages()),z="unknown",C="unknown",F="unknown";try{var N=null!=f.initialData&&0<f.initialData.length?mxUtils.parseXml(f.initialData).documentElement:null;null!=N&&(null!=N.getAttribute("version")&&(z=N.getAttribute("version")),null!=N.getAttribute("agent")&&(C=N.getAttribute("agent")),null!=N.getAttribute("type")&&(F=N.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+-l+" in "+u,null,this.getMode()+"."+O,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+O,action:u,label:"user_"++l+" in "+u,null,this.getMode()+"."+P,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:u,label:"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(f){}};-DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),O=G.lastIndexOf(".");B="xml";0<O&&(B=G.substring(O));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),P=G.lastIndexOf(".");B="xml";0<P&&(B=G.substring(P));var R=null!=g?g.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()+" ("+B+")\nUser="+H+S+"\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!=e?"\n\n"+e:"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+R+"\n\nShadow:\n"+u+"\n\nData:\n"+p,m)}catch(c){}};DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,u=m.getSelectionCells(),p=m.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[p],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),[g]),this.ui.restoreViewState(B,p,u),this.setDescriptor(H.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(B,p,u);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(H){null!=e&&e(H)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var g=0;g<b.length&&e;g++)e=e&&mxUtils.isEmptyObject(b[g]);return e};-DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,O=H.mathEnabled,R=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());R.apply(this,arguments)};H.model.beginUpdate();+DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,P=H.mathEnabled,R=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());R.apply(this,arguments)};H.model.beginUpdate();try{if(g){for(var c=this.ui.pages.slice(),f=this.ui.currentPage,l=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),t=0;t<l.length;t++){var z=mxUtils.indexOf(this.ui.pages,l[t]);0>z?this.ui.insertPage(l[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(z,t)}for(t=0;t<c.length;t++)0>mxUtils.indexOf(l,c[t])&&this.ui.removePage(c[t]);0<=mxUtils.indexOf(this.ui.pages,f)&&this.ui.selectPage(f,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,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);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)O!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?H.view.revalidate():H.view.validate(),H.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",g)}return b};DrawioFile.prototype.save=function(b,e,g,m,u,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",u,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=g)g({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=g)g(B);else throw B;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};@@ -3148,7 +3148,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=newmxUtils.bind(this,function(e){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",g);b(e,g)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};DrawioFile.prototype.fileSaved=function(b,e,g,m,u,p,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;p=null!=p?p:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,e,g,m,u,B)}catch(G){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}catch(O){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};+this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var u=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var p=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==p&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var B=this.isAutosaveRevision();B&&(this.lastAutosaveRevision=(new Date).getTime());this.save(B,mxUtils.bind(this,function(H){this.autosaveCompleted();null!=g&&g(H)}),mxUtils.bind(this,function(H){null!=m&&m(H)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}catch(H){null!=m&&m(H)}}),u);this.autosaveThread=p;EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"delay",b,"maxDelay",e,"actualDelay",u,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};@@ -3157,10 +3157,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(thisDrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,g){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,g,m,u,p,B){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=u;this.desc=p;this.editable=B};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,u){this.saveAs(this.title,e,g,m,u)};LocalFile.prototype.saveAs=function(b,e,g,m,u){this.saveFile(b,!1,e,g,null,m,u)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};-LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),O=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),P=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var c=mxUtils.bind(this,function(l){this.savingFile=!1;null!=m&&m({error:l})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);B||this.desc.lastModified==t.lastModified?l.write(H?this.ui.base64ToBlob(R,"image/png"):R).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var C=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(S,C,G,c);this.removeDraft()}catch(F){c(F)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;c(t)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(R,b,H?"image/png":"text/xml",H);else if(R.length<MAX_REQUEST_SIZE){var f=b.lastIndexOf(".");f=0<f?b.substring(f+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){O(R)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):O(S)};+(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){P(R)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):P(S)};LocalFile.prototype.rename=function(b,e,g){this.title=b;this.descriptorChanged();null!=e&&e()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";@@ -3241,34 +3241,34 @@ type:"bool",defVal:!1,isVisible:function(k,A){A=A.editorUi.editor.graph.model;redefVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\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, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#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,[email protected],default,#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,[email protected],default,#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,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';-Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var T=I.sets||[];I=I.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var U=T[P];switch(U.type){case "path":null!=I.stroke&&this._drawToContext(k,U,I);break;case "fillPath":this._drawToContext(k,U,I);break;case "fillSketch":this.fillSketch(k,U,I)}}};A.fillSketch=function(I,T,P){var U=k.state.strokeColor,X=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=P.fillWeight;-0>pa&&(pa=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,T,P);k.setDashed(ja);k.setStrokeWidth(X);k.setStrokeColor(U);k.setStrokeAlpha(aa)};A._drawToContext=function(I,T,P){I.begin();for(var U=0;U<T.ops.length;U++){var X=T.ops[U],aa=X.data;switch(X.op){case "move":I.moveTo(aa[0],aa[1]);break;case "bcurveTo":I.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":I.lineTo(aa[0],aa[1])}}I.end();-"fillPath"===T.type&&P.filled?I.fill():I.stroke()};return A};(function(){function k(U,X,aa){this.canvas=U;this.rc=X;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;+Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var U=I.sets||[];I=I.options||this.getDefaultOptions();for(var O=0;O<U.length;O++){var T=U[O];switch(T.type){case "path":null!=I.stroke&&this._drawToContext(k,T,I);break;case "fillPath":this._drawToContext(k,T,I);break;case "fillSketch":this.fillSketch(k,T,I)}}};A.fillSketch=function(I,U,O){var T=k.state.strokeColor,X=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=O.fillWeight;+0>pa&&(pa=O.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(O.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,U,O);k.setDashed(ja);k.setStrokeWidth(X);k.setStrokeColor(T);k.setStrokeAlpha(aa)};A._drawToContext=function(I,U,O){I.begin();for(var T=0;T<U.ops.length;T++){var X=U.ops[T],aa=X.data;switch(X.op){case "move":I.moveTo(aa[0],aa[1]);break;case "bcurveTo":I.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":I.lineTo(aa[0],aa[1])}}I.end();+"fillPath"===U.type&&O.filled?I.fill():I.stroke()};return A};(function(){function k(T,X,aa){this.canvas=T;this.rc=X;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,-k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(U,X){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=U?this.canvas.state.strokeColor===-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;U=null;(aa.filled=X)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(T,X){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=T?this.canvas.state.strokeColor===+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;T=null;(aa.filled=X)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);X=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==X?-1:X;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",X);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",X);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",X);X=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==X?-1:X;X=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==X&&(X="auto");"auto"==X&&(X=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&X.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&X.push(mxUtils.hex2rgb(Editor.darkColor)),X=-null!=aa.fill&&(null!=U||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=X;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],-this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(U,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,U,X),this.lastX=U,this.lastY=X)};k.prototype.moveTo=function(U,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,X),this.lastX=U,this.lastY=X,this.firstX=U,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,-arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(U,X,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,X,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(U,X,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,X,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(U,X,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);-else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,U,X,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(U,X,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,X,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(U,X,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,-arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+aa/2,X+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(U,X,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(U+pa,X),this.lineTo(U+aa-pa,X),this.quadTo(U+aa,X,U+aa,X+sa),this.lineTo(U+aa,X+ja-sa),this.quadTo(U+aa,X+ja,U+aa-pa,X+ja),this.lineTo(U+pa,X+ja),this.quadTo(U,X+ja,U,X+ja-sa),this.lineTo(U,X+sa),this.quadTo(U,X,U+pa,X))};k.prototype.drawPath=function(U){if(0<-this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var X in U)this.nextShape.options[X]=U[X];U.stroke!=mxConstants.NONE&&null!=U.stroke||delete this.nextShape.options.stroke;U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,+null!=aa.fill&&(null!=T||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=X;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(T,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,X),this.lastX=T,this.lastY=X)};k.prototype.moveTo=function(T,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,X),this.lastX=T,this.lastY=X,this.firstX=T,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(T,X,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,X,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(T,X,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,X,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(T,X,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);+else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,T,X,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(T,X,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,X,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(T,X,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+aa/2,X+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(T,X,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+pa,X),this.lineTo(T+aa-pa,X),this.quadTo(T+aa,X,T+aa,X+sa),this.lineTo(T+aa,X+ja-sa),this.quadTo(T+aa,X+ja,T+aa-pa,X+ja),this.lineTo(T+pa,X+ja),this.quadTo(T,X+ja,T,X+ja-sa),this.lineTo(T,X+sa),this.quadTo(T,X,T+pa,X))};k.prototype.drawPath=function(T){if(0<+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var X in T)this.nextShape.options[X]=T[X];T.stroke!=mxConstants.NONE&&null!=T.stroke||delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.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(U){return new k(U,Editor.createRoughCanvas(U),this)};var A=mxShape.prototype.createHandJiggle;-mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(U):this.createRoughCanvas(U)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,X,aa,ja,pa){null!=U.handJiggle&&U.handJiggle.passThrough||I.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=-function(U){var X=U.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==k&&!this.outline){U.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=U.setStrokeColor;U.setStrokeColor=function(){};var wa=U.setFillColor;U.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;T.apply(this,-arguments);U.handJiggle.passThrough=!1;U.setFillColor=wa;U.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;U.restore();aa&&null!=ja&&(U.addTolerance=function(){})}T.apply(this,arguments);U.addTolerance=X};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(U,X,aa,ja,pa,sa){null!=U.handJiggle&&U.handJiggle.constructor==k?(U.handJiggle.passThrough=!0,P.apply(this,arguments),U.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=-function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var T=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var U=0;U<T.length;U++)if("mxgraph"==T[U].getAttribute("class")){P.push(T[U]);-break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,I),0<T.length&&(k=mxUtils.parseXml(T),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(T=k.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&-(T=decodeURIComponent(T)),null!=T&&0<T.length)k=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(T=k.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);-var T=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<T.length?(A=Graph.decompress(T,null,A),null!=A&&0<A.length&&(P=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],I&&(P=Editor.parseDiagramNode(P,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(P,!0)),P=A.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),-null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var T=k.indexOf("stream",-I)+9;if(0<k.substring(I,T).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",T-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){T=k.indexOf("stream",I)+9;P=k.indexOf("endstream",T-1);T=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"});P=T.indexOf("/Subject <");if(0<P){I=T.substring(P+14,T.indexOf(">",P));if(null!=I){A=I;I=[];for(T=0;T<A.length;T+=2)P=A.substr(T,2),"00"!=P&&I.push(String.fromCharCode(parseInt(P,-16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";P=T=0;for(var U=[],X=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(I+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ja=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ja>P){A=k.substring(P,ja);break}}10==aa&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],U[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==A&&null!=-U&&(A=Editor.extractGraphModelFromXref(U));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=+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(T){return new k(T,Editor.createRoughCanvas(T),this)};var A=mxShape.prototype.createHandJiggle;+mxShape.prototype.createHandJiggle=function(T){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,X,aa,ja,pa){null!=T.handJiggle&&T.handJiggle.passThrough||I.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=+function(T){var X=T.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==k&&!this.outline){T.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=T.setStrokeColor;T.setStrokeColor=function(){};var wa=T.setFillColor;T.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;U.apply(this,+arguments);T.handJiggle.passThrough=!1;T.setFillColor=wa;T.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;T.restore();aa&&null!=ja&&(T.addTolerance=function(){})}U.apply(this,arguments);T.addTolerance=X};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,X,aa,ja,pa,sa){null!=T.handJiggle&&T.handJiggle.constructor==k?(T.handJiggle.passThrough=!0,O.apply(this,arguments),T.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),O=[];if(null!=U&&0<U.length)for(var T=0;T<U.length;T++)if("mxgraph"==U[T].getAttribute("class")){O.push(U[T]);+break}0<O.length&&(U=O[0].getAttribute("data-mxgraph"),null!=U?(O=JSON.parse(U),null!=O&&null!=O.xml&&(k=mxUtils.parseXml(O.xml),k=k.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(U=mxUtils.getTextContent(O[0]),U=Graph.decompress(U,null,I),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&+(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(O=null,"diagram"==k.nodeName?O=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(O=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=O&&(k=Editor.parseDiagramNode(O,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);+var U=mxUtils.trim(mxUtils.getTextContent(k)),O=null;0<U.length?(A=Graph.decompress(U,null,A),null!=A&&0<A.length&&(O=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(O=k[0],I&&(O=Editor.parseDiagramNode(O,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(O,!0)),O=A.documentElement));return O};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),+null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var U=k.indexOf("stream",+I)+9;if(0<k.substring(I,U).indexOf("application#2Fvnd.jgraph.mxfile")){var O=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,O)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){U=k.indexOf("stream",I)+9;O=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,O)),{to:"string"});O=U.indexOf("/Subject <");if(0<O){I=U.substring(O+14,U.indexOf(">",O));if(null!=I){A=I;I=[];for(U=0;U<A.length;U+=2)O=A.substr(U,2),"00"!=O&&I.push(String.fromCharCode(parseInt(O,+16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";O=U=0;for(var T=[],X=null;O<k.length;){var aa=k.charCodeAt(O);O+=1;10!=aa&&(I+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=k.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(ja>O){A=k.substring(O,ja);break}}10==aa&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],T[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==A&&null!=+T&&(A=Editor.extractGraphModelFromXref(T));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(I=mxUtils.getTextContent(A[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&@@ -3284,52 +3284,52 @@ k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight)(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));-A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var T=k[I].indexOf(")");T=Editor.trimCssUrl(k[I].substring(0,T));var P=document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");A.parentNode.insertBefore(P,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";+A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var U=k[I].indexOf(")");U=Editor.trimCssUrl(k[I].substring(0,U));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",U);O.setAttribute("as","font");O.setAttribute("crossorigin","");A.parentNode.insertBefore(O,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],I=0;I<k;I++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+-" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(T=new mxCodec(I.ownerDocument),T.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var T=new mxCodec(I.ownerDocument);-T.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==-k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),I=0;I<A.length;I++)this.graph.addExtFont(A[I].name,A[I].url)}catch(P){console.log("ExtFonts format error: "+P.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(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=T&&I.setAttribute("backgroundImage",JSON.stringify(T));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",-this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),I.setAttribute("extFonts",T.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),-null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){T=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());-else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var T=null;Editor.doMathJaxRender=function(X){try{null==T?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):T!=X&&Editor.mathJaxQueue.push(X)}catch(aa){MathJax.typesetClear([X]),null!=aa.retry?(T=X,aa.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());I()})})["catch"](function(ja){console.log("Error in MathJax.retry: "++" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(U=new mxCodec(I.ownerDocument),U.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var U=new mxCodec(I.ownerDocument);+U.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==+k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),I=0;I<A.length;I++)this.graph.addExtFont(A[I].name,A[I].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(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=U&&I.setAttribute("backgroundImage",JSON.stringify(U));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",+this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),I.setAttribute("extFonts",U.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),+null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&+this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());+else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=function(X){try{null==U?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):U!=X&&Editor.mathJaxQueue.push(X)}catch(aa){MathJax.typesetClear([X]),null!=aa.retry?(U=X,aa.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());I()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+ja.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var X=0;X<Editor.mathJaxQueue.length;X++)Editor.doMathJaxRender(Editor.mathJaxQueue[X])}}};Editor.MathJaxRender=function(X){"undefined"!==typeof MathJax&&-"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var X=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var U=-document.createElement("script");U.setAttribute("type","text/javascript");U.setAttribute("src",k);A[0].parentNode.appendChild(U)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],T=0,P=!0,U;k=$jscomp.makeIterator(k);for(U=k.next();!U.done;U=k.next())U=U.value,'"'===U?(P&&U===A&&(I[T]+=U),P=!P):","===U&&P?U=I[++T]="":I[T]+=U,A=U;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&+"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var O=Editor.prototype.init;Editor.prototype.init=function(){O.apply(this,arguments);var X=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var T=+document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",k);A[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],U=0,O=!0,T;k=$jscomp.makeIterator(k);for(T=k.next();!T.done;T=k.next())T=T.value,'"'===T?(O&&T===A&&(I[U]+=T),O=!O):","===T&&O?T=I[++U]="":I[U]+=T,A=T;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.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(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(T){null!=T&&navigator.onLine&&("http://"!=T.substring(0,7)&&"https://"!=T.substring(0,8)||T.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&-I.isCorsEnabledForUrl(T)?"chrome-extension://"!=T.substring(0,19)&&(T=A.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T));return T};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,T,P){try{var U=!0,X=window.setTimeout(mxUtils.bind(this,function(){U=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=T?this.convertImageToDataUri(k,A,I,T,!0):A(k)});-if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(X);U&&(200>pa.getStatus()||299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);U&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(X);if(U)try{T=null!=T&&P?T:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(T,T);pa.height=ja.height*T;pa.width=-ja.width*T;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(X);U&&(null!=I?I():A(k))};ja.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,T){function P(){0<U.length?U.shift()():A(k)}null==T&&(T=this.createImageUrlConverter());var U=[],X=I||{};I=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){U.push(mxUtils.bind(this,function(){try{if(null!=-sa){var qa=T.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=X[qa];null==wa?this.convertImageToDataUri(qa,function(Ba){null!=Ba&&(X[qa]=Ba,sa.setAttribute(ja,Ba));P()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),P())}else null!=qa&&sa.setAttribute(ja,qa),P()}}catch(Ba){P()}}))})(aa[pa])});I("image","xlink:href");I("img","src");P()};Editor.base64Encode=function(k){for(var A="",I=0,T=k.length,P,U,X;I<T;){P=k.charCodeAt(I++)&255;if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>-2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);A+="==";break}U=k.charCodeAt(I++);if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);A+="=";break}X=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>-2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(X&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return A};Editor.prototype.loadUrl=function(k,A,I,T,P,U,X,aa){try{var ja=!X&&(T||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var pa=mxUtils.bind(this,-function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}U=null!=U?U:"data:image/png;base64,";qa=U+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?-I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){P&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),T=JSON.parse(I);-null!=T&&null!=T.error&&null!=T.error.message&&(A=T.error.message+" ("+A+")")}catch(P){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var T=null!=k?k.lastIndexOf("/"):-1;0<=T&&(k=k.substring(0,T+1));T=document.getElementsByTagName("base");var P=null;null!=T&&0<T.length&&(P=T[0].getAttribute("href"));for(var U=1;U<I.length;U++)if(T=I[U].indexOf(")"),0<T){var X=Editor.trimCssUrl(I[U].substring(0,-T));this.graph.isRelativeUrl(X)&&(X=null!=P?P+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);A.push('url("'+X+'"'+I[U].substring(T))}else A.push(I[U])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=-mxUtils.bind(this,function(){if(0==T){for(var ja=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);ja.push('"'+I[pa].substring(sa))}A(ja.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var U=I[k].indexOf(")"),X=null,aa=I[k].indexOf("format(",U);0<aa&&(X=Editor.trimCssUrl(I[k].substring(aa+7,I[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;T++;+return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&+I.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=A.apply(this,arguments)):U=PROXY_URL+"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,U,O){try{var T=!0,X=window.setTimeout(mxUtils.bind(this,function(){T=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(k,A,I,U,!0):A(k)});+if(/(\.svg)$/i.test(k)&&!O)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(X);T&&(200>pa.getStatus()||299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);T&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(X);if(T)try{U=null!=U&&O?U:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(U,U);pa.height=ja.height*U;pa.width=+ja.width*U;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(X);T&&(null!=I?I():A(k))};ja.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,U){function O(){0<T.length?T.shift()():A(k)}null==U&&(U=this.createImageUrlConverter());var T=[],X=I||{};I=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){T.push(mxUtils.bind(this,function(){try{if(null!=+sa){var qa=U.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=X[qa];null==wa?this.convertImageToDataUri(qa,function(Ba){null!=Ba&&(X[qa]=Ba,sa.setAttribute(ja,Ba));O()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),O())}else null!=qa&&sa.setAttribute(ja,qa),O()}}catch(Ba){O()}}))})(aa[pa])});I("image","xlink:href");I("img","src");O()};Editor.base64Encode=function(k){for(var A="",I=0,U=k.length,O,T,X;I<U;){O=k.charCodeAt(I++)&255;if(I==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);A+="==";break}T=k.charCodeAt(I++);if(I==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);A+="=";break}X=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(X&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return A};Editor.prototype.loadUrl=function(k,A,I,U,O,T,X,aa){try{var ja=!X&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));O=null!=O?O:!0;var pa=mxUtils.bind(this,+function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}T=null!=T?T:"data:image/png;base64,";qa=T+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?+I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){O&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),U=JSON.parse(I);+null!=U&&null!=U.error&&null!=U.error.message&&(A=U.error.message+" ("+A+")")}catch(O){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var O=null;null!=U&&0<U.length&&(O=U[0].getAttribute("href"));for(var T=1;T<I.length;T++)if(U=I[T].indexOf(")"),0<U){var X=Editor.trimCssUrl(I[T].substring(0,+U));this.graph.isRelativeUrl(X)&&(X=null!=O?O+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);A.push('url("'+X+'"'+I[T].substring(U))}else A.push(I[T])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var O=+mxUtils.bind(this,function(){if(0==U){for(var ja=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);ja.push('"'+I[pa].substring(sa))}A(ja.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var T=I[k].indexOf(")"),X=null,aa=I[k].indexOf("format(",T);0<aa&&(X=Editor.trimCssUrl(I[k].substring(aa+7,I[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;var pa="application/x-font-ttf";if("svg"==X||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";else if("otf"==X||"embedded-opentype"==X||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==X||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==X||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==X||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==X||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,-ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=wa;T--;P()}),mxUtils.bind(this,function(wa){T--;P()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,U)),X)}P()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=-function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(I.join(""),k)}),U=0;U<A.length;U++)mxUtils.bind(this,function(X,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(T++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),-mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;I.push(ja+"\n");T--;P()}),mxUtils.bind(this,function(ja){T--;I.push("@import url("+aa+");\n");P()}))):I.push(this.cachedGoogleFonts[aa]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+aa+'")}\n')})(A[U].name,A[U].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var T=mxUtils.getTextContent(A[I]);-0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),T=A.split("\n");A=[];for(var P=[],U=0;U<T.length;U++)"@import"==T[U].substring(0,7)?A.push(T[U]):P.push(T[U]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,-A.join("\n")),I.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,P.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var T=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(T/k,T/A))};Editor.prototype.exportToCanvas=function(k,A,I,T,P,U,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{U=null!=U?U:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;wa=null!=-wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ja&&(Ca="dark"==Ea&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,X,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),-La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&(aa=U?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));-x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=P&&P(Xa)}};ua.onerror=function(Fa){null!=P&&P(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=P&&P(Fa)}});Ha.onerror=-function(Ra){null!=P&&P(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=P&&P(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=P&&P(Za)}}))}catch(Ra){null!=P&&P(Ra)}}),I,sa)}catch(Ma){null!=P&&P(Ma)}};Editor.crcTable=-[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,T){for(var P=0;P<T;P++)k=Editor.crcTable[(k^A.charCodeAt(I+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,T,P){function U(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function X(sa){sa=U(sa,4);return sa.charCodeAt(3)+-(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(U(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(U(k,4),"IHDR"!=U(k,4))null!=P&&P();else{U(k,17);P=k.substring(0,ja);do{var pa=X(k);if("IDAT"==U(k,4)){P=k.substring(0,ja-8);"pHYs"==A&&"dpi"==I?(I=Math.round(T/.0254),I=aa(I)+-aa(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,A,0,4);T=Editor.updateCRC(T,I,0,I.length);P+=aa(I.length)+A+I+aa(T^4294967295);P+=k.substring(ja-8,k.length);break}P+=k.substring(ja-8,ja-4+pa);U(k,pa);U(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;+ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=wa;U--;O()}),mxUtils.bind(this,function(wa){U--;O()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,T)),X)}O()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=+function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(I.join(""),k)}),T=0;T<A.length;T++)mxUtils.bind(this,function(X,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),+mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;I.push(ja+"\n");U--;O()}),mxUtils.bind(this,function(ja){U--;I.push("@import url("+aa+");\n");O()}))):I.push(this.cachedGoogleFonts[aa]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+aa+'")}\n')})(A[T].name,A[T].url);O()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var U=mxUtils.getTextContent(A[I]);+0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),U=A.split("\n");A=[];for(var O=[],T=0;T<U.length;T++)"@import"==U[T].substring(0,7)?A.push(U[T]):O.push(U[T]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,+A.join("\n")),I.appendChild(k));0<O.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,O.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var U=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(U/k,U/A))};Editor.prototype.exportToCanvas=function(k,A,I,U,O,T,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{T=null!=T?T:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;wa=null!=+wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==Ca&&0==ja&&(Ca="dark"==Ea&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,X,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),+La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&(aa=T?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));+x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=O&&O(Xa)}};ua.onerror=function(Fa){null!=O&&O(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=O&&O(Fa)}});Ha.onerror=+function(Ra){null!=O&&O(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=O&&O(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=O&&O(Za)}}))}catch(Ra){null!=O&&O(Ra)}}),I,sa)}catch(Ma){null!=O&&O(Ma)}};Editor.crcTable=+[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,U){for(var O=0;O<U;O++)k=Editor.crcTable[(k^A.charCodeAt(I+O))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,U,O){function T(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function X(sa){sa=T(sa,4);return sa.charCodeAt(3)++(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(T(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(T(k,4),"IHDR"!=T(k,4))null!=O&&O();else{T(k,17);O=k.substring(0,ja);do{var pa=X(k);if("IDAT"==T(k,4)){O=k.substring(0,ja-8);"pHYs"==A&&"dpi"==I?(I=Math.round(U/.0254),I=aa(I)++aa(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+U;U=4294967295;U=Editor.updateCRC(U,A,0,4);U=Editor.updateCRC(U,I,0,I.length);O+=aa(I.length)+A+I+aa(U^4294967295);O+=k.substring(ja-8,k.length);break}O+=k.substring(ja-8,ja-4+pa);T(k,pa);T(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var I=null;null!=k.editor.graph.getModel().getParent(A)?I=A.getId():null!=k.currentPage&&(I=k.currentPage.getId());-return I});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var O=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?O.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||-"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var T=A.getCurrentFile();null!=T&&T.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(X){A.editor.setAutosave(X);A.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(X){this.listener=function(){X(A.editor.autosave)};-A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(X){A.actions.get("mathematicalTypesetting").funct()},{install:function(X){this.listener=function(){X(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});-k.appendChild(P);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var U=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");U.style.position="absolute";U.style.left="85%";P.appendChild(U)}}return k};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=+return I});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var 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.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||+"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var U=A.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(X){A.editor.setAutosave(X);A.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(X){this.listener=function(){X(A.editor.autosave)};+A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(X){A.actions.get("mathematicalTypesetting").funct()},{install:function(X){this.listener=function(){X(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});+k.appendChild(O);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var T=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");T.style.position="absolute";T.style.left="85%";O.appendChild(T)}}return k};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,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},@@ -3353,94 +3353,94 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispNamestroke:"#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(k,A,I,T){if(null!=A){var P=mxUtils.bind(this,function(X){if(null!=X)if(I)for(var aa=0;aa<X.length;aa++){if("function"!==typeof X[aa].isVisible||X[aa].isVisible(T,this))A[X[aa].name]=X[aa]}else for(var ja in A){var pa=!1;for(aa=0;aa<X.length;aa++)if(X[aa].name==ja&&X[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),U=this.editorUi.editor.graph.view.getState(k);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||-[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),P(U.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{P(JSON.parse(k))}catch(X){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&-!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,T=k.edges,P=0;P<I.length;P++)this.findCommonProperties(I[P],A,0==P,k);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],A,0==I.length&&0==P,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;-StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,T){function P(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=+function(k,A,I,U){if(null!=A){var O=mxUtils.bind(this,function(X){if(null!=X)if(I)for(var aa=0;aa<X.length;aa++){if("function"!==typeof X[aa].isVisible||X[aa].isVisible(U,this))A[X[aa].name]=X[aa]}else for(var ja in A){var pa=!1;for(aa=0;aa<X.length;aa++)if(X[aa].name==ja&&X[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),T=this.editorUi.editor.graph.view.getState(k);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||+[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),O(T.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{O(JSON.parse(k))}catch(X){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&+!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,U=k.edges,O=0;O<I.length;O++)this.findCommonProperties(I[O],A,0==O,k);for(O=0;O<U.length;O++)this.findCommonProperties(U[O],A,0==I.length&&0==O,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;+StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,U){function O(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<-M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function U(Da,+M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function T(Da,x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function X(Da,x,M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background=-"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){P(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=-"1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);P(Da,+"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){O(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=+"1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);O(Da,Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==-x;mxEvent.addListener(Q,"change",function(){P(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);+x;mxEvent.addListener(Q,"change",function(){O(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(X(Da,x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",-mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;U(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=-null;P(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",+mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;T(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=+null;O(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<-M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}P(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");U(xa,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,-"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){P(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className=+M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}O(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");T(xa,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,+"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){O(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className="geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat="no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage="url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";-Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==I.vertices.length&&0==I.edges.length?Ea=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Ea=I.edges[0].id);null==Ea||T||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(T=A[Ha],"function"!=typeof T.isVisible||T.isVisible(I,this)){var Aa=null!=T.getValue?T.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]+-""):null!=T.getDefaultValue?T.getDefaultValue(I,this):T.defVal;if("separator"==T.type)Ma=!Ma;else{if("staticArr"==T.type)T.size=parseInt(I.style[T.sizeProperty]||A[T.sizeProperty].defVal)||0;else if(null!=T.dependentProps){var Ra=T.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=I.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}T.dependentPropsDefVal=La;T.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,T,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(T=Ba[Ea],-A=T.parentRow,I=0;I<T.values.length;I++)Ha=sa(T.name,T.values[I],{type:T.type,parentRow:T.parentRow,isDeletable:T.isDeletable,index:I,defVal:T.defVal,countProperty:T.countProperty,size:T.size},0==I%2,T.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",-function(){Ba.style.opacity="0.5"})},I=this.editorUi,T=I.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";P.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(P);var U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.position="relative";U.style.textAlign="center";U.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");-ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);X.push(ja);U.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=X[Ba]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&-(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(T.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:-"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";T.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Aa){T.getModel().beginUpdate();try{for(var Ra=I.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=T.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):-mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!T.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||-null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),T.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));T.getModel().setStyle(Ra[Za],La)}}finally{T.getModel().endUpdate()}}));Ca.className="geStyleButton";+Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==I.vertices.length&&0==I.edges.length?Ea=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Ea=I.edges[0].id);null==Ea||U||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(U=A[Ha],"function"!=typeof U.isVisible||U.isVisible(I,this)){var Aa=null!=U.getValue?U.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]++""):null!=U.getDefaultValue?U.getDefaultValue(I,this):U.defVal;if("separator"==U.type)Ma=!Ma;else{if("staticArr"==U.type)U.size=parseInt(I.style[U.sizeProperty]||A[U.sizeProperty].defVal)||0;else if(null!=U.dependentProps){var Ra=U.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=I.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}U.dependentPropsDefVal=La;U.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,U,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(U=Ba[Ea],+A=U.parentRow,I=0;I<U.values.length;I++)Ha=sa(U.name,U.values[I],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:I,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==I%2,U.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",+function(){Ba.style.opacity="0.5"})},I=this.editorUi,U=I.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";O.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(O);var T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");+ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);X.push(ja);T.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=X[Ba]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&+(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(U.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:+"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Aa){U.getModel().beginUpdate();try{for(var Ra=I.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=U.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):+mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!U.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||+null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(Ra[Za],La)}}finally{U.getModel().endUpdate()}}));Ca.className="geStyleButton";Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=-Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";P.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+-mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",P.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});P.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(P),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(X.length-1,Editor.isDarkMode()?+Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";O.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "++mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",O.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});O.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(O),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(X.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"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(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"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&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(U)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+1<this.defaultColorSchemes.length&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,A){var I=Graph.fontMapping[A];null==I&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,I){if(null!=k&&0<k.length&&null!=-A&&0<A.length){var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var P=Graph.customFontElements[T];null!=P&&P.url!=A&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=A,"http:"==A.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(A)),P={name:k,url:A,elt:Graph.createFontElement(k,P)},Graph.customFontElements[T]=P,A=document.getElementsByTagName("head")[0],null!=I&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=I,P.elt.onerror=I):I()),null!=A&&A.appendChild(P.elt)):-null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var T="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=T&&Graph.addFont(T,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",-null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(T){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=-"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(P){A=P}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(P){A=null});this.isMouseInsertPoint=function(){return null!=-A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var U=this.graph.getCellStyle(P);if(null!=U&&"rack"==U.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;X.marginLeft=U.marginLeft||0;X.marginRight=U.marginRight||0;X.marginTop=-U.marginTop||0;X.marginBottom=U.marginBottom||0;X.allowGaps=U.allowGaps||0;X.horizontal="1"==mxUtils.getValue(U,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,T,P,U,X,aa,ja,-pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};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(k,A,I,T){function P(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function U(Ea){aa.setHiddenTags(Ea?[]:ja.slice());P();aa.refresh()}+A&&0<A.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var O=Graph.customFontElements[U];null!=O&&O.url!=A&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=A,"http:"==A.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(A)),O={name:k,url:A,elt:Graph.createFontElement(k,O)},Graph.customFontElements[U]=O,A=document.getElementsByTagName("head")[0],null!=I&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=I,O.elt.onerror=I):I()),null!=A&&A.appendChild(O.elt)):+null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var U="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=U&&Graph.addFont(U,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",+null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=+"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(O){A=O}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(O){A=null});this.isMouseInsertPoint=function(){return null!=+A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var T=this.graph.getCellStyle(O);if(null!=T&&"rack"==T.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;X.marginLeft=T.marginLeft||0;X.marginRight=T.marginRight||0;X.marginTop=+T.marginTop||0;X.marginBottom=T.marginBottom||0;X.allowGaps=T.allowGaps||0;X.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,U,O,T,X,aa,ja,+pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};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(k,A,I,U){function O(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function T(Ea){aa.setHiddenTags(Ea?[]:ja.slice());O();aa.refresh()}function X(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),La=document.createElement("td");La.style.align="center";La.style.width="16px";var $a=document.createElement("img");$a.setAttribute("src",Ra?Editor.visibleImage:Editor.hiddenImage);$a.setAttribute("title",mxResources.get(Ra?"hideIt":"show",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";La.appendChild($a);mxEvent.addListener($a,"click",function(x){mxEvent.isShiftDown(x)?-U(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),P(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=-"invert(100%)";mxEvent.addListener($a,"click",function(x){U(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,-"click",function(x){if(mxEvent.isShiftDown(x))U(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)U(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);P();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);+T(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),O(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=+"invert(100%)";mxEvent.addListener($a,"click",function(x){T(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,+"click",function(x){if(mxEvent.isShiftDown(x))T(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)T(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);O();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);$a.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";mxEvent.addListener($a,"click",function(x){var M=mxUtils.indexOf(ja,Ha);0<=M&&ja.splice(M,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[Ha]);aa.refresh();mxEvent.consume(x)});La.appendChild($a)}else{var Da=document.createElement("input");Da.setAttribute("type","checkbox");Da.style.margin="0px";Da.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Da.checked=Da.defaultChecked;Da.style.background="transparent";Da.setAttribute("title",mxResources.get(Da.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Da,"change",function(x){Da.checked?aa.addTagsForCells(aa.getSelectionCells(),[Ha]):aa.removeTagsForCells(aa.getSelectionCells(),[Ha]);mxEvent.consume(x)});La.appendChild(Da)}Za.appendChild(La)}Ca.appendChild(Za)})(Ea[Ma]);ya.appendChild(Ca);sa.appendChild(ya)}}var aa=this,ja=aa.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);aa.addListener(mxEvent.ROOT,function(){ja=aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?X(ja):X(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display="flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(aa.isEnabled()){sa.style.bottom="34px";var Ba=document.createElement("a");Ba.className="geToolbarButton geAdaptiveAsset geToggleItem";Ba.style.width="16px";Ba.style.height="18px";Ba.style.backgroundPosition="center center";Ba.style.backgroundRepeat=-"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());P();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=I&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage+-")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){I(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=T&&wa.appendChild(T);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=-Editor.guid();document.execCommand("fontname",!1,I);for(var T=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,U=0;U<T.length;U++)T[U].getAttribute("face")==I&&(P=!0,T[U].setAttribute("face",k),null!=A?T[U].setAttribute("data-font-src",A):T[U].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=+"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());O();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=I&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage++")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){I(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=U&&wa.appendChild(U);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=+Editor.guid();document.execCommand("fontname",!1,I);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),O=!1,T=0;T<U.length;T++)U[T].getAttribute("face")==I&&(O=!0,U[T].setAttribute("face",k),null!=A?U[T].setAttribute("data-font-src",A):U[T].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=-function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,T,P,U,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,+function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,U,O,T,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),-ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var J=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){J.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ea=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=-function(){ea.apply(this,arguments);this.enumerationState=0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)++ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var J=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){J.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var da=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=+function(){da.apply(this,arguments);this.enumerationState=0};var ea=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ea.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var I=k.view.scale,-T=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==T&&A.scale==I||(A.bounds=k,A.value=T,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),+U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==U&&A.scale==I||(A.bounds=k,A.value=U,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var W=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){W.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,I){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 T=!1,P=0,U=0,X=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<P&&P--;0==P&&pa()}),pa=mxUtils.bind(this,function(){if(U<k.length){var sa=this.stoppingCustomActions,qa=-k[U++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,-!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&+window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,O=0,T=0,X=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<O&&O--;0==O&&pa()}),pa=mxUtils.bind(this,function(){if(T<k.length){var sa=this.stoppingCustomActions,qa=+k[T++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),O++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,+!0)),qa.opacity.value);null!=qa.fadeIn&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(X(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){X();var Ba=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(X(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(X(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(X(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,-Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(P++,this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==P?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var T=document.createElement("div");-T.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var P=T.getElementsByTagName("a"),U=!1,X=0;X<P.length;X++)I=P[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(P[X].setAttribute("href",this.updateCustomLink(k,I)),U=!0);U&&this.labelChanged(A,T.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(T){}return A};-Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var T=A[I],P;for(P in T)this.updateCustomLinkAction(k,T[P],"cells"),this.updateCustomLinkAction(k,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var T=[],P=0;P<A[I].length;P++)if("*"==A[I][P])T.push(A[I][P]);else{var U=k[A[I][P]];null!=U?""!=U&&T.push(U):T.push(A[I][P])}A[I]=T}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,-null,A));if(null!=k.excludeCells){for(var I=[],T=0;T<A.length;T++)0>k.excludeCells.indexOf(A[T].id)&&I.push(A[T]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var T=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(U){return U!=T},T))}else{var P=this.model.getCell(k[I]);null!=P&&A.push(P)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&+Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(O++,this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==O?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var U=document.createElement("div");+U.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var O=U.getElementsByTagName("a"),T=!1,X=0;X<O.length;X++)I=O[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(O[X].setAttribute("href",this.updateCustomLink(k,I)),T=!0);T&&this.labelChanged(A,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(U){}return A};+Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var U=A[I],O;for(O in U)this.updateCustomLinkAction(k,U[O],"cells"),this.updateCustomLinkAction(k,U[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var U=[],O=0;O<A[I].length;O++)if("*"==A[I][O])U.push(A[I][O]);else{var T=k[A[I][O]];null!=T?""!=T&&U.push(T):U.push(A[I][O])}A[I]=U}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,+null,A));if(null!=k.excludeCells){for(var I=[],U=0;U<A.length;U++)0>k.excludeCells.indexOf(A[U].id)&&I.push(A[U]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var U=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(T){return T!=U},U))}else{var O=this.model.getCell(k[I]);null!=O&&A.push(O)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;-for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,T){var P=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var U=0,X={},aa=0;aa<k.length;aa++)0<k[aa].length&&(X[k[aa]]=!0,U++);for(aa=0;aa<A.length;aa++)if(I&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=-k.length)){for(var sa=pa=0;sa<ja.length&&pa<U;sa++)null!=X[ja[sa]]&&pa++;pa=pa==U}pa&&(1!=T||this.isCellVisible(A[aa]))&&P.push(A[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);I=[];if(0<P.length){P=P.split(" ");for(var U={},X=0;X<P.length;X++)if(null==A||null!=A[P[X]])U[P[X]]=!0,I.push(P[X]);-A=U}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);if(0<P.length){P=P.split(" ");for(var U=0;U<P.length;U++)null==I[P[U]]&&(I[P[U]]=!0,A.push(P[U]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var T=this.getTagsForCell(k[I]),-P=T.split(" "),U=!1,X=0;X<A.length;X++){var aa=mxUtils.trim(A[X]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(T=0<T.length?T+" "+aa:aa,U=!0)}U&&this.setAttributeForCell(k[I],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var T=this.getTagsForCell(k[I]);if(0<T.length){for(var P=T.split(" "),U=!1,X=0;X<A.length;X++){var aa=mxUtils.indexOf(P,A[X]);0<=aa&&(P.splice(aa,1),U=!0)}U&&this.setAttributeForCell(k[I],-"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,T){for(var P=0;P<k.length;P++)this.highlightCell(k[P],-A,I,T)};Graph.prototype.highlightCell=function(k,A,I,T,P){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var U=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),U=new mxCellHighlight(this,A,P,!1),null!=T&&(U.opacity=T),U.highlight(k),window.setTimeout(function(){null!=U.shape&&(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},-1200)},I));return U};Graph.prototype.addSvgShadow=function(k,A,I,T){I=null!=I?I:!1;T=null!=T?T:!0;var P=k.ownerDocument,U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");U.setAttribute("id",this.shadowId);var X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");U.appendChild(X);-X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");-U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");U.appendChild(X);X=k.getElementsByTagName("defs");-0==X.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=X[0];P.appendChild(U);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&T&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),-null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==+for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,U){var O=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var T=0,X={},aa=0;aa<k.length;aa++)0<k[aa].length&&(X[k[aa]]=!0,T++);for(aa=0;aa<A.length;aa++)if(I&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=+k.length)){for(var sa=pa=0;sa<ja.length&&pa<T;sa++)null!=X[ja[sa]]&&pa++;pa=pa==T}pa&&(1!=U||this.isCellVisible(A[aa]))&&O.push(A[aa])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],U=0;U<k.length;U++){var O=this.getTagsForCell(k[U]);I=[];if(0<O.length){O=O.split(" ");for(var T={},X=0;X<O.length;X++)if(null==A||null!=A[O[X]])T[O[X]]=!0,I.push(O[X]);+A=T}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},U=0;U<k.length;U++){var O=this.getTagsForCell(k[U]);if(0<O.length){O=O.split(" ");for(var T=0;T<O.length;T++)null==I[O[T]]&&(I[O[T]]=!0,A.push(O[T]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var U=this.getTagsForCell(k[I]),+O=U.split(" "),T=!1,X=0;X<A.length;X++){var aa=mxUtils.trim(A[X]);""!=aa&&0>mxUtils.indexOf(O,aa)&&(U=0<U.length?U+" "+aa:aa,T=!0)}T&&this.setAttributeForCell(k[I],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var U=this.getTagsForCell(k[I]);if(0<U.length){for(var O=U.split(" "),T=!1,X=0;X<A.length;X++){var aa=mxUtils.indexOf(O,A[X]);0<=aa&&(O.splice(aa,1),T=!0)}T&&this.setAttributeForCell(k[I],+"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,U){for(var O=0;O<k.length;O++)this.highlightCell(k[O],+A,I,U)};Graph.prototype.highlightCell=function(k,A,I,U,O){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var T=null;null!=k&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+O),T=new mxCellHighlight(this,A,O,!1),null!=U&&(T.opacity=U),T.highlight(k),window.setTimeout(function(){null!=T.shape&&(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},+1200)},I));return T};Graph.prototype.addSvgShadow=function(k,A,I,U){I=null!=I?I:!1;U=null!=U?U:!0;var O=k.ownerDocument,T=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");T.setAttribute("id",this.shadowId);var X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");T.appendChild(X);+X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");T.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");+T.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");T.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");T.appendChild(X);X=k.getElementsByTagName("defs");+0==X.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=k.firstChild?k.insertBefore(O,k.firstChild):k.appendChild(O)):O=X[0];O.appendChild(T);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),+null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var I=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=@@ -3453,33 +3453,33 @@ this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultPar"/ibm.xml"];mxStencilRegistry.libraries.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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"];mxStencilRegistry.libraries.salesforce=-[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,T,P,U,X,aa,ja,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);-null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var ma=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,T,P,U){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ma.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I){function T(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,-Math.min(parseInt(Ba.value),parseInt(wa.value))))}function P(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=+[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,U,O,T,X,aa,ja,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);+null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var la=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,U,O,T){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return la.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I){function U(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,+Math.min(parseInt(Ba.value),parseInt(wa.value))))}function O(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=ia.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=oa.checked;k.lastPrintSheetsAcross=x.value;k.lastPrintSheetsDown=M.value;var Fa={};Fa.border=parseInt(Q.value);Fa.scale=parseInt(V.value)/100;Fa.grid=ia.checked;Fa.transparent=ka.checked;Fa.includeCopy=oa.checked;Fa.sheetsAcross=parseInt(x.value);Fa.sheetsDown=parseInt(M.value);Fa.pagesFrom=parseInt(wa.value);Fa.pagesTo=parseInt(Ba.value);Fa.allPages=sa.checked;Fa.selection=Ea.checked;Fa.pageView=ra.checked;Fa.crop=ya.checked;Fa.fit=-Ca.checked;return null!=I?I(!ua,Fa):k.print(!ua,Fa)}var U=k.editor.graph,X=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));X.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",+Ca.checked;return null!=I?I(!ua,Fa):k.print(!ua,Fa)}var T=k.editor.graph,X=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));X.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name","pages-printdialog");aa.appendChild(sa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){sa.checked=!0});aa.appendChild(A);mxUtils.br(aa);var qa=sa.cloneNode(!0);aa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");aa.appendChild(A);mxEvent.addListener(A,"click",function(){qa.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type",-"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ba,"change",T);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=+"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",U);mxEvent.addListener(Ba,"change",U);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(pa,Math.max(1,k.lastPrintPagesFromInput)),Ba.value=Math.min(pa,Math.max(1,k.lastPrintPagesToInput))):(wa.value=ja,Ba.value=ja);wa.setAttribute("max",pa);Ba.setAttribute("max",pa);za=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=ja;Ba.value=ja;qa.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";-za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&X.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";U.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");U.isEnabled()&&-(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(U.isEnabled()||1<pa)&&X.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=-"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");U.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));U.appendChild(A);mxEvent.addListener(U,"click",function(){ra.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");-U.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));U.appendChild(A);mxEvent.addListener(U,"click",function(){ya.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=-"2px";A.appendChild(Ca);U.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=+za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&X.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";T.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");T.isEnabled()&&+(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(T.isEnabled()||1<pa)&&X.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!T.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;T.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});T=document.createElement("div");T.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=+"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");T.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ra.checked=!0});X.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");+T.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ya.checked=!0});X.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=+"2px";A.appendChild(Ca);T.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(T,"click",function(ua){mxEvent.getSource(ua)!=Ca&&(Ca.checked=!Ca.checked)});var x=document.createElement("input");x.style.margin="0 2px";x.style.boxSizing="border-box";x.setAttribute("value",k.lastPrintSheetsAcross||"1");x.setAttribute("min","1");x.setAttribute("type","number");x.style.width="40px";Ra.appendChild(x);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Za.appendChild(A);mxUtils.write(La,mxResources.get("fitToBy"));var M=x.cloneNode(!0);M.setAttribute("value",k.lastPrintSheetsDown||"1");$a.appendChild(M);mxEvent.addListener(x,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(M,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?ya.checked=!0:k.lastPrintFitRadioChecked?Ca.checked=!0:ra.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));Da.appendChild(A);Ma.appendChild(Aa);Ma.appendChild(Ra);Ma.appendChild(Za);Ha.appendChild(La);Ha.appendChild($a);Ha.appendChild(Da);za.appendChild(Ma);za.appendChild(Ha);-aa.appendChild(za);U.appendChild(aa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;-U.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");U.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(V);mxUtils.br(U);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(ia);A=document.createElement("span");-A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));U.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(U.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),U.appendChild(A),-mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(A),mxEvent.addListener(A,-"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));X.appendChild(U);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&A.appendChild(U);PrintDialog.previewEnabled&&null==I&&(aa=mxUtils.button(mxResources.get("preview"),-function(){try{k.hideDialog(),P(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=I?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),P(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(U);X.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):+aa.appendChild(za);T.appendChild(aa);X.appendChild(T);T=document.createElement("div");T.style.borderTop="1px solid lightGray";T.style.whiteSpace="nowrap";T.style.paddingTop="12px";T.style.marginTop="12px";T.style.paddingLeft="8px";mxUtils.write(T,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;+T.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");T.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";T.appendChild(V);mxUtils.br(T);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;T.appendChild(ia);A=document.createElement("span");+A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));T.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(T.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),T.appendChild(A),+mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(T),T.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),T.appendChild(A),mxEvent.addListener(A,+"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));X.appendChild(T);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));T=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});T.className="geBtn";k.editor.cancelFirst&&A.appendChild(T);PrintDialog.previewEnabled&&null==I&&(aa=mxUtils.button(mxResources.get("preview"),+function(){try{k.hideDialog(),O(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=I?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),O(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(T);X.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Y=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 k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),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 la=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{la.getContext("2d").drawImage(Z,0,0);var k=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.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(k){}Editor.prototype.useCanvasForExport=+this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ma=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{ma.getContext("2d").drawImage(Z,0,0);var k=ma.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.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(k){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.13";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.15";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -3489,7 +3489,7 @@ function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi."version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(f);if(null!=l&&"svg"==l.nodeName){l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily="initial";var t=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(l);c.hasAttribute("transform")&&t.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(t,c)}}catch(z){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var t=document.implementation.createHTMLDocument(""),-z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var J=K.selectorText.split(","),ea=0;ea<J.length;ea++)J[ea]="#"+l+" "+J[ea];K.selectorText=J.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';+z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var J=K.selectorText.split(","),da=0;da<J.length;da++)J[da]="#"+l+" "+J[da];K.selectorText=J.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};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.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(z){}try{var f=document.createElement("canvas"),@@ -3499,10 +3499,10 @@ f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalDatEditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var z=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(da){null!=da&&da()});z.spin=function(da,ca,W,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var ma=Date.now();null!=W&&(N=window.setTimeout(function(){z.stop();N=null;W({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,da);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(ea){null!=ea&&ea()});z.spin=function(ea,ca,W,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var la=Date.now();null!=W&&(N=window.setTimeout(function(){z.stop();N=null;W({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,ea);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),ha=document.createElement("div"),ha.className="geSpinnerStatus",ha.style.position="absolute",ha.style.whiteSpace="nowrap",ha.style.background="#4B4243",ha.style.color="white",ha.style.fontFamily=Editor.defaultHtmlFont,ha.style.fontSize="9pt",ha.style.padding="6px",ha.style.paddingLeft="10px",ha.style.paddingRight="10px",ha.style.zIndex=2E9,ha.style.left=Math.max(0,c)+"px",ha.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ha.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ha.style,-"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ha.innerHTML=mxUtils.htmlEntities(ca),da.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(ba=Math.max(0,ba-(Date.now()-ma)),Y=mxUtils.bind(this,function(la){this.spin(da,ca,W,ba);if(null!=la)try{la(),K=mxUtils.bind(this,function(){this.spin(da,ca,-W,ba);try{la()}catch(Z){null!=W&&W(Z)}})}catch(Z){null!=W&&W(Z)}}));this.stop();return Y});ha=!0}return ha};var ea=z.stop;z.stop=function(){ea.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=+"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ha.innerHTML=mxUtils.htmlEntities(ca),ea.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(ba=Math.max(0,ba-(Date.now()-la)),Y=mxUtils.bind(this,function(ma){this.spin(ea,ca,W,ba);if(null!=ma)try{ma(),K=mxUtils.bind(this,function(){this.spin(ea,ca,+W,ba);try{ma()}catch(Z){null!=W&&W(Z)}})}catch(Z){null!=W&&W(Z)}}));this.stop();return Y});ha=!0}return ha};var da=z.stop;z.stop=function(){da.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,z=this;f.getFunction=function(C){if(t.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var F=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<F&&z.movePage(F,F-1)};if(38==C.keyCode)return function(){0<F&&z.movePage(F,0)};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.movePage(F,F+1)};if(40==C.keyCode)return function(){F<@@ -3511,13 +3511,13 @@ mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetC=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var F=this.updatePageRoot(new DiagramPage(z[C]));null==F.getName()&&F.setName(mxResources.get("pageWithNumber",[C+1]));l.model.execute(new ChangePage(this,F,0==C?F:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,-l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;ea=null!=ea?ea:!Editor.defaultCompressed;var W=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=-"_blank";else W=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(ea){var ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());ma.appendChild(c)}else{ma=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(ma);if(Graph.decompress(ha)!=ma)return ma;ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());-mxUtils.setTextContent(ma,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(ma)}J?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),-ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=da&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",da));null!=ca&&-(ha=ha.cloneNode(!0),ha.setAttribute("border",ca));c=ea?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,W);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,W,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=-function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var J=K.getElementsByTagName("mxGraphModel"),ea=0<J.length?J[0]:null;J=K;null==ea&&l?(ea=mxUtils.getNodeValue(K),0<ea.length&&(ea=Graph.decompress(ea),null!=ea&&0<ea.length&&(J=K.cloneNode(!1),J.appendChild(mxUtils.parseXml(ea).documentElement)))):null==ea||l?J=K.cloneNode(!0):(J=K.cloneNode(!1),mxUtils.setTextContent(J,-Graph.compressNode(ea)));z.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&+l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;da=null!=da?da:!Editor.defaultCompressed;var W=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=+"_blank";else W=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(da){var la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());la.appendChild(c)}else{la=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(la);if(Graph.decompress(ha)!=la)return la;la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());+mxUtils.setTextContent(la,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(la)}J?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),+ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=ea&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",ea));null!=ca&&+(ha=ha.cloneNode(!0),ha.setAttribute("border",ca));c=da?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,W);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,W,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=+function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var J=K.getElementsByTagName("mxGraphModel"),da=0<J.length?J[0]:null;J=K;null==da&&l?(da=mxUtils.getNodeValue(K),0<da.length&&(da=Graph.decompress(da),null!=da&&0<da.length&&(J=K.cloneNode(!1),J.appendChild(mxUtils.parseXml(da).documentElement)))):null==da||l?J=K.cloneNode(!0):(J=K.cloneNode(!1),mxUtils.setTextContent(J,+Graph.compressNode(da)));z.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(C.root)),this.editor.graph.saveViewState(C.viewState,N,null,t),F=F.cloneNode(!1),F.appendChild(N)));c(F)}return z};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],t=0;t<c.length;t++){var z=c.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?l.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):z.toUpperCase()!=z?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(C){c[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var t in c[EditorUi.DIFF_UPDATE]){var z=@@ -3525,9 +3525,9 @@ c[EditorUi.DIFF_UPDATE][t];null!=z.name&&(z.name=this.anonymizeString(z.name));ndelete z.cells);mxUtils.isEmptyObject(z)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==-DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var W=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=-this.pages[0]){var ba=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());W.setBackgroundImage=this.editor.graph.setBackgroundImage;W.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?W.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&W.setBackgroundImage(ha.viewState.backgroundImage);W.getGlobalVariable=function(ma){return"page"==ma&&null!=ha?ha.getName():"pagenumber"==ma?1:-ba.apply(this,arguments)};document.body.appendChild(W.container);null!=ha&&W.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,J,ea);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,W,K,window.location.href,c,f,l,t,z,N,J,da,ca);W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var W=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=+this.pages[0]){var ba=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());W.setBackgroundImage=this.editor.graph.setBackgroundImage;W.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?W.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&W.setBackgroundImage(ha.viewState.backgroundImage);W.getGlobalVariable=function(la){return"page"==la&&null!=ha?ha.getName():"pagenumber"==la?1:+ba.apply(this,arguments)};document.body.appendChild(W.container);null!=ha&&W.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,J,da);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,W,K,window.location.href,c,f,l,t,z,N,J,ea,ca);W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var K=f.view.scale;C=Math.floor(F.x/K-f.view.translate.x);K=Math.floor(F.y/K-f.view.translate.y);F=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=z&&(z=z.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};@@ -3536,23 +3536,23 @@ EditorUi.prototype.getHtml2=function(c,f,l,t,z){f=window.DRAWIO_VIEWER_URL||Editz+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),l={},0<c.length)){var t=this.getHashObject(),z=null;this.fileNode=f;this.pages=[];for(var C=0;C<c.length;C++){null==c[C].getAttribute("id")&&c[C].setAttribute("id",C);f=new DiagramPage(c[C]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[C+1]));this.pages.push(f);if(null==t.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=t.pageId&&f.getId()==t.pageId)z=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);-this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var J=K[C];N.setVisible(J,f[J.id]||!1)}}catch(ea){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();+this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var J=K[C];N.setVisible(J,f[J.id]||!1)}}catch(da){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,t,z,-C,F,N,K,J,ea,da,ca,W,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ma=this.getBaseFilename(!z),Y=ma+("xml"==c||"pdf"==c&&ea?".drawio":"")+"."+c;if("xml"==c){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,la,"text/xml")}else if("html"==c)la=this.getHtml2(this.getFileData(!0),this.editor.graph,ma),this.saveData(Y,c,la,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-c?Y=ma+".png":"jpeg"==c&&(Y=ma+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(T,P){try{return this.createDownloadRequest(T,c,t,P,F,z,N,K,J,ea,da,void 0,void 0,!C,ca,W,ba,ha)}catch(U){this.handleError(U)}}));else{var Z=null,k=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;-if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else Y=ma+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();k(T)}),t)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,-J,ea,da,ca,W,ba,ha,ma,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha,ma,Y);f="";for(var la in c)l=c[la],null!=l&&(f+=la+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha,ma,Y){var la=this.editor.graph,Z=la.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&-(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=ea?(k=ea.from,A=ea.to):0==C&&(I="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=la.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:la.getExportVariables()};-K&&(z.grid={size:la.gridSize,steps:la.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:la.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:da&&isFinite(da)?da:null,h:ca&&isFinite(ca)?ca:null,crop:null!=W&&W?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:ma,+C,F,N,K,J,da,ea,ca,W,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var la=this.getBaseFilename(!z),Y=la+("xml"==c||"pdf"==c&&da?".drawio":"")+"."+c;if("xml"==c){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,ma,"text/xml")}else if("html"==c)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,la),this.saveData(Y,c,ma,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Y=la+".png":"jpeg"==c&&(Y=la+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(U,O){try{return this.createDownloadRequest(U,c,t,O,F,z,N,K,J,da,ea,void 0,void 0,!C,ca,W,ba,ha)}catch(T){this.handleError(T)}}));else{var Z=null,k=mxUtils.bind(this,function(U){U.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;+if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(U){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(U))})))}else Y=la+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(U){this.spinner.stop();k(U)}),t)}}catch(U){this.handleError(U)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,+J,da,ea,ca,W,ba,ha,la,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha,la,Y);f="";for(var ma in c)l=c[ma],null!=l&&(f+=ma+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha,la,Y){var ma=this.editor.graph,Z=ma.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&+(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=da?(k=da.from,A=da.to):0==C&&(I="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=ma.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:ma.getExportVariables()};+K&&(z.grid={size:ma.gridSize,steps:ma.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:ma.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:ea&&isFinite(ea)?ea:null,h:ca&&isFinite(ca)?ca:null,crop:null!=W&&W?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:la,sheetsDown:Y}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,ea=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(W){ca===this.currentPage&&(200<=W.getStatus()&&300>=W.getStatus()?(this.updateDiagram(W.getText()),da()):this.handleError({message:mxResources.get("error")+" "+W.getStatus()}))}),mxUtils.bind(this,-function(W){this.handleError(W)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(ea,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ea()}));da();ea()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,da=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(W){ca===this.currentPage&&(200<=W.getStatus()&&300>=W.getStatus()?(this.updateDiagram(W.getText()),ea()):this.handleError({message:mxResources.get("error")+" "+W.getStatus()}))}),mxUtils.bind(this,+function(W){this.handleError(W)}))}),ea=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(da,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ea();da()}));ea();da()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,I){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var J=mxUtils.parseXml(K).documentElement;-if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var ea=J.attributes,da=0;da<ea.length;da++)z.setAttributeForCell(N,ea[da].nodeName,0<ea[da].nodeValue.length?ea[da].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var W=c.getAttribute("icon");if(null!=W){var ba=0<W.length?JSON.parse(W):-null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var ma=z.getCellGeometry(N);if(null!=ma){ma=ma.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?ma.x+=Y:"dy"==key?ma.y+=Y:"dw"==key?ma.width+=Y:"dh"==key?ma.height+=Y:ma[key]=parseFloat(ha[key])}z.model.setGeometry(N,ma)}}}catch(Z){null!=window.console&&console.log("Error in icon for "+-N.id+": "+Z)}}}else if("model"==c.nodeName){for(var la=c.firstChild;null!=la&&la.nodeType!=mxConstants.NODETYPE_ELEMENT;)la=la.nextSibling;null!=la&&(new mxCodec(c.firstChild)).decode(la,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):+if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var da=J.attributes,ea=0;ea<da.length;ea++)z.setAttributeForCell(N,da[ea].nodeName,0<da[ea].nodeValue.length?da[ea].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var W=c.getAttribute("icon");if(null!=W){var ba=0<W.length?JSON.parse(W):+null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var la=z.getCellGeometry(N);if(null!=la){la=la.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?la.x+=Y:"dy"==key?la.y+=Y:"dw"==key?la.width+=Y:"dh"==key?la.height+=Y:la[key]=parseFloat(ha[key])}z.model.setGeometry(N,la)}}}catch(Z){null!=window.console&&console.log("Error in icon for "++N.id+": "+Z)}}}else if("model"==c.nodeName){for(var ma=c.firstChild;null!=ma&&ma.nodeType!=mxConstants.NODETYPE_ELEMENT;)ma=ma.nextSibling;null!=ma&&(new mxCodec(c.firstChild)).decode(ma,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{C.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var z=new Date;l=z.getFullYear();t=z.getMonth()+1;var C=z.getDate(),F=z.getHours(),N=z.getMinutes();z=z.getSeconds();l=f+(" "+(l+"-"+t+"-"+C+"-"+F+"-"+N+"-"+z))}return l=mxResources.get("copyOf",[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var C=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=t&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=@@ -3561,29 +3561,29 @@ mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxRec.getMode()){var F="1"==urlParams.sketch?"sketch":uiTheme;if(null==F)F="default";else if("sketch"==F||"min"==F)F+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(K){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||C():C()});f?c():(null!=N.fallbackFileData&&(N.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var K=new LocalFile(this,N.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(K)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else C();return z};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<c.length;C++){this.updatePageRoot(c[C]);var F=c[C].node.cloneNode(!1);F.removeAttribute("name");t.root=c[C].root;var N=z.encode(t);this.editor.graph.saveViewState(c[C].viewState,N,!0);N.removeAttribute("pageWidth");-N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,J,ea,da){return!da||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=J&&"y"!=J&&"width"!=J&&"height"!=J?da&&"mxCell"==K.nodeName&&"previous"==J?null:ea:Math.round(ea)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&+N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,J,da,ea){return!ea||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=J&&"y"!=J&&"width"!=J&&"height"!=J?ea&&"mxCell"==K.nodeName&&"previous"==J?null:da:Math.round(da)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var z=0;z<c.attributes.length;z++){var C=c.attributes[z].name,F=null!=f?f(c,C,c.attributes[z].value,!0):c.attributes[z].value;null!=F&&(t^=this.hashValue(C,f,l)+this.hashValue(F,f,l))}}if(null!=c.childNodes)for(z=0;z<c.childNodes.length;z++)t=(t<<5)-t+this.hashValue(c.childNodes[z],f,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(z=0;z<c.length;z++)f=(f<<5)-f+c.charCodeAt(z)<<0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,z,C,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var t=f.previousSibling;l.insertBefore(f,c);l.insertBefore(t,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==l.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var z=null;if(c.constructor!=StorageLibrary||-".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],this.openLibraries);break}z={file:c,images:f,title:l,expand:t};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var F=null,N=mxUtils.bind(this,function(Y,la){0==Y.length&&c.isEditable()?-(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),la.appendChild(F)):this.addLibraryEntries(Y,la)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;-l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");J.style.backgroundColor="inherit";t.style.position="relative";var ea=document.createElement("img");ea.className="geAdaptiveAsset";ea.setAttribute("src",Editor.crossImage);ea.setAttribute("title",mxResources.get("close"));ea.setAttribute("valign","absmiddle");ea.setAttribute("border","0");ea.style.position="relative";ea.style.top="2px";-ea.style.width="14px";ea.style.cursor="pointer";ea.style.margin="0 3px";var da=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(ea),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var la=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,la,mxResources.get("cancel"),mxResources.get("discardChanges")):la();mxEvent.consume(Y)}}));if(c.isEditable()){var ca=-this.editor.graph,W=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W),W=ea.cloneNode(!1),W.setAttribute("src",Editor.spinImage),W.setAttribute("title",mxResources.get("saving")),W.style.cursor="default",W.style.marginRight="2px",W.style.marginTop="-2px",J.insertBefore(W,J.firstChild),this.saveLibrary(c.getTitle(),-f,c,c.getMode(),!0,!0,function(){null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W)})):null==da&&(da=ea.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),J.insertBefore(da,J.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(la){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==da||c.isModified()||(da.parentNode.removeChild(da),da=null)});mxEvent.consume(la)})))}),ha=mxUtils.bind(this,-function(Y,la,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-la.x,-la.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,la.width,la.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));la={xml:Y,w:la.width,h:la.height};null!=k&&(la.title=k);f.push(la);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),-F=null)}),ma=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var la=ca.getSelectionCells(),Z=ca.view.getBounds(la);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ha(la,Z)}else this.showError(mxResources.get("error"),+".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],this.openLibraries);break}z={file:c,images:f,title:l,expand:t};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var F=null,N=mxUtils.bind(this,function(Y,ma){0==Y.length&&c.isEditable()?+(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),ma.appendChild(F)):this.addLibraryEntries(Y,ma)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;+l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");J.style.backgroundColor="inherit";t.style.position="relative";var da=document.createElement("img");da.className="geAdaptiveAsset";da.setAttribute("src",Editor.crossImage);da.setAttribute("title",mxResources.get("close"));da.setAttribute("valign","absmiddle");da.setAttribute("border","0");da.style.position="relative";da.style.top="2px";+da.style.width="14px";da.style.cursor="pointer";da.style.margin="0 3px";var ea=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(da),mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var ma=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=ea?this.confirm(mxResources.get("allChangesLost"),null,ma,mxResources.get("cancel"),mxResources.get("discardChanges")):ma();mxEvent.consume(Y)}}));if(c.isEditable()){var ca=+this.editor.graph,W=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W),W=da.cloneNode(!1),W.setAttribute("src",Editor.spinImage),W.setAttribute("title",mxResources.get("saving")),W.style.cursor="default",W.style.marginRight="2px",W.style.marginTop="-2px",J.insertBefore(W,J.firstChild),this.saveLibrary(c.getTitle(),+f,c,c.getMode(),!0,!0,function(){null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W)})):null==ea&&(ea=da.cloneNode(!1),ea.setAttribute("src",Editor.saveImage),ea.setAttribute("title",mxResources.get("save")),J.insertBefore(ea,J.firstChild),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(ma){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ea||c.isModified()||(ea.parentNode.removeChild(ea),ea=null)});mxEvent.consume(ma)})))}),ha=mxUtils.bind(this,+function(Y,ma,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-ma.x,-ma.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,ma.width,ma.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));ma={xml:Y,w:ma.width,h:ma.height};null!=k&&(ma.title=k);f.push(ma);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),+F=null)}),la=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ma=ca.getSelectionCells(),Z=ca.view.getBounds(ma);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ha(ma,Z)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ca.isMouseDown&&-null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,ma(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",-ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(la,-Z,k,A,I,T,P,U,X){if(null!=la&&"image/"==Z.substring(0,6))la="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(la),la=[new mxCell("",new mxGeometry(0,0,I,T),la)],la[0].vertex=!0,ha(la,new mxRectangle(0,0,I,T),Y,mxEvent.isAltDown(Y)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==+null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,la(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",+ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ma,+Z,k,A,I,U,O,T,X){if(null!=ma&&"image/"==Z.substring(0,6))ma="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ma),ma=[new mxCell("",new mxGeometry(0,0,I,U),ma)],ma[0].vertex=!0,ha(ma,new mxRectangle(0,0,I,U),Y,mxEvent.isAltDown(Y)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);ba(Y);this.spinner.stop();aa=!0}catch(Ea){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Ba);-null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=X&&null!=P&&EditorUi.isVisioFilename(P)?this.importVisio(X,function(pa){ja(pa,"text/xml")},null,P):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(la,P)&&null!=X?this.isExternalDataComms()?-this.parseFile(X,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(la,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=-"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));ea=ea.cloneNode(!1);ea.setAttribute("src",Editor.editImage);ea.setAttribute("title",mxResources.get("edit"));J.insertBefore(ea,J.firstChild);mxEvent.addListener(ea,"click",l);l=ea.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",ma);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ma);this.isOffline()||".scratchpad"!=+null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=X&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(X,function(pa){ja(pa,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ma,O)&&null!=X?this.isExternalDataComms()?+this.parseFile(X,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(ma,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=+"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));da=da.cloneNode(!1);da.setAttribute("src",Editor.editImage);da.setAttribute("title",mxResources.get("edit"));J.insertBefore(da,J.firstChild);mxEvent.addListener(da,"click",l);l=da.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",la);".scratchpad"==c.title&&(this.addSelectionToScratchpad=la);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",J.insertBefore(l,J.firstChild))}t.appendChild(J);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=t.style&&(C+=t.style);f.appendChild(this.sidebar.createVertexTemplate(C,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var F=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==F.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(F,t.w,t.h,N,!0,null,!0))}}catch(K){N=null!=K.message?mxResources.get("error")+": "+K.message:String(K),C=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(C)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=@@ -3592,28 +3592,28 @@ Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.pronull,mxResources.get("close"),null,null,null,!0,null,null,z,l,t);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(z,C,F,N){C||(z=new ChangePageSetup(this,t?F:null,z),z.ignoreColor=!t,null!=N&&t&&(z.shadowVisible=N),this.editor.graph.model.execute(z))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,l,t,z){c=new LibraryDialog(this,c,f,l,t,z);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),-!1);var J=mxResources.get("ok"),ea=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(J=mxResources.get("cancel"),ea=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var da=null!=z?null:null!=-C?C:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==da.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),-mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);null!=t&&t()}),ea,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){ma.innerText="";for(var Y=0;Y<W.length;Y++){var la=document.createElement("option");mxUtils.write(la,W[Y].displayName);la.value=Y;ma.appendChild(la);la=document.createElement("option");la.innerHTML=" ";mxUtils.write(la,"<"+W[Y].email+">");la.setAttribute("disabled","disabled");ma.appendChild(la)}la=-document.createElement("option");mxUtils.write(la,mxResources.get("addAccount"));la.value=W.length;ma.appendChild(la)}var W=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var ma=document.createElement("select");ma.style.width="100%";ca();mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){var Y=ma.value,la=W.length!=Y;la&&this.drive.setUser(W[Y]);-this.drive.authorize(la,mxUtils.bind(this,function(){la||(W=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(ma);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,+!1);var J=mxResources.get("ok"),da=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(J=mxResources.get("cancel"),da=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ea=null!=z?null:null!=+C?C:window.location.hash;if(null!=ea&&("#G"==ea.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ea.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){ea="#U"==ea.substring(0,2)?ea.substring(45,ea.lastIndexOf("%26ex")):ea.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),+mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ea);null!=t&&t()}),da,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){la.innerText="";for(var Y=0;Y<W.length;Y++){var ma=document.createElement("option");mxUtils.write(ma,W[Y].displayName);ma.value=Y;la.appendChild(ma);ma=document.createElement("option");ma.innerHTML=" ";mxUtils.write(ma,"<"+W[Y].email+">");ma.setAttribute("disabled","disabled");la.appendChild(ma)}ma=+document.createElement("option");mxUtils.write(ma,mxResources.get("addAccount"));ma.value=W.length;la.appendChild(ma)}var W=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var la=document.createElement("select");la.style.width="100%";ca();mxEvent.addListener(la,"change",mxUtils.bind(this,function(){var Y=la.value,ma=W.length!=Y;ma&&this.drive.setUser(W[Y]);+this.drive.authorize(ma,mxUtils.bind(this,function(){ma||(W=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(la);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?F=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof K&&0<K.length&&(F=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):-null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,J,l,ea,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,+null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,J,l,da,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var J=!1;if(!(this.bannerShowing||this["hideBanner"+-c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var ea=z?500:1E3;J=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var da=document.createElement("div");da.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+-";"+J;mxUtils.setPrefixedStyle(da.style,"transform",F);mxUtils.setPrefixedStyle(da.style,"transition","all "+ea+"ms ease");da.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(da.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(da.style,"transform-origin",K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText=-"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";da.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";da.appendChild(ca)}mxUtils.write(da,f);document.body.appendChild(da);this.bannerShowing=+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var da=z?500:1E3;J=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var ea=document.createElement("div");ea.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex++";"+J;mxUtils.setPrefixedStyle(ea.style,"transform",F);mxUtils.setPrefixedStyle(ea.style,"transition","all "+da+"ms ease");ea.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(ea.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(ea.style,"transform-origin",K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText=+"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";ea.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";ea.appendChild(ca)}mxUtils.write(ea,f);document.body.appendChild(ea);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var W=document.createElement("input");W.setAttribute("type","checkbox");W.setAttribute("id","geDoNotShowAgainCheckbox");W.style.marginRight="6px";if(!t){f.appendChild(W);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);-da.style.paddingBottom=z?"16px":"30px";da.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=da.parentNode&&(da.parentNode.removeChild(da),this.bannerShowing=!1,W.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var ma=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,-function(){ha()}),ea)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){var la=mxEvent.getSource(Y);la!=W&&la!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):ma()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",N)}),ea/2);window.setTimeout(ma,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=+ea.style.paddingBottom=z?"16px":"30px";ea.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=ea.parentNode&&(ea.parentNode.removeChild(ea),this.bannerShowing=!1,W.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",F);window.setTimeout(mxUtils.bind(this,+function(){ha()}),da)});mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){var ma=mxEvent.getSource(Y);ma!=W&&ma!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",N)}),da/2);window.setTimeout(la,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,z){var C="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,f,l,z);this.saveData(t,C,c.substring(c.lastIndexOf(",")+1),"image/"+l,!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(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,z,C){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var F=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(N?parseInt(N[2],10):!1)?!1:C}if(C||this.isOffline()){F.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));C?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(K){}}else this.createEchoRequest(c,f,l,t,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=-l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(ea,da,ca,W){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,-450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ea,l,t,null,N);else if(null!=ea&&0<ea.length){var ma=mxUtils.bind(this,function(Y){try{this.exportFile(c,ea,l,t,da,Y)}catch(la){this.handleError(la)}});null!=W?ma(W):this.pickFolder(da,ma)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||-z.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(ea,da,ca){K(ea.value,da,ea,ca);this.hideDialog(null,null,J.container)}),z,c,l,t);this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;+l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(da,ea,ca,W){try{if("_blank"==ea)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,+450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(ea==App.MODE_DEVICE||"download"==ea)this.doSaveLocalFile(c,da,l,t,null,N);else if(null!=da&&0<da.length){var la=mxUtils.bind(this,function(Y){try{this.exportFile(c,da,l,t,ea,Y)}catch(ma){this.handleError(ma)}});null!=W?la(W):this.pickFolder(ea,la)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||+z.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(da,ea,ca){K(da.value,ea,da,ca);this.hideDialog(null,null,J.container)}),z,c,l,t);this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(C=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):t.document.write(z+c+"</body></html>"):t.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=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(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){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=@@ -3627,181 +3627,181 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(N){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var K=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",K);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,z){this.isLocalFileSave()?this.saveLocalFile(l,c,t,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,F){return this.createEchoRequest(l,C,t,z,f,F)}),l,z,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,z,C,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,-function(J,ea,da,ca){if("_blank"==ea||null!=J&&0<J.length){var W=l("_blank"==ea?null:J,ea==App.MODE_DEVICE||"download"==ea||null==ea||"_blank"==ea?"0":"1");null!=W&&(ea==App.MODE_DEVICE||"download"==ea||"_blank"==ea?W.simulate(document,"_blank"):(da=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,ea,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&W.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=W.getStatus()&&299>=W.getStatus())try{this.exportFile(W.getText(),J,C,!0,ea,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ca?da(ca):this.pickFolder(ea,da)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,ea,da){N(J.value,ea,J,da);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");+function(J,da,ea,ca){if("_blank"==da||null!=J&&0<J.length){var W=l("_blank"==da?null:J,da==App.MODE_DEVICE||"download"==da||null==da||"_blank"==da?"0":"1");null!=W&&(da==App.MODE_DEVICE||"download"==da||"_blank"==da?W.simulate(document,"_blank"):(ea=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,da,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&W.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=W.getStatus()&&299>=W.getStatus())try{this.exportFile(W.getText(),J,C,!0,da,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ca?ea(ca):this.pickFolder(da,ea)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,da,ea){N(J.value,da,J,ea);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=-function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(T){Editor.addRetryToError(T,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W)}));this.handleError(T)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var ma=this.editor.graph.addForeignObjectWarning;-Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=this.editor.graph.createSvgImageExport(z),la=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Y,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,ea,da);this.editor.graph.addForeignObjectWarning=ma;t&&this.editor.graph.addSvgShadow(la);var Z=this.getBaseFilename()+(z?".drawio":"")+".svg";W=null!=W?W:mxUtils.bind(this,function(T){this.isLocalFileSave()||T.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",T,"image/svg+xml"):-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});var k=mxUtils.bind(this,function(T){this.spinner.stop();z&&T.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,null,null,c,F));W(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(T))});this.editor.graph.mathEnabled&&this.editor.addMathCss(la);var A=mxUtils.bind(this,function(T){Editor.replaceSvgDataUris&&-C&&EditorUi.embedSvgImages(T);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(T,ea,k):k(T)}),I=mxUtils.bind(this,function(T){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(T,A,this.thumbImageCache)):A(T)});ca?this.embedFonts(la,I):(this.editor.addFontCss(la),I(la))}catch(T){this.handleError(T)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(da,ca,W,ba,ha){var ma=mxUtils.createElementNs(c.ownerDocument,-mxConstants.NS_SVG,"image");ma.setAttribute("x",ca);ma.setAttribute("y",W+.5);ma.setAttribute("width",ba.width);ma.setAttribute("height",ba.height);null==ma.setAttributeNS?ma.setAttribute("xlink:href",ha):ma.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ha);da.replaceChild(ma,da.lastChild);N()}function z(){if(F<ea.length)ea[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,-function(){counter--;0==counter&&l(c)}),K={},J={},ea=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(da){var ca=da.getElementsByTagName("div");if(0<ca.length)try{var W=ca[0].cloneNode(!0),ba=parseInt(W.style.marginLeft),ha=parseInt(W.style.paddingTop),ma=W.getElementsByTagName("div")[1],Y=ca=!1,la=W.style.alignItems,Z=W.style.justifyContent;if(null!=W.style.writingMode){var k=W.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==W.style.width||-Y&&"1px"==W.style.height;if(!Y&&"1px"==W.style.height||Y&&"1px"==W.style.width)W.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(W.style.justifyContent="unsafe flex-start");W.style.paddingTop="";W.style.marginLeft="";var I=W.outerHTML,T=K[I];null==T&&(W.style.position="absolute",W.style.visibility="hidden",document.body.appendChild(W),k=1,k="1px"==W.style.width?ma.offsetWidth:parseInt(W.style.width),A=1,A="1px"==W.style.height?ma.offsetHeight:parseInt(W.style.height),document.body.removeChild(W),-T=new mxRectangle(ba,ha,k,A),K[I]=T);"1px"==W.style.height&&("unsafe center"==la?ha-=T.height/2:"unsafe flex-end"==la&&(ha-=T.height));if("1px"==W.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==la)ba-=T.width/2;else if(!Y&&"unsafe flex-end"==Z||Y&&(!ca&&"unsafe flex-end"==la||ca&&"unsafe flex-start"==la))ba-=T.width;T=new mxRectangle(ba,ha,T.width,T.height+parseInt(ma.style.fontSize)/4);ea.push(mxUtils.bind(this,function(P){var U=J[I];null==U?Graph.htmlToPng(I,T.width,T.height,mxUtils.bind(this,-function(X){t(da,ba,ha,T,X);J[I]=X;P()}),C):(t(da,ba,ha,T,U),P())}))}catch(P){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&-(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);-var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==-C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?-"blank"===C.value?"_blank":z:null},getEditInput:function(){return l},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=C):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage+-"')");F.innerText="";F.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);-z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});-mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),-"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){var W=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==W||""==W.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,-null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+W.getHash(),c=!1);c&&null!=W&&null!=W.getTitle()&&W.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(W.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),l="");ea&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());da&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=W&&W.getMode()!=App.MODE_GITHUB&&W.getMode()!=App.MODE_GITLAB)?-EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){this.getBasenames();var W={};""!=z&&z!=mxConstants.NONE&&(W.highlight=z);"auto"!==t&&(W.target=t);J||(W.lightbox=!1);W.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(W.zoom=l/100);l=[];F&&(l.push("pages"),-W.resize=!0,null!=this.pages&&null!=this.currentPage&&(W.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),W.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(W["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),W.toolbar=l.join(" "));null!=ea&&0<ea.length&&(W.edit=ea);null!=c?W.url=c:W.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(W))+-'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";da(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace=-"nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");-C=N.cloneNode(!0);C.setAttribute("value","copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var J=this.getCurrentFile();null==l&&null!=J&&J.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")),F.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var ea=this.addLinkSection(z),da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));-da.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));da.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");da.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(da);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,-":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value="100%";z.appendChild(W);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),ma=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),la=this.addCheckbox(z,mxResources.get("lightbox"),-!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,la);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(la,"change",function(){la.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&la.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,W.value,ea.getTarget(),ea.getColor(),ba.checked,-ha.checked,ma.checked,Y.checked,la.checked,null!=Z?Z.getLink():null,null!=da?da.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,ea){var da=document.createElement("div");da.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";da.appendChild(ca);-var W=document.createElement("select");c=30;W.className="geBtn";W.style.marginBottom="8px";W.style.marginLeft="0px";W.style.width="100%";W.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),W.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value",-"auth");W.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");W.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",F),W.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));da.appendChild(W);mxUtils.br(da);W.focus();var ba=null,ha=null;if(null!=f||null!=-l)c+=30,mxUtils.write(da,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",da.appendChild(ba),mxUtils.write(da,mxResources.get("height")+":"),ha=document.createElement("input"),ha.setAttribute("type","text"),ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginBottom="10px",ha.value=l+"px",da.appendChild(ha),-mxUtils.br(da);var ma=this.addLinkSection(da,t),Y=J?this.addCheckbox(da,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var la=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),la=this.addCheckbox(da,mxResources.get("selectedPage")+": "+f));var Z=document.createElement("select");Z.style.maxWidth="260px";Z.style.marginLeft="8px";Z.style.marginTop=-"16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);ea&&(mxUtils.write(da,mxResources.get("appearance")+":"),da.appendChild(Z),mxUtils.br(da),-c+=30);var k=this.addCheckbox(da,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(da,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var T=this.addCheckbox(da,mxResources.get("layers"),!0);T.style.marginLeft=I.style.marginLeft;T.style.marginTop="8px";var P=this.addCheckbox(da,mxResources.get("tags"),!0);P.style.marginLeft=I.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?-(T.removeAttribute("disabled"),I.removeAttribute("disabled"),P.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,da,mxUtils.bind(this,function(){K(ma.getTarget(),ma.getColor(),null==la?!1:la.checked,k.checked,A.getLink(),T.checked,null!=ba?ba.value:null,null!=-ha?ha.value:null,P.checked,W.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):null==W.parentNode;ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.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:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");-K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var J=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ea=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var da=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom=-"16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,W=parseInt(K.value)||0;l(!J.checked,null!=ea?ea.checked:!1,null!=da?da.checked:!1,ca,W)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;var J=document.createElement("div");J.style.whiteSpace="nowrap";var ea=this.editor.graph,da="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");-mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,mxResources.get("zoom")+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value=this.lastExportZoom||"100%";J.appendChild(W);mxUtils.write(J,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");-ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";J.appendChild(ba);mxUtils.br(J);var ha=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,ea.isSelectionEmpty()),ma=document.createElement("input");ma.style.marginTop="16px";ma.style.marginRight="8px";ma.style.marginLeft="24px";ma.setAttribute("disabled","disabled");ma.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft=-"8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!ea.isSelectionEmpty()||"selectionOnly"!=c[ca]){var la=document.createElement("option");mxUtils.write(la,mxResources.get(c[ca]));la.setAttribute("value",c[ca]);Y.appendChild(la)}K?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(Y),mxUtils.br(J),da+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==Y.value&&(ha.checked=!0)})):C&&(J.appendChild(ma),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),da+=-30,mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled","disabled")}));ea.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",da-=30):(Y.value="diagram",ma.setAttribute("checked","checked"),ma.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),-!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),-C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(k);mxUtils.br(J);da+=26;var A=this.addCheckbox(J,mxResources.get("shadow"),ea.shadowVisible),I=null;if("png"==N||"jpeg"==N||"webp"==N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var T=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+-":",F,null,null,"jpeg"!=N&&"webp"!=N),P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){T.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")},ea=document.createElement("option"),ea.setAttribute("value","allPages"),mxUtils.write(ea,mxResources.get("allPages")),P.appendChild(ea),ea=document.createElement("option"),ea.setAttribute("value","currentPage"),mxUtils.write(ea,mxResources.get("currentPage")),P.appendChild(ea),-T.style.marginBottom="12px",P.style.marginBottom="16px",J.appendChild(P),mxUtils.br(J),da+=20,null!=this.lastEmbedInclude&&(P.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",F),F()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");f&&(U.checked=null!=this.lastEmbedImages?-this.lastEmbedImages:!0,J.appendChild(U),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(X),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),da+=50);var aa=document.createElement("select");aa.style.maxWidth="260px";aa.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");-F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin="7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(aa),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),da+=50);l=new CustomDialog(this,-J,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=W.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=P.value;z(W.value,Z.checked,!ha.checked,A.checked,T.checked,U.checked&&f,ba.value,ma.checked,("png"==N||"svg"==N)&&"currentPage"==P.value,aa.value,null!=I?I.checked:null,null!=k?k.value:null,Y.value,X.checked)}),null,l,t);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);W.focus();mxClient.IS_GC||mxClient.IS_FF||-5<=document.documentMode?W.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&-t,!t),ea=this.addCheckbox(C,l),da=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,da),W=ca.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=W.style.marginLeft;ha.style.marginBottom="12px";ha.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(ba&&ha.removeAttribute("disabled"),W.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),W.setAttribute("disabled",-"disabled"));W.checked&&da.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,ea.checked,da.checked,ca.getLink(),ha.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,z,C,F,N){function K(W){var ba=" ",ha="";t&&(ba=" 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!=ea?"&page="+ea:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var ma="";l&&(ma=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+W+'"'+ma+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var J=this.editor.graph.getGraphBounds(),ea=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(W){var ba=t?this.getFileData(!0):-null;W=this.createImageDataUri(W,ba,"png");K(W)}),null,null,null,mxUtils.bind(this,function(W){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+da+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=-ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var J=0;J<K.length;J++){var ea=K[J].getAttribute("href");null!=ea&&"#"==ea.charAt(0)&&"_blank"==K[J].getAttribute("target")&&K[J].removeAttribute("target")}t&&-N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var da=" ",ca="";t&&(da="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"+(z?"&edit=_blank":"")+(C?"&layers=1":-"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(W){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(W))+'"'+(""!=ca?' style="'+ca+'"':"")+da+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.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('"++function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(T){Editor.addRetryToError(T,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W)}));this.handleError(T)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var la=this.editor.graph.addForeignObjectWarning;+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=mxUtils.lightDarkColorSupported,ma=mxUtils.preferDarkColor;if("light"==da||"dark"==da)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==da;var Z=this.editor.graph.createSvgImageExport(z),k=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Z,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,da,ea);mxUtils.lightDarkColorSupported=Y;mxUtils.preferDarkColor=ma;this.editor.graph.addForeignObjectWarning=+la;t&&this.editor.graph.addSvgShadow(k);var A=this.getBaseFilename()+(z?".drawio":"")+".svg";W=null!=W?W:mxUtils.bind(this,function(T){this.isLocalFileSave()||T.length<=MAX_REQUEST_SIZE?this.saveData(A,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});var I=mxUtils.bind(this,function(T){this.spinner.stop();z&&T.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,+null,null,c,F));W(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(T))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);var U=mxUtils.bind(this,function(T){Editor.replaceSvgDataUris&&C&&EditorUi.embedSvgImages(T);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(T,da,I):I(T)}),O=mxUtils.bind(this,function(T){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(T,+U,this.thumbImageCache)):U(T)});ca?this.embedFonts(k,O):(this.editor.addFontCss(k),O(k))}catch(T){this.handleError(T)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ea,ca,W,ba,ha){var la=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");la.setAttribute("x",ca);la.setAttribute("y",W+.5);la.setAttribute("width",ba.width);la.setAttribute("height",ba.height);null==la.setAttributeNS?la.setAttribute("xlink:href",ha):la.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",+ha);ea.replaceChild(la,ea.lastChild);N()}function z(){if(F<da.length)da[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),K={},J={},da=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(ea){var ca=ea.getElementsByTagName("div");if(0<ca.length)try{var W=ca[0].cloneNode(!0),ba=parseInt(W.style.marginLeft),ha=parseInt(W.style.paddingTop),+la=W.getElementsByTagName("div")[1],Y=ca=!1,ma=W.style.alignItems,Z=W.style.justifyContent;if(null!=W.style.writingMode){var k=W.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==W.style.width||Y&&"1px"==W.style.height;if(!Y&&"1px"==W.style.height||Y&&"1px"==W.style.width)W.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(W.style.justifyContent="unsafe flex-start");W.style.paddingTop="";W.style.marginLeft="";var I=W.outerHTML,U=K[I];+null==U&&(W.style.position="absolute",W.style.visibility="hidden",document.body.appendChild(W),k=1,k="1px"==W.style.width?la.offsetWidth:parseInt(W.style.width),A=1,A="1px"==W.style.height?la.offsetHeight:parseInt(W.style.height),document.body.removeChild(W),U=new mxRectangle(ba,ha,k,A),K[I]=U);"1px"==W.style.height&&("unsafe center"==ma?ha-=U.height/2:"unsafe flex-end"==ma&&(ha-=U.height));if("1px"==W.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==ma)ba-=U.width/2;else if(!Y&&"unsafe flex-end"==+Z||Y&&(!ca&&"unsafe flex-end"==ma||ca&&"unsafe flex-start"==ma))ba-=U.width;U=new mxRectangle(ba,ha,U.width,U.height+parseInt(la.style.fontSize)/4);da.push(mxUtils.bind(this,function(O){var T=J[I];null==T?Graph.htmlToPng(I,U.width,U.height,mxUtils.bind(this,function(X){t(ea,ba,ha,U,X);J[I]=X;O()}),C):(t(ea,ba,ha,U,T),O())}))}catch(O){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=+function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=+function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));+C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,+300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?"blank"===C.value?"_blank":z:null},getEditInput:function(){return l},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing=+"border-box";null!=C&&C!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=C):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var z=document.createElement("option");+z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")++")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);+mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=+function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){var W=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==W||""==W.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+W.getHash(),c=!1);c&&null!=W&&null!=W.getTitle()&&W.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(W.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),+l="");da&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());ea&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=W&&W.getMode()!=App.MODE_GITHUB&&W.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){this.getBasenames();+var W={};""!=z&&z!=mxConstants.NONE&&(W.highlight=z);"auto"!==t&&(W.target=t);J||(W.lightbox=!1);W.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(W.zoom=l/100);l=[];F&&(l.push("pages"),W.resize=!0,null!=this.pages&&null!=this.currentPage&&(W.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),W.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(W["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),W.toolbar=l.join(" "));null!=da&&0<da.length&&(W.edit=+da);null!=c?W.url=c:W.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(W))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ea(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":+window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";+var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");C=N.cloneNode(!0);C.setAttribute("value","copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));+F.appendChild(K);var J=this.getCurrentFile();null==l&&null!=J&&J.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")),F.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var da=this.addLinkSection(z),+ea=document.createElement("select");ea.style.maxWidth="260px";ea.style.marginLeft="8px";ea.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected",+"selected");ea.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(ea);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value="100%";z.appendChild(W);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=+this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),la=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),ma=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,ma);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(ma,"change",function(){ma.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&+ma.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,W.value,da.getTarget(),da.getColor(),ba.checked,ha.checked,la.checked,Y.checked,ma.checked,null!=Z?Z.getLink():null,null!=ea?ea.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,da){var ea=document.createElement("div");+ea.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";ea.appendChild(ca);var W=document.createElement("select");c=30;W.className="geBtn";W.style.marginBottom="8px";W.style.marginLeft="0px";W.style.width="100%";W.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",+ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),W.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");W.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");W.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",+F),W.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ea.appendChild(W);mxUtils.br(ea);W.focus();var ba=null,ha=null;if(null!=f||null!=l)c+=30,mxUtils.write(ea,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value=+"100%",ea.appendChild(ba),mxUtils.write(ea,mxResources.get("height")+":"),ha=document.createElement("input"),ha.setAttribute("type","text"),ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginBottom="10px",ha.value=l+"px",ea.appendChild(ha),mxUtils.br(ea);var la=this.addLinkSection(ea,t),Y=J?this.addCheckbox(ea,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var ma=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?+this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ma=this.addCheckbox(ea,mxResources.get("selectedPage")+": "+f));var Z=document.createElement("select");Z.style.maxWidth="260px";Z.style.marginLeft="8px";Z.style.marginTop="16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));Z.appendChild(f);f=document.createElement("option");+f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);da&&(mxUtils.write(ea,mxResources.get("appearance")+":"),ea.appendChild(Z),mxUtils.br(ea),c+=30);var k=this.addCheckbox(ea,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(ea,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var U=this.addCheckbox(ea,mxResources.get("layers"),!0);U.style.marginLeft=I.style.marginLeft;+U.style.marginTop="8px";var O=this.addCheckbox(ea,mxResources.get("tags"),!0);O.style.marginLeft=I.style.marginLeft;O.style.marginBottom="16px";O.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?(U.removeAttribute("disabled"),I.removeAttribute("disabled"),O.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled",+"disabled")});t=new CustomDialog(this,ea,mxUtils.bind(this,function(){K(la.getTarget(),la.getColor(),null==ma?!1:ma.checked,k.checked,A.getLink(),U.checked,null!=ba?ba.value:null,null!=ha?ha.value:null,O.checked,W.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):null==W.parentNode;la.focus()};EditorUi.prototype.showRemoteExportDialog=+function(c,f,l,t,z){var C=document.createElement("div");C.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:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||+"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var J=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),da=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;+var ea=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ea&&(ea.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,W=parseInt(K.value)||0;l(!J.checked,null!=da?da.checked:!1,null!=ea?ea.checked:!1,ca,W)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;+var J=document.createElement("div");J.style.whiteSpace="nowrap";var da=this.editor.graph,ea="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,mxResources.get("zoom")+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value=this.lastExportZoom||+"100%";J.appendChild(W);mxUtils.write(J,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";J.appendChild(ba);mxUtils.br(J);var ha=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,da.isSelectionEmpty()),la=document.createElement("input");la.style.marginTop="16px";la.style.marginRight="8px";la.style.marginLeft="24px";la.setAttribute("disabled",+"disabled");la.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!da.isSelectionEmpty()||"selectionOnly"!=c[ca]){var ma=document.createElement("option");mxUtils.write(ma,mxResources.get(c[ca]));ma.setAttribute("value",c[ca]);Y.appendChild(ma)}K?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(Y),mxUtils.br(J),ea+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==+Y.value&&(ha.checked=!0)})):C&&(J.appendChild(la),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),ea+=30,mxEvent.addListener(ha,"change",function(){ha.checked?la.removeAttribute("disabled"):la.setAttribute("disabled","disabled")}));da.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",ea-=30):(Y.value="diagram",la.setAttribute("checked","checked"),la.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=+ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);+"svg"==N&&mxUtils.lightDarkColorSupported?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(k);mxUtils.br(J);ea+=26;var A=this.addCheckbox(J,mxResources.get("shadow"),da.shadowVisible),I=null;if("png"==N||"jpeg"==N||"webp"==+N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ea+=30;var U=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){U.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},da=document.createElement("option"),da.setAttribute("value","allPages"),mxUtils.write(da,mxResources.get("allPages")),+O.appendChild(da),da=document.createElement("option"),da.setAttribute("value","currentPage"),mxUtils.write(da,mxResources.get("currentPage")),O.appendChild(da),U.style.marginBottom="12px",O.style.marginBottom="16px",J.appendChild(O),mxUtils.br(J),ea+=20,null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(U,"change",F),F()):U.style.marginBottom="16px";var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");+var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");f&&(T.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,J.appendChild(T),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(X),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),ea+=50);var aa=document.createElement("select");aa.style.maxWidth="260px";aa.style.marginLeft=+"8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin=+"7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(aa),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),ea+=50);l=new CustomDialog(this,J,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=W.value;this.lastEmbedImages=T.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=O.value;z(W.value,Z.checked,!ha.checked,A.checked,U.checked,T.checked&&f,ba.value,la.checked,("png"==N||"svg"==N)&&"currentPage"==O.value,aa.value,+null!=I?I.checked:null,null!=k?k.value:null,Y.value,X.checked)}),null,l,t);this.showDialog(l.container,340,ea,!0,!0,null,null,null,null,!0);W.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?W.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";+C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),da=this.addCheckbox(C,l),ea=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,ea),W=ca.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=W.style.marginLeft;ha.style.marginBottom="12px";ha.style.marginTop="8px";mxEvent.addListener(ea,"change",function(){ea.checked?+(ba&&ha.removeAttribute("disabled"),W.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));W.checked&&ea.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,da.checked,ea.checked,ca.getLink(),ha.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=+function(c,f,l,t,z,C,F,N){function K(W){var ba=" ",ha="";t&&(ba=" 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!=da?"&page="+da:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",+ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var la="";l&&(la=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+W+'"'+la+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var J=this.editor.graph.getGraphBounds(),da=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(W){var ba=t?this.getFileData(!0):null;W=this.createImageDataUri(W,ba,"png");K(W)}),null,null,null,mxUtils.bind(this,function(W){N({message:mxResources.get("unknownError")})}),+null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ea="";l&&(ea="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+ea+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};+EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var J=0;J<K.length;J++){var da=K[J].getAttribute("href");null!=da&&"#"==da.charAt(0)&&"_blank"==K[J].getAttribute("target")&&K[J].removeAttribute("target")}t&&N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var ea=" ",ca="";t&&(ea="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"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(W){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(W))+'"'+(""!=ca?' style="'+ca+'"':"")+ea+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ca+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ca&&N.setAttribute("style",ca),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var t=parseFloat(c.getAttribute("scale"));!isNaN(t)&&0<t&&(f=t)}c.hasAttribute("border")&&(t=parseInt(c.getAttribute("border")),!isNaN(t)&&0<t&&(l=t))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,t,z){try{var C=this.editor.graph,F=null;if(null!=l&&0<l.length)C=this.createTemporaryGraph(C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(J){return"page"==J?K.getName():"pagenumber"==J?1:N.apply(this,arguments)};document.body.appendChild(C.container);-C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ea=J.toDataURL("image/png");ea=Editor.writeGraphModelToPng(ea,"tEXt","mxfile",encodeURIComponent(F));c(ea.substring(ea.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(da){null!=f&&f(da)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,C.shadowVisible,null,-C,z,null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){N=null!=N?N:!0;ea=null!=ea?ea:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,J,ea,null,null,C,null,K,null,f.shadowVisible||da,null,ca,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(C,null,null,0==ea);null!=c&&C.setAttribute("content",c);null!=+C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=J.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(F));c(da.substring(da.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ea){null!=f&&f(ea)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,C.shadowVisible,null,+C,z,null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){N=null!=N?N:!0;da=null!=da?da:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,J,da,null,null,C,null,K,null,f.shadowVisible||ea,null,ca,"diagram");(f.shadowVisible||ea)&&f.addSvgShadow(C,null,null,0==da);null!=c&&C.setAttribute("content",c);null!=l&&C.setAttribute("resource",l);var W=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){W(ha)})):W(ba)}));else return W(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,ea,da,-ca)}));this.handleError(ba)}))){var W=this.editor.graph.isSelectionEmpty();l=null!=l?l:W;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,ea)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),-null,l,c||1,f,t,null,null,C,F,J,da,ca)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<-c.length){K.model.beginUpdate();try{var J=mxUtils.parseXml(c);c={};var ea=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=ea&&"mxfile"==ea.nodeName&&null!=this.pages){var da=ea.getElementsByTagName("diagram");if(1==da.length&&!C){if(ea=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(c[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=da[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,-ca))}}else if(0<da.length){C=[];var W=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[da[0].getAttribute("id")]=this.pages[0].getId(),ca=da[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),ea=Editor.parseDiagramNode(da[0]),t=!1,W=1);for(;W<da.length;W++){var ba=da[W].getAttribute("id");da[W].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(da[W]));c[ba]=da[W].getAttribute("id");var ma=this.pages.length;-null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[ma+1]));K.model.execute(new ChangePage(this,ha,ha,ma,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=ea&&"mxGraphModel"===ea.nodeName){N=K.importGraphModel(ea,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),W=0;W<N.length;W++)this.updatePageLinksForCell(c,N[W]);var Y=K.parseBackgroundImage(ea.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var la=new ChangePageSetup(this,-null,Y);la.ignoreColor=!0;K.model.execute(la)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,da,ea,+ca)}));this.handleError(ba)}))){var W=this.editor.graph.isSelectionEmpty();l=null!=l?l:W;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,da)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),+null,l,c||1,f,t,null,null,C,F,J,ea,ca)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<+c.length){K.model.beginUpdate();try{var J=mxUtils.parseXml(c);c={};var da=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=da&&"mxfile"==da.nodeName&&null!=this.pages){var ea=da.getElementsByTagName("diagram");if(1==ea.length&&!C){if(da=Editor.parseDiagramNode(ea[0]),null!=this.currentPage&&(c[ea[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ea[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,+ca))}}else if(0<ea.length){C=[];var W=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ea[0].getAttribute("id")]=this.pages[0].getId(),ca=ea[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),da=Editor.parseDiagramNode(ea[0]),t=!1,W=1);for(;W<ea.length;W++){var ba=ea[W].getAttribute("id");ea[W].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(ea[W]));c[ba]=ea[W].getAttribute("id");var la=this.pages.length;+null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[la+1]));K.model.execute(new ChangePage(this,ha,ha,la,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=da&&"mxGraphModel"===da.nodeName){N=K.importGraphModel(da,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),W=0;W<N.length;W++)this.updatePageLinksForCell(c,N[W]);var Y=K.parseBackgroundImage(da.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var ma=new ChangePageSetup(this,+null,Y);ma.ignoreColor=!0;K.model.execute(ma)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,z=t.getLinkForCell(f);null!=z&&t.setLinkForCell(f,this.updatePageLink(c,z));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var C=l.getElementsByTagName("a"),F=!1,N=0;N<C.length;N++)z=C[N].getAttribute("href"),null!=z&&(C[N].setAttribute("href",this.updatePageLink(c,z)),F=!0);F&&t.labelChanged(f,l.innerHTML)}for(N=0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var z=0;z<t.actions.length;z++){var C=t.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var F=C.open.substring(C.open.indexOf(",")+1);l=c[F];null!=l?C.open="data:page/id,"+l:null==this.getPageById(F)&&delete C.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,z){var C=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){t=null!=t?t:c.name;var N=mxUtils.bind(this,-function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var ea=t.lastIndexOf(".");if(0<=ea&&ea<t.length)t.substring(ea+1).toUpperCase();else{var da=t.lastIndexOf("/");0<=da&&da<t.length&&(t=t.substring(da+1))}}catch(W){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;-J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var W=ca.response;if("text/xml"==W.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(ma){N({message:mxResources.get("errorLoadingFile")})}});+function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var da=t.lastIndexOf(".");if(0<=da&&da<t.length)t.substring(da+1).toUpperCase();else{var ea=t.lastIndexOf("/");0<=ea&&ea<t.length&&(t=t.substring(ea+1))}}catch(W){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;+J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var W=ca.response;if("text/xml"==W.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(la){N({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(W)}else this.doImportVisio(W,f,N,t)}catch(ha){N(ha)}else try{""==ca.responseType||"text"==ca.responseType?N({message:ca.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ca.response))}catch(ha){N({})}});ca.send(J)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(W){N(W)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,N))}),C)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){C(N)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),f)}};EditorUi.prototype.convertLucidChart=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&-K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(ea){}}catch(ea){null!=window.console&&console.error(ea),C(ea)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",+K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(da){}}catch(da){null!=window.console&&console.error(da),C(da)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,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",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",-c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ea=mxUtils.trim(K.getText());this.generateMermaidImage(ea,null,mxUtils.bind(this,function(da,ca,W){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",ea),f(ea,da,ca,W))}),N)}),N,mxUtils.bind(this,function(da){3>-t++?C.clear()&&z():N(da)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(ea){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?+c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var da=mxUtils.trim(K.getText());this.generateMermaidImage(da,null,mxUtils.bind(this,function(ea,ca,W){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",da),f(da,ea,ca,W))}),N)}),N,mxUtils.bind(this,function(ea){3>+t++?C.clear()&&z():N(ea)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(da){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=-K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var ea=parseFloat(J[0].getAttribute("width")),da=parseFloat(J[0].getAttribute("height"));if(isNaN(ea)||isNaN(da))try{var ca=J[0].getAttribute("viewBox").split(/\s+/);ea=parseFloat(ca[2]);da=parseFloat(ca[3])}catch(W){ea=ea||100,da=da||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),-ea,da)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(W){t(W)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,+K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var da=parseFloat(J[0].getAttribute("width")),ea=parseFloat(J[0].getAttribute("height"));if(isNaN(da)||isNaN(ea))try{var ca=J[0].getAttribute("viewBox").split(/\s+/);da=parseFloat(ca[2]);ea=parseFloat(ca[3])}catch(W){da=da||100,ea=ea||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),+da,ea)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(W){t(W)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,J){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|J>>6;c4=J&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==-f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var ea=new Image;ea.onload=function(){try{var da=ea.width,ca=ea.height;if(0==da&&0==ca){var W=K.result,ba=W.indexOf(","),ha=decodeURIComponent(escape(atob(W.substring(ba+1)))),ma=mxUtils.parseXml(ha).getElementsByTagName("svg");0<ma.length&&(da=parseFloat(ma[0].getAttribute("width")),ca=parseFloat(ma[0].getAttribute("height")))}l(K.result,da,ca)}catch(Y){t(Y)}};ea.src=K.result};K.onerror=function(J){t(J)}}else t(N)};+f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var da=new Image;da.onload=function(){try{var ea=da.width,ca=da.height;if(0==ea&&0==ca){var W=K.result,ba=W.indexOf(","),ha=decodeURIComponent(escape(atob(W.substring(ba+1)))),la=mxUtils.parseXml(ha).getElementsByTagName("svg");0<la.length&&(ea=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(K.result,ea,ca)}catch(Y){t(Y)}};da.src=K.result};K.onerror=function(J){t(J)}}else t(N)};F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=-J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var ea=this.importXml(J,f,l,C,!0,N);if(0<ea.length)return ea}catch(ca){}this.loadImage(c,-mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ha,ma,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ma,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var W=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ba=Math.round(ca.width*W);ca=Math.round(ca.height*+J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var da=this.importXml(J,f,l,C,!0,N);if(0<da.length)return da}catch(ca){}this.loadImage(c,+mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ha,la,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),la,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var W=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ba=Math.round(ca.width*W);ca=Math.round(ca.height*W);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,C,null,N))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));-K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var da=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=da.width;z.geometry.height=da.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};+K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var ea=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=ea.width;z.geometry.height=ea.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;-this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,ea){J=ea.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,ea.async("string").then(function(da){0==-da.indexOf("<mxfile ")?f(da):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=ea))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(ea){4==ea.readyState&&(200<=ea.status&&299>=ea.status?f(ea.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||-this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,ea,da){J=null!=J?J:!0;var ca=!1,W=null,ba=mxUtils.bind(this,function(ha){var ma=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):ma=this.importXml(ha,l,t,J,null,null!=da?mxEvent.isControlDown(da):null);null!=N&&N(ma)});"image"==f.substring(0,5)?(K=-!1,"image/png"==f.substring(0,9)&&(ea=ea?null:this.extractGraphModelFromPng(c),null!=ea&&0<ea.length&&(W=this.importXml(ea,l,t,J,null,null!=da?mxEvent.isControlDown(da):null),K=!0)),K||(K=this.editor.graph,ea=c.indexOf(";"),0<ea&&(c=c.substring(0,ea)+c.substring(c.indexOf(",",ea+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),ea="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(ea+="editableCssRules=.*;"),-W=[K.insertVertex(null,null,"",l,t,z,C,ea+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),-413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(W)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=da?mxEvent.isControlDown(da):null));ca||null==N||N(W);return W};EditorUi.prototype.importFiles=-function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var W=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ma=ea||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>ma){ha=!0;break}var la=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(X,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=-X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(W=!1,pa=ja=0);return this.importFile(X,aa,ja,pa,sa,qa,wa,Ba,za,W,da,ca)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(X){Z.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,-I=A,T=[],P=mxUtils.bind(this,function(X,aa){T[X]=aa;if(0==--I){this.spinner.stop();if(null!=N)N(T);else{var ja=[];Z.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var pa=T[X]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),U=0;U<A;U++)mxUtils.bind(this,function(X){var aa=c[X];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),-qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=da?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?P(X,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");+this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,da){J=da.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,da.async("string").then(function(ea){0==+ea.indexOf("<mxfile ")?f(ea):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=da))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?f(da.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||+this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,da,ea){J=null!=J?J:!0;var ca=!1,W=null,ba=mxUtils.bind(this,function(ha){var la=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):la=this.importXml(ha,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null);null!=N&&N(la)});"image"==f.substring(0,5)?(K=+!1,"image/png"==f.substring(0,9)&&(da=da?null:this.extractGraphModelFromPng(c),null!=da&&0<da.length&&(W=this.importXml(da,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null),K=!0)),K||(K=this.editor.graph,da=c.indexOf(";"),0<da&&(c=c.substring(0,da)+c.substring(c.indexOf(",",da+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),da="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(da+="editableCssRules=.*;"),+W=[K.insertVertex(null,null,"",l,t,z,C,da+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),+413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(W)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=ea?mxEvent.isControlDown(ea):null));ca||null==N||N(W);return W};EditorUi.prototype.importFiles=+function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var W=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var la=da||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>la){ha=!0;break}var ma=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(X,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=+X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(W=!1,pa=ja=0);return this.importFile(X,aa,ja,pa,sa,qa,wa,Ba,za,W,ea,ca)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(X){Z.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,+I=A,U=[],O=mxUtils.bind(this,function(X,aa){U[X]=aa;if(0==--I){this.spinner.stop();if(null!=N)N(U);else{var ja=[];Z.getModel().beginUpdate();try{for(X=0;X<U.length;X++){var pa=U[X]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),T=0;T<A;T++)mxUtils.bind(this,function(X){var aa=c[X];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),+qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=ea?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?O(X,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");if(0<Ma.length){var Ha=Ma[0],Aa=Ha.getAttribute("width"),Ra=Ha.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ra=null!=Ra&&"%"!=Ra.charAt(Ra.length-1)?parseFloat(Ra):NaN;var Za=Ha.getAttribute("viewBox");if(null==Za||0==Za.length)Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);else if(isNaN(Aa)||isNaN(Ra)){var La=Za.split(" ");3<La.length&&(Aa=parseFloat(La[2]),Ra=parseFloat(La[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var $a=Math.min(1,Math.min(t/Math.max(1,Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+X*k,l+X*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",-sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):P(X,mxUtils.bind(this,function(){return z(ra,"text/xml",f+X*k,l+X*k,0,0,aa.name)}))}else P(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=da?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;P(X,mxUtils.bind(this,function(){return z(ya,"text/xml",f+X*k,l+X*k,Ca.width,Ca.height,aa.name)}));-qa=!0}}qa||(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(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){P(X,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var Za=ba&&this.isResampleImageSize(aa.size,-ea)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+X*k,l+X*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,ea,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+X*k,l+X*k,240,160,aa.name,function(Ma){P(X,function(){return Ma})},aa)}catch(Ma){P(X,mxUtils.bind(this,function(){return null})),null!=window.console&&-console.error(Ma,aa)}else P(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+X*k,l+X*k,240,160,aa.name,function(pa){P(X,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(U)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;la()},K)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&+sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):O(X,mxUtils.bind(this,function(){return z(ra,"text/xml",f+X*k,l+X*k,0,0,aa.name)}))}else O(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=ea?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;O(X,mxUtils.bind(this,function(){return z(ya,"text/xml",f+X*k,l+X*k,Ca.width,Ca.height,aa.name)}));+qa=!0}}qa||(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(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){O(X,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var Za=ba&&this.isResampleImageSize(aa.size,+da)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+X*k,l+X*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,da,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+X*k,l+X*k,240,160,aa.name,function(Ma){O(X,function(){return Ma})},aa)}catch(Ma){O(X,mxUtils.bind(this,function(){return null})),null!=window.console&&+console.error(Ma,aa)}else O(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+X*k,l+X*k,240,160,aa.name,function(pa){O(X,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(T)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;ma()},K)}else ma()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,!0)},function(C){z(C,!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?226:200,!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,-F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var ea=Math.max(N/z,K/z);if(1<ea){var da=Math.round(N/ea),ca=Math.round(K/ea),W=document.createElement("canvas");W.width=da;W.height=ca;W.getContext("2d").drawImage(c,0,0,da,ca);var ba=W.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=da;ha.height=ca;var ma=ha.toDataURL();ba!==ma&&(f=ba,N=da,K=ca)}}}catch(Y){}t&&J!=f&&z>+F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var da=Math.max(N/z,K/z);if(1<da){var ea=Math.round(N/da),ca=Math.round(K/da),W=document.createElement("canvas");W.width=ea;W.height=ca;W.getContext("2d").drawImage(c,0,0,ea,ca);var ba=W.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=ea;ha.height=ca;var la=ha.toDataURL();ba!==la&&(f=ba,N=ea,K=ca)}}}catch(Y){}t&&J!=f&&z>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});-f.cellEditor.editPlantUmlData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",T.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,T.format,function(U,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==T.format)f.labelChanged(k,"<pre>"+U+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(U),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=-X,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:P,format:T.format}))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",T.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,T.config,-function(U,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",U,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,X),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:P,config:T.config},null,2))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=-function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var T=f.getCellStyle(k);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(P){c.handleError(P)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var T=this.getGraphBounds();-c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(P){c.handleError(P)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,+f.cellEditor.editPlantUmlData=function(k,A,I){var U=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",U.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,U.format,function(T,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==U.format)f.labelChanged(k,"<pre>"+T+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(T),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=+X,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:O,format:U.format}))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,I){var U=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",U.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,U.config,+function(T,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",T,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,X),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:O,config:U.config},null,2))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=+function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var U=f.getCellStyle(k);"1"==mxUtils.getValue(U,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var U=this.getGraphBounds();+c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!U.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(O){c.handleError(O)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var I=k.indexOf(",");if(0<I)for(k=k.substring(I+1),A=A.getProperty("patches"),I=0;I<A.length;I++)if(null!=A[I][EditorUi.DIFF_UPDATE]&&null!=A[I][EditorUi.DIFF_UPDATE][k]||null!=A[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[I][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var I=F.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=A?c.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var T=A;A=function(P,U,X){if(null==U){var aa=mxEvent.getSource(P);"a"==aa.nodeName.toLowerCase()&&(U=aa.getAttribute("href"))}null!=-U&&f.isCustomLink(U)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&f.customLinkClicked(U,X)&&mxEvent.consume(P);null!=T&&T(P,U,X)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);-f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var ea=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())ea.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,-A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var T=f.getModel().getGeometry(A);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(k,-["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(k,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;-this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var da=f.getExportVariables;f.getExportVariables=function(){var k=da.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var U=A;A=function(O,T,X){if(null==T){var aa=mxEvent.getSource(O);"a"==aa.nodeName.toLowerCase()&&(T=aa.getAttribute("href"))}null!=+T&&f.isCustomLink(T)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(T,X)&&mxEvent.consume(O);null!=U&&U(O,T,X)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);+f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var da=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())da.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,+A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var U=f.getModel().getGeometry(A);null!=U&&null!=U.points&&0<U.points.length&&this.addMenuItems(k,+["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);U=c.getSelectionState();null!=U.mergeCell?this.addMenuItem(k,"mergeCells"):(1<U.style.colspan||1<U.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var ea=f.getExportVariables;f.getExportVariables=function(){var k=ea.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var W=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;W!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),-f.view.validate());W=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var T=A.getAttribute("href");if(null==T||!f.isCustomLink(T)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(T),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};-var ma=this.actions.get("print");ma.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ma.visible=ma.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,+f.view.validate());W=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var U=A.getAttribute("href");if(null==U||!f.isCustomLink(U)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(U),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};+var la=this.actions.get("print");la.setEnabled(!mxClient.IS_IOS||!navigator.standalone);la.visible=la.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=-A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(T){null!=I&&(I.parentNode.removeChild(I),I=null);T.stopPropagation();-T.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(T){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(T){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,aa,ja,pa,sa){f.insertImage(U,pa,sa)},function(){},function(U){return"image/"==U.type.substring(0,-6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var P=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(U){var X=Math.max(1,U.width);U=Math.max(1,U.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,X)),aa/Math.max(1,U));f.insertImage(decodeURIComponent(P),X*aa,U*aa)})):document.execCommand("insertHTML",-!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ma=this.editor.graph.view;var Y=mxSettings.getUnit();ma.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:-Y;ma.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ma.unit);this.refresh()}if("1"==urlParams.styledev){ma=document.getElementById("geFooter");null!=ma&&(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)})),ma.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,-mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:la.apply(this,arguments)}}ma=document.getElementById("geInfo");null!=ma&&ma.parentNode.removeChild(ma);if(Graph.fileSupport&&+A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(U){null!=I&&(I.parentNode.removeChild(I),I=null);U.stopPropagation();+U.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(U){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(U){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<U.dataTransfer.files.length)this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,function(T,X,aa,ja,pa,sa){f.insertImage(T,pa,sa)},function(){},function(T){return"image/"==T.type.substring(0,+6)},function(T){for(var X=0;X<T.length;X++)T[X]()},mxEvent.isControlDown(U));else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var O=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(T){var X=Math.max(1,T.width);T=Math.max(1,T.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,X)),aa/Math.max(1,T));f.insertImage(decodeURIComponent(O),X*aa,T*aa)})):document.execCommand("insertHTML",+!1,U.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(U.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(U.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/plain"));U.stopPropagation();U.preventDefault()})))}));if(Editor.isSettingsEnabled()){la=this.editor.graph.view;var Y=mxSettings.getUnit();la.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:+Y;la.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,la.unit);this.refresh()}if("1"==urlParams.styledev){la=document.getElementById("geFooter");null!=la&&(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)})),la.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,+mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var ma=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:ma.apply(this,arguments)}}la=document.getElementById("geInfo");null!=la&&la.parentNode.removeChild(la);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,-"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,T=f.view.translate,P=f.view.scale,U=A.x/P-T.x,X=A.y/P-T.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(X=U=null),this.importFiles(I,U,X,this.maxImageSize,-null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(X=U=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,U,X,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);-var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(ja=I[0].getAttribute("src"),null==ja&&(ja=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(I=A.getElementsByTagName("a"),null!=I&&1==I.length?ja=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,U,X,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=-ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",U,X,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,U,X,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),U,X,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();-this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),P=parseInt(this.div.offsetHeight),-U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-P))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ma=Editor.currentTheme,"simple"==ma||"sketch"==ma)Editor.currentTheme="",this.doSetCurrentTheme(ma,-mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);ma=!1;null!=urlParams.dark?ma=urlParams.dark:(ma="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ma&&"auto"!=mxSettings.settings.darkMode||(ma=mxSettings.settings.darkMode));"auto"==ma&&-this.isAutoDarkModeSupported()&&(ma=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ma?"1"==ma:ma);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&+"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,U=f.view.translate,O=f.view.scale,T=A.x/O-U.x,X=A.y/O-U.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(X=T=null),this.importFiles(I,T,X,this.maxImageSize,+null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(X=T=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,T,X,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);+var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(ja=I[0].getAttribute("src"),null==ja&&(ja=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(I=A.getElementsByTagName("a"),null!=I&&1==I.length?ja=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,T,X,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=+ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",T,X,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,T,X,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),T,X,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();+this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,U=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),+T=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(U,T-O))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(la=Editor.currentTheme,"simple"==la||"sketch"==la)Editor.currentTheme="",this.doSetCurrentTheme(la,+mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);la=!1;null!=urlParams.dark?la=urlParams.dark:(la="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||la&&"auto"!=mxSettings.settings.darkMode||(la=mxSettings.settings.darkMode));"auto"==la&&+this.isAutoDarkModeSupported()&&(la=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof la?"1"==la:la);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius="5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,-mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var ea=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",ea=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",+mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var da=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",da=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==C&&null==F||mxEvent.consume(J);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,-function(K,J,ea,da,ca,W){c.insertImage(K,ca,W)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,+function(K,J,da,ea,ca,W){c.insertImage(K,ca,W)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML=" ";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||@@ -3873,21 +3873,21 @@ this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCellC.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&(N=!0,F=K)}catch(ba){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(ba){var ha=-this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var ma=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,ma,ma));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var J=!1,ea="";ea=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==-z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var da=ea.lastIndexOf("%3E");0<=da&&da<ea.length-3&&(ea=ea.substring(0,da+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(ea))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,ea=-K)}catch(ba){}try{if(null!=ea&&0<ea.length){if(0==ea.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{ea=(new MiroImporter).importMiroJson(JSON.parse(ea)),this.pasteXml(ea,t,J,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(ea,t,J,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var W=this.editor.graph;W.lastPasteXml=null;W.pasteCounter=+this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var la=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,la,la));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var J=!1,da="";da=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==+z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var ea=da.lastIndexOf("%3E");0<=ea&&ea<da.length-3&&(da=da.substring(0,ea+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,da=+K)}catch(ba){}try{if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,t,J,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,t,J,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var W=this.editor.graph;W.lastPasteXml=null;W.pasteCounter=0}}catch(ba){this.handleError(ba)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+-1:1,F=mxUtils.bind(this,function(ma,Y,la,Z){var k=ma.useCssTransforms,A=ma.currentTranslate,I=ma.currentScale,T=ma.view.translate,P=ma.view.scale;ma.useCssTransforms&&(ma.useCssTransforms=!1,ma.currentTranslate=new mxPoint(0,0),ma.currentScale=1,ma.view.translate=new mxPoint(0,0),ma.view.scale=1);var U=ma.getGraphBounds(),X=0,aa=0,ja=mxRectangle.fromRectangle(ma.pageFormat),pa=f.fit||f.crop||!ma.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*ma.pageScale);ja.height=Math.ceil(ja.height*ma.pageScale);-var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(U.height/ma.view.scale),ja.width*qa/(U.width/ma.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&ma.pageVisible?(sa=ma.getPageLayout(),X-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(U=t.getBoundingBox(t.getSelectionCells())),ja.width=(U.width+1)*qa/ma.view.scale,ja.height=(U.height+1)*qa/ma.view.scale);ja.width=Math.ceil(1*-ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(ma,qa,null,0,X,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;X=f.border;isNaN(X)||(Y.pageMargin=X);f.selection&&(Y.isCellVisible=function(ra){return ma.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),-ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=ma.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)++1:1,F=mxUtils.bind(this,function(la,Y,ma,Z){var k=la.useCssTransforms,A=la.currentTranslate,I=la.currentScale,U=la.view.translate,O=la.view.scale;la.useCssTransforms&&(la.useCssTransforms=!1,la.currentTranslate=new mxPoint(0,0),la.currentScale=1,la.view.translate=new mxPoint(0,0),la.view.scale=1);var T=la.getGraphBounds(),X=0,aa=0,ja=mxRectangle.fromRectangle(la.pageFormat),pa=f.fit||f.crop||!la.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*la.pageScale);ja.height=Math.ceil(ja.height*la.pageScale);+var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(T.height/la.view.scale),ja.width*qa/(T.width/la.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&la.pageVisible?(sa=la.getPageLayout(),X-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(T=t.getBoundingBox(t.getSelectionCells())),ja.width=(T.width+1)*qa/la.view.scale,ja.height=(T.height+1)*qa/la.view.scale);ja.width=Math.ceil(1*+ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(la,qa,null,0,X,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;X=f.border;isNaN(X)||(Y.pageMargin=X);f.selection&&(Y.isCellVisible=function(ra){return la.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),+ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=la.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)+'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Ea=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ma,Ha,Aa){Ea.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};-f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.open(null,null,la,!0,Z,ja,f.selection?ma.getSelectionCells():null)}else{U=ma.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";Y.backgroundColor=U;Y.autoOrigin=pa;f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.appendGraph(ma,qa,-X,aa,la,!0,Z,ja,f.selection?ma.getSelectionCells():null);la=ma.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<la.length;ja++)X=la[ja].name,aa=la[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(X)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&-(ma.useCssTransforms=k,ma.currentTranslate=A,ma.currentScale=I,ma.view.translate=T,ma.view.scale=P);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var ea=J;ea<=C;ea++){var da=this.pages[ea];N=da==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);-N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,W=null;null==da.viewState&&null==da.root&&this.updatePageRoot(da);null!=da.viewState&&(K=da.viewState.pageVisible,J=da.viewState.mathEnabled,ca=da.viewState.background,W=da.viewState.backgroundImage,N.pageFormat=da.viewState.pageFormat,N.gridSize=da.viewState.gridSize);null!=W&&null!=W.originalSrc&&(W=this.createImageForPageLink(W.originalSrc,da));N.background=ca;N.backgroundImage=null!=-W?new mxImage(W.src,W.width,W.height,W.x,W.y):null;N.pageVisible=K;N.mathEnabled=J;var ba=N.getGraphBounds;N.getGraphBounds=function(){var ma=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var la=this.view.translate,Z=this.view.scale;ma=mxRectangle.fromRectangle(ma);ma.add(new mxRectangle((la.x+Y.x)*Z,(la.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return ma};var ha=N.getGlobalVariable;N.getGlobalVariable=function(ma){return"page"==ma?da.getName():"pagenumber"==ma?-ea+1:"pagecount"==ma?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(da);N.model.setRoot(da.root)}z=F(N,z,ea!=C,da.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),+f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.open(null,null,ma,!0,Z,ja,f.selection?la.getSelectionCells():null)}else{T=la.background;if(null==T||""==T||T==mxConstants.NONE)T="#ffffff";Y.backgroundColor=T;Y.autoOrigin=pa;f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.appendGraph(la,qa,+X,aa,ma,!0,Z,ja,f.selection?la.getSelectionCells():null);ma=la.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<ma.length;ja++)X=ma[ja].name,aa=ma[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(X)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&+(la.useCssTransforms=k,la.currentTranslate=A,la.currentScale=I,la.view.translate=U,la.view.scale=O);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var da=J;da<=C;da++){var ea=this.pages[da];N=ea==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);+N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,W=null;null==ea.viewState&&null==ea.root&&this.updatePageRoot(ea);null!=ea.viewState&&(K=ea.viewState.pageVisible,J=ea.viewState.mathEnabled,ca=ea.viewState.background,W=ea.viewState.backgroundImage,N.pageFormat=ea.viewState.pageFormat,N.gridSize=ea.viewState.gridSize);null!=W&&null!=W.originalSrc&&(W=this.createImageForPageLink(W.originalSrc,ea));N.background=ca;N.backgroundImage=null!=+W?new mxImage(W.src,W.width,W.height,W.x,W.y):null;N.pageVisible=K;N.mathEnabled=J;var ba=N.getGraphBounds;N.getGraphBounds=function(){var la=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var ma=this.view.translate,Z=this.view.scale;la=mxRectangle.fromRectangle(la);la.add(new mxRectangle((ma.x+Y.x)*Z,(ma.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return la};var ha=N.getGlobalVariable;N.getGlobalVariable=function(la){return"page"==la?ea.getName():"pagenumber"==la?+da+1:"pagecount"==la?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ea);N.model.setRoot(ea.root)}z=F(N,z,da!=C,ea.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):@@ -3911,38 +3911,38 @@ this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();tf){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,J){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,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var J=K.data,ea=null,da=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):+"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,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var J=K.data,da=null,ea=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ca=!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[J])}catch(ra){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));return}if("prompt"==J.action){this.spinner.stop();var W=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",-value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(W.container,300,80,!0,!1);W.init();return}if("draft"==J.action){var ba=da(J.xml);this.spinner.stop();W=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();+value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(W.container,300,80,!0,!1);W.init();return}if("draft"==J.action){var ba=ea(J.xml);this.spinner.stop();W=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):null,J.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):null);this.showDialog(W.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&-this.actions.get("exit").funct()}));try{W.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ha=1==J.enableRecent,ma=1==J.enableSearch,Y=1==J.enableCustomTemp;W=new NewDialog(this,!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,-libs:Ma,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,ma?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",-docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(W.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));W.init();return}if("textContent"==J.action){var la=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:la,message:J}),"*");return}if("status"==+this.actions.get("exit").funct()}));try{W.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ha=1==J.enableRecent,la=1==J.enableSearch,Y=1==J.enableCustomTemp;W=new NewDialog(this,!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,+libs:Ma,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,la?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",+docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(W.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));W.init();return}if("textContent"==J.action){var ma=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:ma,message:J}),"*");return}if("status"==J.action){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==J.action){var Z=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){null!=J.viewport&&(this.embedViewport=J.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==J.action){W=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),W=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=W&&this.restoreScrollState(W);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);-return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,T=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){T(ra,Ma)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,-"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),P=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);T(ra)}),U=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():-this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==U){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(I.container);-I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ma=I.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<J.layerIds.length;Ca++)Aa[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){P(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){P(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,-J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?T("data:image/png;base64,"+ra.getText()):P(null)}),-mxUtils.bind(this,function(){P(null)}))}}else if(X=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;+return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,U=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){U(ra,Ma)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,+"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),O=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);U(ra)}),T=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():+this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=T){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==T){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(I.container);+I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ma=I.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<J.layerIds.length;Ca++)Aa[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){O(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){O(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,+J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=T?"&pageId="+T:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):O(null)}),+mxUtils.bind(this,function(){O(null)}))}}else if(X=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=J.background?J.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";J.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(Ma=J.theme);if("xmlsvg"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=J.theme&&(Ma=J.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,J.embedImages,ya,J.scale,J.border,J.shadow,Ma)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||J.shadow,null,Ma),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){J.embedImages||null==J.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){aa.apply(this,arguments);X()}}l=!0;this.setFileData(J.xml);l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==J.action){ca=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var ja=Editor.sketchMode;this.doSetSketchMode(J.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=-"";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;ea=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*+"";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;da=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,J.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),-this.embedFilenameSpan=ba);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=da(J.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?+this.embedFilenameSpan=ba);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=ea(J.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,K.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,ya,null,ca)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",-f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=ea&&ea()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==-J.substring(0,34)?(da="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),da)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&-299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=da(J),Ea(J,K)):this.loadDescriptor(J,-mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,ea){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:ea}),"*")}}};EditorUi.prototype.createEmbedButton=+f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=da&&da()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==+J.substring(0,34)?(ea="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ea)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&+299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=ea(J),Ea(J,K)):this.loadDescriptor(J,+mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,da){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:da}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?@@ -3951,23 +3951,23 @@ mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct)new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,ea=null,da=null,ca=-null,W=null,ba=null,ha=null,ma="whiteSpace=wrap;html=1;",Y=null,la=null,Z="",k="auto",A="auto",I=!1,T=null,P=null,U=40,X=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";la=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=-l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?W=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?ea=Aa:"parentstyle"==Ha?ma=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==-Ha&&0<Aa.length&&"-"!=Aa?ca=Aa:"styles"==Ha&&0<Aa.length&&"-"!=Aa?da=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?J=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?la=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?I="true"==Aa:"left"==Ha&&0<Aa.length?T=Aa:"top"==Ha&&0<Aa.length?P=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):-"edgespacing"==Ha?U=parseFloat(Aa):"nodespacing"==Ha?X=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),la==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==+function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,da=null,ea=null,ca=+null,W=null,ba=null,ha=null,la="whiteSpace=wrap;html=1;",Y=null,ma=null,Z="",k="auto",A="auto",I=!1,U=null,O=null,T=40,X=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";ma=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=+l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?W=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?da=Aa:"parentstyle"==Ha?la=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==+Ha&&0<Aa.length&&"-"!=Aa?ca=Aa:"styles"==Ha&&0<Aa.length&&"-"!=Aa?ea=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?J=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?ma=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?I="true"==Aa:"left"==Ha&&0<Aa.length?U=Aa:"top"==Ha&&0<Aa.length?O=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):+"edgespacing"==Ha?T=parseFloat(Aa):"nodespacing"==Ha?X=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),ma==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==N[Ea[Za].to]&&(N[Ea[Za].to]={});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,-sa,0,0),ea||"whiteSpace=wrap;html=1;");M.collapsed=I;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,I);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=W&&null!=ha){var V=ha[M.getAttribute(W)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ca&&null!=da){var ia=da[M.getAttribute(ca)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,-J);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);la=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=-null!=la?0:qa;Ca=null!=la?0:wa;null!=T&&null!=Da.getAttribute(T)&&(Da.geometry.x=$a+parseFloat(Da.getAttribute(T)));null!=P&&null!=Da.getAttribute(P)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(P)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=-A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+X}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=la?(la.style=K.replacePlaceholders(la,ma,J),K.addCell(Da,la),z.push(la)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);+sa,0,0),da||"whiteSpace=wrap;html=1;");M.collapsed=I;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,I);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=W&&null!=ha){var V=ha[M.getAttribute(W)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ca&&null!=ea){var ia=ea[M.getAttribute(ca)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,+J);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);ma=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=+null!=ma?0:qa;Ca=null!=ma?0:wa;null!=U&&null!=Da.getAttribute(U)&&(Da.geometry.x=$a+parseFloat(Da.getAttribute(U)));null!=O&&null!=Da.getAttribute(O)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(O)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=+A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+X}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=ma?(ma.style=K.replacePlaceholders(ma,la,J),K.addCell(Da,ma),z.push(ma)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,J);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,J)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,J));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,J):K.createCurrentEdgeStyle();eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,J));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=-ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=U;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());+ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=T;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=X;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==-za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=X;cb.parallelEdgeSpacing=U;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,X),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,+za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=X;cb.parallelEdgeSpacing=T;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,X),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*X;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||@@ -3975,29 +3975,29 @@ f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParthis.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);l=this.actions.get("autoMode");l.setEnabled(l.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&-this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var O=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){O.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),l=this.getSelectionState(),t=this.isDiagramActive(),z="1"==+this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var P=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){P.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),l=this.getSelectionState(),t=this.isDiagramActive(),z="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&z);this.actions.get("redo").setEnabled(this.canRedo()&&z);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(t);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(t&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&t&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var R=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);R.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=-!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),ea=K.getGraphBounds(),da=Math.floor(ea.width*z/K.view.scale),ca=Math.floor(ea.height*z/K.view.scale);if(J.length<=MAX_REQUEST_SIZE&&da*ca<MAX_AREA)if(c.hideDialog(),-"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var W={globalVars:K.getExportVariables()};N&&(W.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(W))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+da+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,+!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),da=K.getGraphBounds(),ea=Math.floor(da.width*z/K.view.scale),ca=Math.floor(da.height*z/K.view.scale);if(J.length<=MAX_REQUEST_SIZE&&ea*ca<MAX_AREA)if(c.hideDialog(),+"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var W={globalVars:K.getExportVariables()};N&&(W.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(W))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+ea+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,null==t||"none"==t,!0,!1,!1,C,!0,!1,null,N,F):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(J){}this.remoteInvoke("getCustomLibraries",null,null,function(J){z.innerText="";if(0==J.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+-"</div>";else for(var ea=0;ea<J.length;ea++){var da=J[ea];C[da.id]&&(f[da.id]=da);var ca=this.addCheckbox(z,da.title,C[da.id]);(function(W,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[W.id]=W:delete f[W.id]})})(da,ca)}},mxUtils.bind(this,function(J){z.innerText="";var ea=document.createElement("div");ea.style.padding="8px";ea.style.textAlign="center";mxUtils.write(ea,mxResources.get("error")+": ");mxUtils.write(ea,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));-z.appendChild(ea)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,ea;for(ea in f)null==C[ea]&&(J++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,da)),this.showSidebar()}catch(W){this.handleError(W,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;-0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ea]));for(ea in C)f[ea]||this.closeLibrary(new RemoteLibrary(this,null,C[ea]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,+"</div>";else for(var da=0;da<J.length;da++){var ea=J[da];C[ea.id]&&(f[ea.id]=ea);var ca=this.addCheckbox(z,ea.title,C[ea.id]);(function(W,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[W.id]=W:delete f[W.id]})})(ea,ca)}},mxUtils.bind(this,function(J){z.innerText="";var da=document.createElement("div");da.style.padding="8px";da.style.textAlign="center";mxUtils.write(da,mxResources.get("error")+": ");mxUtils.write(da,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));+z.appendChild(da)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,da;for(da in f)null==C[da]&&(J++,mxUtils.bind(this,function(ea){this.remoteInvoke("getFileContent",[ea.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ea)),this.showSidebar()}catch(W){this.handleError(W,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;+0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[da]));for(da in C)f[da]||this.closeLibrary(new RemoteLibrary(this,null,C[da]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,z){var C=!0,F=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(F);C&&t.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(F);-C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(J,ea){var da={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=ea?da.error={errResp:ea}:null!=J&&-(da.resp=J);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),+C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(J,da){var ea={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=da?ea.error={errResp:da}:null!=J&&+(ea.resp=J);this.remoteWin.postMessage(JSON.stringify(ea),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(J){l(null,"Invalid Call: An error occurred, "+J.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};t.onsuccess=mxUtils.bind(this,function(z){try{var C=t.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var N=-document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,ea,da=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),W=mxUtils.bind(this,function(){da++;ba()}),ba=mxUtils.bind(this,function(){try{if(da>=ea.length)ca();else{var ma=-ea[da];StorageFile.getFileContent(this,ma,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==ma&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ma]}),"*"):W()}),W)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(ma){try{this.setDatabaseItem(null,[{title:ma.title,size:ma.data.length,lastModified:Date.now(),type:ma.isLib?"L":"F"},{title:ma.title,data:ma.data}],W,W,["filesInfo","files"])}catch(Y){console.log(Y)}});-F=mxUtils.bind(this,function(ma){try{if(ma.source==N.contentWindow){var Y={};try{Y=JSON.parse(ma.data)}catch(la){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(ea=Y.resp[0],K=!1,ba()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):W())}}catch(la){console.log(la)}});+document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,da,ea=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),W=mxUtils.bind(this,function(){ea++;ba()}),ba=mxUtils.bind(this,function(){try{if(ea>=da.length)ca();else{var la=+da[ea];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==la&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):W()}),W)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,data:la.data}],W,W,["filesInfo","files"])}catch(Y){console.log(Y)}});+F=mxUtils.bind(this,function(la){try{if(la.source==N.contentWindow){var Y={};try{Y=JSON.parse(la.data)}catch(ma){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(da=Y.resp[0],K=!1,ba()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):W())}}catch(ma){console.log(ma)}});window.addEventListener("message",F)}})));c(C);C.onversionchange=function(){C.close()}}catch(F){null!=f?f(F):null!=window.console&&console.warn(F)}});t.onerror=f;t.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,t,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var F=C.transaction(z,"readwrite");F.oncomplete=l;F.onerror=t;for(C=0;C<z.length;C++)F.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);var C=z.transaction(t,"readwrite");C.oncomplete=f;C.onerror=l;for(z=0;z<t.length;z++)C.objectStore(t[z]).delete(c[z])}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";var C=z.transaction([t],"readonly").objectStore(t).get(c);C.onsuccess=function(){f(C.result)};C.onerror=l}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(F){null==F.target.result?c(C):(C.push(F.target.result.value),@@ -4006,33 +4006,33 @@ this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.protc.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z="<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,ma=0;ma<ba.length;ma++)"none"!=ba[ma].style.display&&ba[ma].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,ma,Y){function la(){ha.removeChild(A);ha.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:ma,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");-A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var T=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):la();t=null});T.className="geCommentEditBtn";I.appendChild(T);var P=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);la();ma(ba);t=null});mxEvent.addListener(A,"keydown",-mxUtils.bind(this,function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(P.click(),mxEvent.consume(U)):27==U.keyCode&&(T.click(),mxEvent.consume(U)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";I.appendChild(P);ha.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var ma=b.timeSince(ba);null==ma&&(ma=mxResources.get("lessThanAMinute"));-mxUtils.write(ha,mxResources.get("timeAgo",[ma],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function O(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,ma,Y,la){function Z(aa,+var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,la=0;la<ba.length;la++)"none"!=ba[la].style.display&&ba[la].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,la,Y){function ma(){ha.removeChild(A);ha.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:la,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");+A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):ma();t=null});U.className="geCommentEditBtn";I.appendChild(U);var O=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);ma();la(ba);t=null});mxEvent.addListener(A,"keydown",+mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(O.click(),mxEvent.consume(T)):27==T.keyCode&&(U.click(),mxEvent.consume(T)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";I.appendChild(O);ha.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var la=b.timeSince(ba);null==la&&(la=mxResources.get("lessThanAMinute"));+mxUtils.write(ha,mxResources.get("timeAgo",[la],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function P(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,la,Y,ma){function Z(aa,ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});X.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=I;aa(ba);return{pdiv:pa,-replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();O(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(la||!ba.isResolved){N.style.display="none";var I=-document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",ba.id);I.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var T=document.createElement("div");T.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;T.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";T.appendChild(P);var U=document.createElement("div");-U.className="geCommentUsername";mxUtils.write(U,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));P.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",ba.id);S(ba,U);P.appendChild(U);I.appendChild(T);T=document.createElement("div");T.className="geCommentTxt";mxUtils.write(T,ba.content||"");I.appendChild(T);ba.isLocked&&(I.style.opacity="0.5");T=document.createElement("div");T.className="geCommentActions";var X=document.createElement("ul");-X.className="geCommentActionsList";T.appendChild(X);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);P=b.getCurrentUser();null==P||null==ba.user||P.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,I,function(){G(I);ba.editComment(ba.content,function(){R(I)},function(ja){O(I);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),+replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();P(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(ma||!ba.isResolved){N.style.display="none";var I=+document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",ba.id);I.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;U.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";U.appendChild(O);var T=document.createElement("div");+T.className="geCommentUsername";mxUtils.write(T,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));O.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ba.id);S(ba,T);O.appendChild(T);I.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,ba.content||"");I.appendChild(U);ba.isLocked&&(I.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var X=document.createElement("ul");+X.className="geCommentActionsList";U.appendChild(X);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);O=b.getCurrentUser();null==O||null==ba.user||O.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,I,function(){G(I);ba.editComment(ba.content,function(){R(I)},function(ja){P(I);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){G(I);ba.deleteComment(function(aa){if(!0===aa){aa=I.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=I.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(I);I.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==-F.getElementsByTagName("div").length?"block":"none"}},function(aa){O(I);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=-"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);da||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});I.appendChild(T);null!=ma?F.insertBefore(I,ma.nextSibling):F.appendChild(I);for(ma=0;null!=ba.replies&&-ma<ba.replies.length;ma++)T=ba.replies[ma],T.isResolved=ba.isResolved,c(T,ba.replies,null,Y+1,la);null!=t&&(t.comment.id==ba.id?(la=ba.content,ba.content=t.comment.content,H(ba,I,t.saveCallback,t.deleteOnCancel),ba.content=la):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "++F.getElementsByTagName("div").length?"block":"none"}},function(aa){P(I);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=+"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);ea||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});I.appendChild(U);null!=la?F.insertBefore(I,la.nextSibling):F.appendChild(I);for(la=0;null!=ba.replies&&+la<ba.replies.length;la++)U=ba.replies[la],U.isResolved=ba.isResolved,c(U,ba.replies,null,Y+1,ma);null!=t&&(t.comment.id==ba.id?(ma=ba.content,ba.content=t.comment.content,H(ba,I,t.saveCallback,t.deleteOnCancel),ba.content=ma):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var C=EditorUi.compactUi?"26px":"30px",F=document.createElement("div");F.className="geCommentsList";F.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";F.style.bottom=parseInt(C)+7+"px";z.appendChild(F);var N=document.createElement("span");N.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(N,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var J=C.cloneNode();J.style.backgroundImage="url("+Editor.plusImage+")";J.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(J,-"click",function(ba){function ha(){H(ma,Y,function(la){G(Y);b.addComment(la,function(Z){la.id=Z;ca.push(la);R(Y)},function(Z){O(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),Y=c(ma,ca,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(J)}var ea=C.cloneNode();ea.classList.add("geToggleItem");ea.style.backgroundImage="url("+Editor.checkImage+")";ea.setAttribute("title",mxResources.get("showResolved"));-var da=!1;mxEvent.addListener(ea,"click",function(ba){(da=!da)?ea.classList.add("geActiveItem"):ea.classList.remove("geActiveItem");W();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(ea);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(ba){W();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=+"click",function(ba){function ha(){H(la,Y,function(ma){G(Y);b.addComment(ma,function(Z){ma.id=Z;ca.push(ma);R(Y)},function(Z){P(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var la=b.newComment("",b.getCurrentUser()),Y=c(la,ca,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(J)}var da=C.cloneNode();da.classList.add("geToggleItem");da.style.backgroundImage="url("+Editor.checkImage+")";da.setAttribute("title",mxResources.get("showResolved"));+var ea=!1;mxEvent.addListener(da,"click",function(ba){(ea=!ea)?da.classList.add("geActiveItem"):da.classList.remove("geActiveItem");W();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(da);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(ba){W();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ca=[],W=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;-ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(ma){b.handleError(ma)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ma){function Y(la){if(null!=la){la.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<la.length;Z++)Y(la[Z].replies)}}ma.sort(function(la,-Z){return new Date(la.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ca=ma;for(ma=0;ma<ca.length;ma++)Y(ca[ma].replies),c(ca[ma],ca,null,0,da);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(ma){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});-W();this.refreshComments=W;K=mxUtils.bind(this,function(){function ba(Z){var k=ma[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),ma={},Y=0;Y<ha.length;Y++){var la=ha[Y];ma[la.getAttribute("data-commentId")]=la}for(Y=0;Y<ca.length;Y++)ba(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=-new mxRectangle(0,0,260,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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,O){var R=document.createElement("div");R.style.textAlign="center";O=null!=O?O:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=-O+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";+ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(la){b.handleError(la)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(la){function Y(ma){if(null!=ma){ma.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<ma.length;Z++)Y(ma[Z].replies)}}la.sort(function(ma,+Z){return new Date(ma.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ca=la;for(la=0;la<ca.length;la++)Y(ca[la].replies),c(ca[la],ca,null,0,ea);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(la){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(la&&la.message?": "+la.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});+W();this.refreshComments=W;K=mxUtils.bind(this,function(){function ba(Z){var k=la[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),la={},Y=0;Y<ha.length;Y++){var ma=ha[Y];la[ma.getAttribute("data-commentId")]=ma}for(Y=0;Y<ca.length;Y++)ba(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=+new mxRectangle(0,0,260,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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,P){var R=document.createElement("div");R.style.textAlign="center";P=null!=P?P:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=+P+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";null!=H&&(p.innerHTML=H+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var l=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(f.checked)});G.appendChild(l);null!=B?(l.innerHTML=B+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||G.appendChild(p);R.appendChild(G);S?(G.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(f),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),c.appendChild(u),R.appendChild(c),mxEvent.addListener(u,"click",function(t){f.checked=!f.checked;mxEvent.consume(t)})):G.style.marginTop="12px";this.init=function(){l.focus()};this.container=R},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};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.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};@@ -4100,7 +4100,7 @@ EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxRm=mxEvent.getClientY(b);e.popup(g,m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),u=b.getId();g.setAttribute("title",m+(null!=u?" ("+u+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var u=!1,p=!1,B=mxUtils.bind(this,function(S){u=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),H=mxUtils.bind(this,function(S){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!u)){var G=new mxPopupMenu(this.createPageMenu(b));G.div.className+=" geMenubarMenu";G.smartSeparators=!0;G.showDisabled=!0;G.autoExpand=!0;G.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var O=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(O,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};+function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var P=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(P,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(g,m){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),m));g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);g.addSeparator(m);this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("move"));g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();@@ -4108,50 +4108,50 @@ b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("mob.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var u=g.ownerDocument.createElement("diagram");u.setAttribute("id",g.getAttribute("relatedPage"));u.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(u);u=g.getAttribute("viewState");null!=u&&(m.relatedPage.viewState=JSON.parse(u),g.removeAttribute("viewState"));g=g.cloneNode(!0);u=g.firstChild;if(null!=u)for(m.relatedPage.root=e.decodeCell(u,!1),m=u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var p=u.getAttribute("id");null==e.lookup(p)&&e.decodeCell(u)}u.parentNode.removeChild(u);u=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,u,p,B,H){u=null!=u?u:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(m,p[G]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,u){this.model.beginUpdate();try{var p=[];this.traverse(u,!0,mxUtils.bind(this,function(H,S){var G=null!=S&&this.isTreeEdge(S);G&&p.push(S);H==u||null!=S&&!G||p.push(H);return(null==S||G)&&(H==u||!this.model.isCollapsed(H))}));this.model.setCollapsed(u,m);for(var B=0;B<p.length;B++)this.model.setVisible(p[B],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,u,p,B,H,S){return this.model.filterCells(this.getEdges(m,u,p,B,H,S),mxUtils.bind(this,-function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var la=!1;null!=Y&&(la=-"1"==l.getCurrentCellStyle(Y).treeMoving);return la}function p(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),la="tree"==(null!=la?la.style:l.getCellStyle(Y)).containerType);return la}function B(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),l.view.getState(Y),la=null!=(null!=la?la.style:l.getCellStyle(Y)).childLayout);return la}function H(Y){Y=l.view.getState(Y);if(null!=Y){var la=l.getIncomingTreeEdges(Y.cell);if(0<la.length&&(la=l.view.getState(la[0]),null!=la&&(la=-la.absolutePoints,null!=la&&0<la.length&&(la=la[la.length-1],null!=la)))){if(la.y==Y.y&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(la.y==Y.y+Y.height&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(la.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,la){la=null!=la?la:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],-l.model.getTerminal(k[0],!0),!0);var I=H(Y),T=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=la?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=la?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=T.x,A[1].geometry.y-=T.y);var P=l.view.getState(Y),U=l.view.scale;if(null!=P){var X=mxRectangle.fromRectangle(P);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?X.x+=(la?Y.geometry.width+10:-A[1].geometry.width--10)*U:X.y+=(la?Y.geometry.height+10:-A[1].geometry.height-10)*U;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=T=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,-qa.x))/U),T=10+Math.max(T,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/U))}}ja?T=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(la?1:-1)*k,(la?1:-1)*T)}}}return l.addCells(A,-Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var la=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,T=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(X,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&T.push(aa);(null==aa||ja)&&T.push(X);return null==aa||ja});var P=Y.geometry.width+40,-U=Y.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,U=-U):la==mxConstants.DIRECTION_WEST?(P=-P,U=0):la==mxConstants.DIRECTION_EAST&&(U=0);l.moveCells(T,P,U);return l.addCells(k,A)}finally{l.model.endUpdate()}}function O(Y,la){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=la);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);-null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var T=Z.geometry;la=[];l.view.currentRoot==Z&&(T=new mxRectangle);for(var P=0;P<k.length;P++){var U=l.model.getTerminal(k[P],!1);null!=U&&la.push(U)}var X=l.view.getBounds(la),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x-T.x+10,I[1].geometry.y+=-I[1].geometry.height-T.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x+-T.x+10,I[1].geometry.y-=I[1].geometry.height+T.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+T.x+40):I[1].geometry.x+(I[1].geometry.width-T.x+40),I[1].geometry.y=null==X?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ja-aa.y+-T.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}-function R(Y,la,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!la&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||la&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(T,P){return la?T.x+T.width-P.x-P.width:T.y+T.height-P.y-P.height})}return k}function c(Y,la){var Z=H(Y),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;-(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=la?f.actions.get("selectParent").funct():Z==la?(la=l.getOutgoingTreeEdges(Y),null!=la&&0<la.length&&l.setSelectionCell(l.model.getTerminal(la[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=la==mxConstants.DIRECTION_NORTH||la==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=-this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,la,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){la=l.getSelectionCell();var k=l.getOutgoingTreeEdges(la);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(la).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,-Z)):0<l.model.getEdgeCount(la)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(la);if(null!=Y&&0<Y.length){la=[];for(var Z=0;Z<Y.length;Z++)la.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(la)}else l.setSelectionCells(l.model.getChildren(la))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var la=-l.getSelectionCell();if(l.isEnabled()&&null!=la){var Z=[];mxEvent.isControlDown(Y)||l.traverse(la,!0,function(k,A){var I=null!=A&&l.isTreeEdge(A);I&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||I)&&Z.push(k);return null==A||I});if(0==Z.length||1==Z.length&&Z[0]==la)Z=l.model.getDescendants(la);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var la=l.getSelectionCell();l.isEnabled()&&null!=la&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la),-null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(la)));-l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,la){la=null!=la?la:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));la&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(T,P){var U=null!=P&&l.isTreeEdge(P);U&&I.push(P);(null==P||U)&&I.push(T);return null==P||U});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),-Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,la,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,la){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var T=F.call(this,-Y,la);if(T.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var P=l.getIncomingTreeEdges(T[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==P.length&&0<I.length){var U=this.cloneCell(I[0]);this.addEdge(U,l.getDefaultParent(),this.model.getTerminal(I[0],!0),T[k])}}}finally{this.model.endUpdate()}return T};var N=l.moveCells;l.moveCells=function(Y,la,Z,k,A,I,T){for(var P=null,U=[],X=0;X<Y.length;X++)(u(Y[X])||m(Y[X]))&&!B(Y[X])&&this.isCellCollapsed(Y[X])?U=U.concat(this.getSubtree(Y[X])):U.push(Y[X]);Y=-mxUtils.removeDuplicates(U);this.model.beginUpdate();try{U=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(X=0;X<Y.length;X++)if(m(Y[X])||l.model.isEdge(Y[X])&&null==l.model.getTerminal(Y[X],!0)){A=l.model.getParent(Y[X]);break}if(null!=U&&A!=U&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(U);null!=sa&&(la=(sa.getCenterX()--pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}P=N.apply(this,arguments);if(null!=P&&null!=Y&&P.length==Y.length)for(X=0;X<P.length;X++)if(this.model.isEdge(P[X]))m(U)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[X],!0))&&this.model.setTerminal(P[X],U,!0);else if(m(Y[X])&&(ja=l.getIncomingTreeEdges(Y[X]),0<ja.length))if(!k)m(U)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],U,!0);else if(0==l.getIncomingTreeEdges(P[X]).length){aa=-U;if(null==aa||aa==l.model.getParent(Y[X]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,P[X])}}finally{this.model.endUpdate()}return P};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,la,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var T=0;T<I.length;T++)if(A.isEdge(I[T])&&null==A.getTerminal(I[T],!0)){A.setTerminal(I[T],Y,!0);var P=l.getCellGeometry(I[T]);P.points=null;-null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return I}}var J={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ea={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},da=f.onKeyDown;f.onKeyDown=function(Y){try{var la=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=la){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?J[Y.keyCode]:mxEvent.isAltDown(Y)?-ea[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(la)&&(Z=null,0<l.getIncomingTreeEdges(la).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(la):O(la):13==Y.which&&(Z=S(la,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(la)),l.startEditingAtCell(la),mxEvent.consume(Y)):37==Y.keyCode?(c(la,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):-38==Y.keyCode?(c(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(la,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,la,Z,k,A,I,T){var P=l.getIncomingTreeEdges(Y);if(m(Y)){var U=H(Y),X=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,aa=la==mxConstants.DIRECTION_EAST||la==-mxConstants.DIRECTION_WEST;return U==la||0==P.length?O(Y,la):X==aa?G(Y):S(Y,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var la=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||A)&&0>mxUtils.indexOf(la,Z)&&la.push(Z);return null==k||A});return la};var W=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){W.apply(this,+function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var ma=!1;null!=Y&&(ma=+"1"==l.getCurrentCellStyle(Y).treeMoving);return ma}function p(Y){var ma=!1;null!=Y&&(Y=t.getParent(Y),ma=l.view.getState(Y),ma="tree"==(null!=ma?ma.style:l.getCellStyle(Y)).containerType);return ma}function B(Y){var ma=!1;null!=Y&&(Y=t.getParent(Y),ma=l.view.getState(Y),l.view.getState(Y),ma=null!=(null!=ma?ma.style:l.getCellStyle(Y)).childLayout);return ma}function H(Y){Y=l.view.getState(Y);if(null!=Y){var ma=l.getIncomingTreeEdges(Y.cell);if(0<ma.length&&(ma=l.view.getState(ma[0]),null!=ma&&(ma=+ma.absolutePoints,null!=ma&&0<ma.length&&(ma=ma[ma.length-1],null!=ma)))){if(ma.y==Y.y&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(ma.y==Y.y+Y.height&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(ma.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,ma){ma=null!=ma?ma:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],+l.model.getTerminal(k[0],!0),!0);var I=H(Y),U=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=ma?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=ma?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=U.x,A[1].geometry.y-=U.y);var O=l.view.getState(Y),T=l.view.scale;if(null!=O){var X=mxRectangle.fromRectangle(O);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?X.x+=(ma?Y.geometry.width+10:-A[1].geometry.width-+10)*T:X.y+=(ma?Y.geometry.height+10:-A[1].geometry.height-10)*T;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=U=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&ma!=qa.getCenterX()<O.getCenterX()||!ja&&ma!=qa.getCenterY()<O.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,+qa.x))/T),U=10+Math.max(U,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/T))}}ja?U=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&ma!=qa.getCenterX()<O.getCenterX()||!ja&&ma!=qa.getCenterY()<O.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(ma?1:-1)*k,(ma?1:-1)*U)}}}return l.addCells(A,+Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var ma=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,U=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(X,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&U.push(aa);(null==aa||ja)&&U.push(X);return null==aa||ja});var O=Y.geometry.width+40,+T=Y.geometry.height+40;ma==mxConstants.DIRECTION_SOUTH?O=0:ma==mxConstants.DIRECTION_NORTH?(O=0,T=-T):ma==mxConstants.DIRECTION_WEST?(O=-O,T=0):ma==mxConstants.DIRECTION_EAST&&(T=0);l.moveCells(U,O,T);return l.addCells(k,A)}finally{l.model.endUpdate()}}function P(Y,ma){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=ma);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);+null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var U=Z.geometry;ma=[];l.view.currentRoot==Z&&(U=new mxRectangle);for(var O=0;O<k.length;O++){var T=l.model.getTerminal(k[O],!1);null!=T&&ma.push(T)}var X=l.view.getBounds(ma),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x-U.x+10,I[1].geometry.y+=+I[1].geometry.height-U.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x+-U.x+10,I[1].geometry.y-=I[1].geometry.height+U.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+U.x+40):I[1].geometry.x+(I[1].geometry.width-U.x+40),I[1].geometry.y=null==X?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ja-aa.y+-U.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}+function R(Y,ma,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!ma&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||ma&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(U,O){return ma?U.x+U.width-O.x-O.width:U.y+U.height-O.y-O.height})}return k}function c(Y,ma){var Z=H(Y),k=ma==mxConstants.DIRECTION_EAST||ma==mxConstants.DIRECTION_WEST;+(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=ma?f.actions.get("selectParent").funct():Z==ma?(ma=l.getOutgoingTreeEdges(Y),null!=ma&&0<ma.length&&l.setSelectionCell(l.model.getTerminal(ma[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=ma==mxConstants.DIRECTION_NORTH||ma==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=+this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,ma,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){ma=l.getSelectionCell();var k=l.getOutgoingTreeEdges(ma);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(ma).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,+Z)):0<l.model.getEdgeCount(ma)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var ma=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(ma);if(null!=Y&&0<Y.length){ma=[];for(var Z=0;Z<Y.length;Z++)ma.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(ma)}else l.setSelectionCells(l.model.getChildren(ma))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var ma=+l.getSelectionCell();if(l.isEnabled()&&null!=ma){var Z=[];mxEvent.isControlDown(Y)||l.traverse(ma,!0,function(k,A){var I=null!=A&&l.isTreeEdge(A);I&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||I)&&Z.push(k);return null==A||I});if(0==Z.length||1==Z.length&&Z[0]==ma)Z=l.model.getDescendants(ma);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var ma=l.getSelectionCell();l.isEnabled()&&null!=ma&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(ma),+null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var ma=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(ma);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(ma)));+l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,ma){ma=null!=ma?ma:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));ma&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(U,O){var T=null!=O&&l.isTreeEdge(O);T&&I.push(O);(null==O||T)&&I.push(U);return null==O||T});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),+Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,ma,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(ma,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,ma){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var U=F.call(this,+Y,ma);if(U.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var O=l.getIncomingTreeEdges(U[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==O.length&&0<I.length){var T=this.cloneCell(I[0]);this.addEdge(T,l.getDefaultParent(),this.model.getTerminal(I[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var N=l.moveCells;l.moveCells=function(Y,ma,Z,k,A,I,U){for(var O=null,T=[],X=0;X<Y.length;X++)(u(Y[X])||m(Y[X]))&&!B(Y[X])&&this.isCellCollapsed(Y[X])?T=T.concat(this.getSubtree(Y[X])):T.push(Y[X]);Y=+mxUtils.removeDuplicates(T);this.model.beginUpdate();try{T=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(X=0;X<Y.length;X++)if(m(Y[X])||l.model.isEdge(Y[X])&&null==l.model.getTerminal(Y[X],!0)){A=l.model.getParent(Y[X]);break}if(null!=T&&A!=T&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(T);null!=sa&&(ma=(sa.getCenterX()-+pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}O=N.apply(this,arguments);if(null!=O&&null!=Y&&O.length==Y.length)for(X=0;X<O.length;X++)if(this.model.isEdge(O[X]))m(T)&&0>mxUtils.indexOf(O,this.model.getTerminal(O[X],!0))&&this.model.setTerminal(O[X],T,!0);else if(m(Y[X])&&(ja=l.getIncomingTreeEdges(Y[X]),0<ja.length))if(!k)m(T)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],T,!0);else if(0==l.getIncomingTreeEdges(O[X]).length){aa=+T;if(null==aa||aa==l.model.getParent(Y[X]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,O[X])}}finally{this.model.endUpdate()}return O};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,ma,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var U=0;U<I.length;U++)if(A.isEdge(I[U])&&null==A.getTerminal(I[U],!0)){A.setTerminal(I[U],Y,!0);var O=l.getCellGeometry(I[U]);O.points=null;+null!=O.getTerminalPoint(!0)&&O.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return I}}var J={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},da={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},ea=f.onKeyDown;f.onKeyDown=function(Y){try{var ma=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=ma){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?J[Y.keyCode]:mxEvent.isAltDown(Y)?+da[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(ma)&&(Z=null,0<l.getIncomingTreeEdges(ma).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(ma):P(ma):13==Y.which&&(Z=S(ma,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(ma)),l.startEditingAtCell(ma),mxEvent.consume(Y)):37==Y.keyCode?(c(ma,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):+38==Y.keyCode?(c(ma,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(ma,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(ma,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||ea.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,ma,Z,k,A,I,U){var O=l.getIncomingTreeEdges(Y);if(m(Y)){var T=H(Y),X=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,aa=ma==mxConstants.DIRECTION_EAST||ma==+mxConstants.DIRECTION_WEST;return T==ma||0==O.length?P(Y,ma):X==aa?G(Y):S(Y,ma!=mxConstants.DIRECTION_NORTH&&ma!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var ma=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(ma,k)&&ma.push(k);(null==k||A)&&0>mxUtils.indexOf(ma,Z)&&ma.push(Z);return null==k||A});return ma};var W=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){W.apply(this,arguments);(u(this.state.cell)||m(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ba.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ha.apply(this,arguments);null!=-this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var ma=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,la){ma.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),u=this.graph,p=this;return m.concat([this.addEntry("tree container",+this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var la=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,ma){la.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),u=this.graph,p=this;return m.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 H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);B.insert(G);B.insert(H);B.insert(S);return p.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 H=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var S=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var O=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-O.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),G.style);R.geometry.relative=!0;R.edge=!0;H.insertEdge(R,!0);O.insertEdge(R,!1);var c=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var P=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),G.style);R.geometry.relative=!0;R.edge=!0;H.insertEdge(R,!0);P.insertEdge(R,!1);var c=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),G.style);f.geometry.relative=!0;f.edge=!0;H.insertEdge(f,!0);c.insertEdge(f,!1);var l=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(R);B.insert(f);B.insert(t);B.insert(H);B.insert(S);B.insert(O);B.insert(c);B.insert(l);return p.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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(R);B.insert(f);B.insert(t);B.insert(H);B.insert(S);B.insert(P);B.insert(c);B.insert(l);return p.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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');B.vertex=!0;return p.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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],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,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],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"};');B.vertex=!0;var H=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(H,"treeRoot","1");H.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var O=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');O.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=-!0;R.edge=!0;H.insertEdge(R,!0);O.insertEdge(R,!1);B.insert(G);B.insert(R);B.insert(H);B.insert(S);B.insert(O);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],+G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=+!0;R.edge=!0;H.insertEdge(R,!0);P.insertEdge(R,!1);B.insert(G);B.insert(R);B.insert(H);B.insert(S);B.insert(P);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree division",function(){var B=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.setTerminalPoint(new mxPoint(0,0),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree sub sections",function(){var B=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),H.style);G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;S.insertEdge(G,!1);return p.createVertexTemplateFromCells([H,G,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;@@ -4170,29 +4170,29 @@ B.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=EditorUi.prototype.setGraphEnabled=function(c){S.apply(this,arguments);if(c){var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=f&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=f&&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 G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,arguments);var c=this.editorUi;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var t=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(t.container,620,420,!0,!1);t.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var t=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(t.container,620,420,!0,!1);t.init()}));var f="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(t,z,C,F){t.addItem(C,null,mxUtils.bind(this,function(){var N=new CreateGraphDialog(c,C,F);c.showDialog(N.container,620,420,!0,!1);N.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){for(var C=0;C<f.length;C++)"-"==f[C]?t.addSeparator(z):l(t,z,mxResources.get(f[C])+"...",f[C])})))};EditorUi.prototype.installFormatToolbar=function(c){var f=-this.editor.graph,l=document.createElement("div");l.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%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var O=!1;EditorUi.prototype.initFormatWindow=-function(){if(!O&&null!=this.formatWindow){O=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=ea.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=+this.editor.graph,l=document.createElement("div");l.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%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var P=!1;EditorUi.prototype.initFormatWindow=+function(){if(!P&&null!=this.formatWindow){P=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=da.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing="border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(ja));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(ja,pa,sa,qa,wa,Ba){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Ba?(za.style.backgroundImage="url("+Ba+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,ja);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ea){Ea.preventDefault()}));mxEvent.addListener(za,"click",function(Ea){"disabled"!=za.getAttribute("disabled")&&pa(Ea);mxEvent.consume(Ea)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(ja=function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",ja),N.addListener("enabledChanged",ja),ja());return za}function l(ja,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top="0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}J=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?W:null);l([pa,f(mxResources.get("delete"),-F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([T,P],60),520<=m&&l([U,640<=m?f("",la.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",la,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?+F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([U,O],60),520<=m&&l([T,640<=m?f("",ma.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ma,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=z&&(z.classList.add("geSimple"),z.classList.add("geMinimal"));z=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";C.style.bottom=z?"32px":"0px";this.sidebar=this.createSidebar(C);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&-null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var J=null,ea=new Menubar(F,K);F.statusContainer=F.createStatusContainer();-F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var da=F.hideCurrentMenu;F.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==+null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var J=null,da=new Menubar(F,K);F.statusContainer=F.createStatusContainer();+F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var ea=F.hideCurrentMenu;F.hideCurrentMenu=function(){ea.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",ja.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var W=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;-F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var ma=F.menus.get("viewZoom");if(null!=ma){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),-mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},la=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),T=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),P=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),U=f("",Y,!0,mxResources.get("fit")+-" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.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";var X=ea.addMenu("100%",ma.funct);X.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");X.className="geTabItem";X.style.height=F.tabContainerHeight+"px";X.style.position="absolute";X.style.display="0"!=urlParams.pages?"flex":"none";X.style.alignItems="center";X.style.justifyContent=+F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var la=F.menus.get("viewZoom");if(null!=la){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),+mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},ma=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),U=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),O=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),T=f("",Y,!0,mxResources.get("fit")++" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.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";var X=da.addMenu("100%",la.funct);X.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");X.className="geTabItem";X.style.height=F.tabContainerHeight+"px";X.style.position="absolute";X.style.display="0"!=urlParams.pages?"flex":"none";X.style.alignItems="center";X.style.justifyContent="center";X.style.paddingRight="11px";X.style.whiteSpace="nowrap";X.style.overflow="hidden";X.style.fontSize="11px";X.style.width="51px";X.style.right="0px";X.style.bottom="0px";X.style.boxSizing="content-box";X.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";X.style.backgroundPosition="right 6px top 15px";X.style.backgroundRepeat="no-repeat";X.style.backgroundSize="10px";X.style.zIndex="1";C.appendChild(X);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(X);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(X.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}C.appendChild(K);C.appendChild(F.diagramContainer);z.appendChild(C);F.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);C.appendChild(F.tabContainer);t();F.addListener("lockedChanged",t);mxEvent.addListener(window,"resize",function(){t();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.chatWindow&&F.menus.chatWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.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)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};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\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\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\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\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\nanimations=Animations\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\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\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\ncreateBlankDiagram=Create Blank Diagram\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\ndeleteAll=Delete all\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\ndescribeYourDiagram=Describe your diagram\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\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\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\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\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\nhighContrast=High Contrast\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\nimproveContrast=Improve Contrast\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://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\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\nlanguageCode=Language Code\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\nlocked=Locked\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\nmodern=Modern\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}\nmyDrive=My Drive\nmyFiles=My Files\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\npageTabs=Page Tabs\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\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\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\nrequirementDiagram=Requirement Diagram\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\nselectedPage=Selected Page\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\nsequenceDiagram=Sequence Diagram\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\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. 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\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\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\nswap=Swap\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\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\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\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\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?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};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\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\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\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\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\nanimations=Animations\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\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\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\ncreateBlankDiagram=Create Blank Diagram\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\ndeleteAll=Delete all\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\ndescribeYourDiagram=Describe your diagram\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\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\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\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\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\nhighContrast=High Contrast\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\nimproveContrast=Improve Contrast\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://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\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\nlanguageCode=Language Code\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\nlocked=Locked\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\nmodern=Modern\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}\nmyDrive=My Drive\nmyFiles=My Files\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\npageTabs=Page Tabs\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\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\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\nrequirementDiagram=Requirement Diagram\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\nselectedPage=Selected Page\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\nsequenceDiagram=Sequence Diagram\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\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. 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\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\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\nswap=Swap\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\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\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\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\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?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,e,g){this.init(b,e,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";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.darkMode=null;GraphViewer.prototype.init=function(b,e,g){GraphViewer.initCss();this.graphConfig=null!=g?g:{};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=@@ -4202,7 +4202,7 @@ null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var H=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?H.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(H.style.padding="8px");H.style.forcedColorAdjust="none";H.style.boxSizing="border-box";H.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var t=this.view.graphBounds,z=this.view.translate;H.setAttribute("viewBox",t.x+z.x-this.panDx+" "+(t.y+z.y-this.panDy)+" "+(t.width+1)+" "+(t.height+1));this.container.style.backgroundColor=H.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",t))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(t){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");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(t){}this.graph.getImageFromBundles=function(t){return m.getImageUrl(t)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);-if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(S=0;S<G.length;S++)if(this.pageId==G[S].getAttribute("id")){this.currentPage=S;break}var O=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:O.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=+if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(S=0;S<G.length;S++)if(this.pageId==G[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:P.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=function(t){this.handlingResize||(this.currentPage=mxUtils.mod(t,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(t){t=this.getIndexById(t);var z=0<=t;z&&this.selectPage(t);return z};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=R&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),R=this.xmlNode)});var c=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(t){if(null!=t&&Graph.isPageLink(t.src)){var z=t.src,C=z.indexOf(",");0<C&&(C=m.getIndexById(z.substring(C+1)),0<=C&&(t=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[C])),t.originalSrc=z))}c.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(t){var z=f.apply(this,arguments);t=this.backgroundImage;if(null!=t){var C=this.view.translate,F=this.view.scale;z=mxRectangle.fromRectangle(z);z.add(new mxRectangle((C.x+t.x)*F,(C.y+t.y)*F,t.width*F,t.height*F))}return z};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=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,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||@@ -4236,21 +4236,21 @@ this.toolbarZIndex;e.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.damxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ca||200)}),B=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ca||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ca){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ca){B(100);mxEvent.consume(ca)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,W){this.startX=W.getGraphX();this.startY=W.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ca,W){},mouseUp:function(ca,W){mxEvent.isTouchEvent(W.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<-S&&Math.abs(this.startX-W.getGraphX())<S&&Math.abs(this.startY-W.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,O=mxUtils.bind(this,function(ca,W,ba,ha){ca=this.createToolbarButton(ca,W,ba,ha);e.appendChild(ca);G++;return ca}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=-"4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=O(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(t);var N=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,-mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(O(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||-"Zoom Out"),O(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),O(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"==C){if(this.layersEnabled){var K=O(mxUtils.bind(this,function(ca){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,+S&&Math.abs(this.startX-W.getGraphX())<S&&Math.abs(this.startY-W.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,P=mxUtils.bind(this,function(ca,W,ba,ha){ca=this.createToolbarButton(ca,W,ba,ha);e.appendChild(ca);G++;return ca}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=+"4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=P(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(t);var N=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,+mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||+"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(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"==C){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(ca){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ba=this.graph.getGraphBounds(),ha=this.graph.view;0>ba.x||0>ba.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale}):null!=this.graph.originalViewState&&0<ba.x/ha.scale+this.graph.originalViewState.translate.x-ha.translate.x&&0<ba.y/ha.scale+this.graph.originalViewState.translate.y-ha.translate.y&&(ha.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ca=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var W=mxUtils.getDocumentScrollOrigin(document);c.style.left=W.x+ca.left-1+"px";c.style.top=W.y+ca.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":-"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=O(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,+"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=P(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ca=J.getBoundingClientRect();var W=mxUtils.getDocumentScrollOrigin(document);-l.style.left=W.x+ca.left-1+"px";l.style.top=W.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&O(mxUtils.bind(this,-function(){try{this.showLightbox()}catch(ca){alert(ca.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=O(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",-g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var ea=b.style.border,da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?+l.style.left=W.x+ca.left-1+"px";l.style.top=W.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&P(mxUtils.bind(this,+function(){try{this.showLightbox()}catch(ca){alert(ca.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=P(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",+g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var da=b.style.border,ea=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ca=b.getBoundingClientRect(),W=mxUtils.getScrollOrigin(document.body);W="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-W.x,top:-W.y};ca={left:ca.left-W.left,top:ca.top-W.top,bottom:ca.bottom-W.top,right:ca.right-W.left};e.style.left=ca.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ca.bottom-1+"px":"inline"!=-this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==ea&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=ea});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=-ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&da()})).observe(b)};+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==da&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=da});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=+ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ea):ea();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&ea()})).observe(b)};GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var u=document.createElement("div");u.style.borderRight="1px solid #d0d0d0";u.style.display="inline-flex";u.style.alignItems="center";u.style.padding="6px";mxEvent.addListener(u,"click",b);null!=g&&u.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(u,"mouseenter",function(){u.style.backgroundColor="light-dark(#dddddd,#333333)"}),mxEvent.addListener(u,"mouseleave",function(){u.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),u.style.cursor="pointer"):mxUtils.setOpacity(u,30);u.appendChild(b);return u};GraphViewer.prototype.disableButton=function(b,e){var g=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=g&&(mxUtils.setOpacity(g.elem,30),mxEvent.removeListener(g.elem,"click",g.handler),mxEvent.addListener(g.elem,"mouseenter",function(){g.elem.style.backgroundColor="#eee"}),e&&g.elem.setAttribute("title",e))};@@ -4263,9 +4263,9 @@ GraphViewer.prototype.showLocalLightbox=function(b){var e=document.createElementg.className="geAdaptiveAsset";var m=mxUtils.bind(this,function(){p.setDarkMode(this.isDarkMode())});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",m);p.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));u.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(u))}catch(f){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};u=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var p=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);p.editor.editBlankUrl=this.editBlankUrl;p.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=u;p.refresh=function(){};var B=mxUtils.bind(this,function(f){27==f.keyCode&&p.destroy()}),H=this.initialOverflow,-S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var G=p.editor.graph,O=G.container;O.style.overflow="hidden";this.lightboxChrome&&null==b?(O.style.border="1px solid #c0c0c0",O.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=-"none");var R=this;G.getImageFromBundles=function(f){return R.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return R.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(O.style,"border-radius","4px");O.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,-function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),O.style.outline="none",O.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(O)):(document.body.appendChild(O),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(O.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=+S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var G=p.editor.graph,P=G.container;P.style.overflow="hidden";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=+"none");var R=this;G.getImageFromBundles=function(f){return R.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return R.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,+function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(G,this.graph),p.lightboxFit(),p.chromelessResize()}catch(f){p.handleError(f,null,function(){p.destroy()})}}),0);return p};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};GraphViewer.prototype.updateTitle=function(b,e){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",e||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",e||b))};GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(g){e.innerText=g.message,null!=window.console&&console.error(g)}})};@@ -4281,9 +4281,9 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n\tfilter: invert(1);\n}GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function u(){this.q=[];this.add=function(t){this.q.push(t)};var f,l;this.call=function(){f=0;for(l=this.q.length;f<l;f++)this.q[f].call()}}function p(f,l){return f.currentStyle?f.currentStyle[l]:window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue(l):f.style[l]}function B(f,l){if(!f.resizedAttached)f.resizedAttached=new u,f.resizedAttached.add(l);else if(f.resizedAttached){f.resizedAttached.add(l);return}f.resizeSensor=document.createElement("div");f.resizeSensor.className="resize-sensor";f.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";f.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>';-f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,ea,da,ca;l=function(){if((da=f.offsetWidth)!=J||(ca=f.offsetHeight)!=ea)N=!0,J=da,ea=ca;F()};var W=function(ba,-ha,ma){ba.attachEvent?ba.attachEvent("on"+ha,ma):ba.addEventListener(ha,ma)};W(t,"scroll",l);W(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var O=Object.prototype.toString.call(g),R="[object Array]"===O||"[object NodeList]"===O||"[object HTMLCollection]"===-O||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){O=0;for(var c=g.length;O<c;O++)B(g[O],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();+f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,da,ea,ca;l=function(){if((ea=f.offsetWidth)!=J||(ca=f.offsetHeight)!=da)N=!0,J=ea,da=ca;F()};var W=function(ba,+ha,la){ba.attachEvent?ba.attachEvent("on"+ha,la):ba.addEventListener(ha,la)};W(t,"scroll",l);W(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var P=Object.prototype.toString.call(g),R="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===+P||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){P=0;for(var c=g.length;P<c;P++)B(g[P],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();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"},{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.jsindex 4b31b3b75..bce2a744b 100644--- a/src/main/webapp/js/viewer.min.js+++ b/src/main/webapp/js/viewer.min.js@@ -30,7 +30,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};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:"26.0.13",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.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.15",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),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||@@ -1970,12 +1970,12 @@ Editor.prototype.setModified=function(b){this.modified=b};Editor.prototype.setFiEditor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(m,u){e.undoableEditHappened(u.getProperty("edit"))};var g=mxUtils.bind(this,function(m,u){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,g);b.getView().addListener(mxEvent.UNDO,g);g=function(m,u){m=u.getProperty("edit").changes;m=b.getSelectionCellsForChanges(m);u=!1;if(0<m.length){for(var p=[],B=0;B<m.length;B++)null!=b.view.getState(m[B])&&(p.push(m[B]),u||(b.scrollCellToVisible(m[B]),u=!0));b.setSelectionCells(p)}};e.addListener(mxEvent.UNDO,g);e.addListener(mxEvent.REDO,g);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};-function Dialog(b,e,g,m,u,p,B,H,S,G,O){this.editorUi=b;var R=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&+function Dialog(b,e,g,m,u,p,B,H,S,G,P){this.editorUi=b;var R=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=z+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var F=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=F.x+"px";this.bg.style.top=F.y+"px";t+=F.x;C+=F.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",C+=b.embedViewport.y,t+=b.embedViewport.x);u&&document.body.appendChild(this.bg);var N=b.createDiv(S?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),-p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!O)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||-null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=J.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);J=Math.max(1,Math.round((J.width-g-l)/2));var ea=Math.max(1,Math.round((z-m-b.footerHeight)/3));ea=this.getPosition(J,ea,g,m);J=ea.x;ea=ea.y;var da=mxUtils.getDocumentScrollOrigin(document);J+=da.x;-ea+=da.y;Editor.inlineFullscreen||null==b.embedViewport||(ea+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=ea+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ea+14+"px",this.dialogImg.style.left=J+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=+p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!P)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||+null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=J.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);J=Math.max(1,Math.round((J.width-g-l)/2));var da=Math.max(1,Math.round((z-m-b.footerHeight)/3));da=this.getPosition(J,da,g,m);J=da.x;da=da.y;var ea=mxUtils.getDocumentScrollOrigin(document);J+=ea.x;+da+=ea.y;Editor.inlineFullscreen||null==b.embedViewport||(da+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=da+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=da+14+"px",this.dialogImg.style.left=J+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=B;this.container=N;b.editor.fireEvent(new mxEventObject("showDialog"))}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";@@ -1983,44 +1983,44 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&this.container.parentNode.removeChild(this.container)};-var ErrorDialog=function(b,e,g,m,u,p,B,H,S,G,O){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);R.appendChild(c)}e=-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=O&&O()}),G.className="geBtn",g.appendChild(G));+var ErrorDialog=function(b,e,g,m,u,p,B,H,S,G,P){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var c=document.createElement("div");c.style.padding="0px";c.style.margin="0px";c.style.fontSize="18px";c.style.paddingBottom="16px";c.style.marginBottom="10px";c.style.borderBottom="1px solid #c0c0c0";c.style.color="gray";c.style.whiteSpace="nowrap";c.style.textOverflow="ellipsis";c.style.overflow="hidden";mxUtils.write(c,e);c.setAttribute("title",e);R.appendChild(c)}e=+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=Graph.sanitizeHtml(g);R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=G&&(G=mxUtils.button(G,function(){null!=P&&P()}),G.className="geBtn",g.appendChild(G));var f=mxUtils.button(m,function(){S&&b.hideDialog();null!=u&&u()});f.className="geBtn";g.appendChild(f);null!=B&&(m=mxUtils.button(B,function(){S&&b.hideDialog();null!=H&&H()}),m.className="geBtn gePrimaryBtn",g.appendChild(m));this.init=function(){f.focus()};R.appendChild(g);this.container=R},PrintDialog=function(b,e,g){this.create(b,e,g)};-PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(R.value)/100;isNaN(t)&&(t=1,R.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(O.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):+PrintDialog.prototype.create=function(b){function e(f){var l=B.checked||G.checked,t=parseInt(R.value)/100;isNaN(t)&&(t=1,R.value="100%");mxClient.IS_SF&&(t*=.75);var z=g.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/g.pageScale;if(l){var F=B.checked?1:parseInt(P.value);isNaN(F)||(C=mxUtils.getScaleForPageCount(F,g,z))}var N=F=0;z=mxRectangle.fromRectangle(z);z.width=Math.ceil(z.width*t);z.height=Math.ceil(z.height*t);C*=t;!l&&g.pageVisible?(t=g.getPageLayout(),F-=t.x*z.width,N-=t.y*z.height):l=!0;l=PrintDialog.createPrintPreview(g,C,z,0,F,N,l);l.open();f&&PrintDialog.printPreview(l)}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("input");B.setAttribute("type","checkbox");var H=document.createElement("td");H.setAttribute("colspan","2");H.style.fontSize="10pt";H.appendChild(B);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));H.appendChild(S);mxEvent.addListener(S,"click",function(f){B.checked=!B.checked;G.checked=!B.checked;mxEvent.consume(f)});mxEvent.addListener(B,"change",function(){G.checked=!B.checked});p.appendChild(H);u.appendChild(p);p=p.cloneNode(!1);var G=document.createElement("input");G.setAttribute("type","checkbox");H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(G);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");H.appendChild(S);mxEvent.addListener(S,-"click",function(f){G.checked=!G.checked;B.checked=!G.checked;mxEvent.consume(f)});p.appendChild(H);var O=document.createElement("input");O.setAttribute("value","1");O.setAttribute("type","number");O.setAttribute("min","1");O.setAttribute("size","4");O.setAttribute("disabled","disabled");O.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(O);mxUtils.write(H," "+mxResources.get("pages")+" (max)");p.appendChild(H);u.appendChild(p);mxEvent.addListener(G,"change",-function(){G.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";H.appendChild(R);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;+"click",function(f){G.checked=!G.checked;B.checked=!G.checked;mxEvent.consume(f)});p.appendChild(H);var P=document.createElement("input");P.setAttribute("value","1");P.setAttribute("type","number");P.setAttribute("min","1");P.setAttribute("size","4");P.setAttribute("disabled","disabled");P.style.width="50px";H=document.createElement("td");H.style.fontSize="10pt";H.appendChild(P);mxUtils.write(H," "+mxResources.get("pages")+" (max)");p.appendChild(H);u.appendChild(p);mxEvent.addListener(G,"change",+function(){G.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled");B.checked=!G.checked});p=p.cloneNode(!1);H=document.createElement("td");mxUtils.write(H,mxResources.get("pageScale")+":");p.appendChild(H);H=document.createElement("td");var R=document.createElement("input");R.setAttribute("value","100 %");R.setAttribute("size","5");R.style.width="50px";H.appendChild(R);p.appendChild(H);u.appendChild(p);p=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&H.appendChild(S);if(PrintDialog.previewEnabled){var c=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});c.className="geBtn";H.appendChild(c)}c=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});c.className="geBtn gePrimaryBtn";H.appendChild(c);b.editor.cancelFirst||H.appendChild(S);p.appendChild(H);u.appendChild(p);m.appendChild(u);this.container=m};PrintDialog.printPreview=function(b){try{null!=b.wnd&&window.setTimeout(function(){b.wnd.focus();b.wnd.print();b.wnd.close()},500)}catch(e){}};PrintDialog.createPrintPreview=function(b,e,g,m,u,p,B){e=new mxPrintPreview(b,e,g,m,u,p);e.title=mxResources.get("preview");e.addPageCss=!mxClient.IS_SF;e.printBackgroundImage=!0;e.autoOrigin=B;B=b.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";e.backgroundColor=B;var H=e.isTextLabel;e.isTextLabel=function(G){return"geHint"==!G.className&&H.apply(this,arguments)};var S=e.getLinkForCellState;e.getLinkForCellState=function(G){return b.getAbsoluteUrl(S.apply(this,arguments))};return e};PrintDialog.previewEnabled=!0;-var PageSetupDialog=function(b){function e(){var t=R;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(O.style.backgroundImage="url("+t.src+")",O.style.display="inline-block"):(O.style.backgroundImage="",O.style.display="none");O.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(O.style.backgroundColor=c,O.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");+var PageSetupDialog=function(b){function e(){var t=R;null!=t&&null!=t.originalSrc&&(t=b.createImageForPageLink(t.originalSrc,null));null!=t&&null!=t.src?(P.style.backgroundImage="url("+t.src+")",P.style.display="inline-block"):(P.style.backgroundImage="",P.style.display="none");P.style.backgroundColor="";null!=c&&c!=mxConstants.NONE&&(P.style.backgroundColor=c,P.style.display="inline-block")}var g=b.editor.graph,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var u=document.createElement("tbody");var p=document.createElement("tr");var B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";mxUtils.write(B,mxResources.get("paperSize")+":");p.appendChild(B);B=document.createElement("td");B.style.verticalAlign="top";B.style.fontSize="10pt";var H=PageSetupDialog.addPageFormatPanel(B,"pagesetupdialog",g.pageFormat);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("gridSize")+":");p.appendChild(B);B=document.createElement("td");B.style.whiteSpace="nowrap";var S=document.createElement("input");S.setAttribute("type","number");S.setAttribute("min","0");S.style.width="40px";S.style.marginLeft="6px";S.value=g.getGridSize();B.appendChild(S);mxEvent.addListener(S,"change",function(){var t=parseInt(S.value);S.value=Math.max(1,isNaN(t)?g.getGridSize():t)});p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");mxUtils.write(B,mxResources.get("background")+":");-p.appendChild(B);B=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var O=document.createElement("div");O.style.display="inline-block";O.style.verticalAlign="middle";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="contain";O.style.border="1px solid lightGray";O.style.borderRadius="4px";O.style.marginRight="14px";O.style.height="32px";-O.style.width="64px";O.style.cursor="pointer";O.style.padding="4px";var R=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),R=z,f=N);c=F;e()},R,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(O,"click",l);e();B.appendChild(O);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");+p.appendChild(B);B=document.createElement("td");var G=document.createElement("button");G.className="geBtn";G.style.margin="0px";mxUtils.write(G,mxResources.get("change")+"...");var P=document.createElement("div");P.style.display="inline-block";P.style.verticalAlign="middle";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.backgroundSize="contain";P.style.border="1px solid lightGray";P.style.borderRadius="4px";P.style.marginRight="14px";P.style.height="32px";+P.style.width="64px";P.style.cursor="pointer";P.style.padding="4px";var R=g.backgroundImage,c=g.background,f=g.shadowVisible,l=function(t){b.showBackgroundImageDialog(function(z,C,F,N){C||(null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src}),R=z,f=N);c=F;e()},R,c,!0);mxEvent.consume(t)};mxEvent.addListener(G,"click",l);mxEvent.addListener(P,"click",l);e();B.appendChild(P);B.appendChild(G);p.appendChild(B);u.appendChild(p);p=document.createElement("tr");B=document.createElement("td");B.colSpan=2;B.style.paddingTop="16px";B.setAttribute("align","right");G=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});G.className="geBtn";b.editor.cancelFirst&&B.appendChild(G);l=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var t=parseInt(S.value);isNaN(t)||g.gridSize===t||g.setGridSize(t);t=new ChangePageSetup(b,c,R,H.get());t.ignoreColor=g.background==c;t.ignoreImage=(null!=g.backgroundImage?g.backgroundImage.src:null)===(null!=R?R.src:null);null!=f&&(t.shadowVisible=f);g.pageFormat.width==t.previousFormat.width&&g.pageFormat.height==t.previousFormat.height&&t.ignoreColor&&t.ignoreImage&&t.shadowVisible==g.shadowVisible||g.model.execute(t)});l.className="geBtn gePrimaryBtn";B.appendChild(l);b.editor.cancelFirst||B.appendChild(G);p.appendChild(B);u.appendChild(p);m.appendChild(u);this.container=m};PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var u=document.createElement("input");u.setAttribute("name",e);u.setAttribute("type","radio");u.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","landscape");var B=document.createElement("select");B.style.marginBottom="4px";B.style.borderRadius="4px";B.style.borderWidth="1px";B.style.borderStyle="solid";B.style.boxSizing="border-box";B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));-H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var O=document.createElement("input");O.setAttribute("size","7");O.setAttribute("title",mxResources.get("width"));O.style.textAlign="right";G.appendChild(O);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);+H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var P=document.createElement("input");P.setAttribute("size","7");P.setAttribute("title",mxResources.get("width"));P.style.textAlign="right";G.appendChild(P);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);var c=document.createElement("select");c.style.marginLeft="4px";c.style.maxWidth="78px";c.style.width="78px";for(var f=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],l=0;l<f.length;l++){var t=document.createElement("option");t.setAttribute("value",f[l].unit);mxUtils.write(t,f[l].label);c.appendChild(t)}c.value=Editor.pageSizeUnit;G.appendChild(c);H.style.display="none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var J=C[K];null!=J.format&&("a4"==J.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==J.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==J.format.width&&g.height==J.format.height?(B.value=J.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==J.format.height&&g.height==J.format.width&&(B.value=J.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?-(O.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(O.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",-H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(O.value);if(isNaN(K)||0>=K)O.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(O.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});-mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(O,"blur",N);mxEvent.addListener(O,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){O.value=Editor.toUnit(Editor.fromUnit(O.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,-Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:O,heightInput:R}};+(P.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(P.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",+H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(P.value);if(isNaN(K)||0>=K)P.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(P.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});+mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(P,"blur",N);mxEvent.addListener(P,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){P.value=Editor.toUnit(Editor.fromUnit(P.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,+Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:P,heightInput:R}};PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};-var FilenameDialog=function(b,e,g,m,u,p,B,H,S,G,O){S=null!=S?S:!0;var R=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";+var FilenameDialog=function(b,e,g,m,u,p,B,H,S,G,P){S=null!=S?S:!0;var R=document.createElement("div"),c=document.createElement("div");c.style.width="100%";c.style.display="grid";c.style.gap="5px 8px";c.style.gridAutoColumns="auto 1fr";c.style.boxSizing="border-box";c.style.padding="3px";var f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.justifyContent="flex-end";f.style.minWidth="0";var l=document.createElement("div");l.style.display="inline-block";l.style.textOverflow="ellipsis";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.fontSize="10pt";l.style.padding="2px 0";l.setAttribute("title",u||mxResources.get("filename"));mxUtils.write(l,(u||mxResources.get("filename"))+":");f.appendChild(l);c.appendChild(f);var t=document.createElement("input");t.setAttribute("value",e||"");t.style.flexGrow="1";var z=mxUtils.button(g,function(){if(null==p||p(t.value))S&&b.hideDialog(),m(t.value)});z.className="geBtn gePrimaryBtn";this.init=function(){if(null!=-u||null==B)if(null!=O?Editor.selectFilename(t):(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var C=c.parentNode;if(null!=C){var F=null;mxEvent.addListener(C,"dragleave",function(N){null!=F&&(F.style.backgroundColor="",F=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=t,F.style.backgroundColor=+u||null==B)if(null!=P?Editor.selectFilename(t):(t.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var C=c.parentNode;if(null!=C){var F=null;mxEvent.addListener(C,"dragleave",function(N){null!=F&&(F.style.backgroundColor="",F=null);N.stopPropagation();N.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(N){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=t,F.style.backgroundColor="#ebf2f9");N.stopPropagation();N.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(N){null!=F&&(F.style.backgroundColor="",F=null);0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")&&(t.value=decodeURIComponent(N.dataTransfer.getData("text/uri-list")),z.click());N.stopPropagation();N.preventDefault()}))}}};f=document.createElement("div");f.style.display="inline-flex";f.style.alignItems="center";f.style.gap="4px";f.style.whiteSpace="nowrap";f.appendChild(t);c.appendChild(f);-null==u&&null!=B||null==O||null==b.editor.diagramFileTypes||(f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.textOverflow="ellipsis",f.style.justifyContent="flex-end",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("type")+":"),c.appendChild(f),f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.whiteSpace="nowrap",c.appendChild(f),e=FilenameDialog.createFileTypes(b,t,b.editor.diagramFileTypes),-e.style.width="100%",f.appendChild(e));null!=B&&c.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=O?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});f.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));+null==u&&null!=B||null==P||null==b.editor.diagramFileTypes||(f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.textOverflow="ellipsis",f.style.justifyContent="flex-end",f.style.fontSize="10pt",mxUtils.write(f,mxResources.get("type")+":"),c.appendChild(f),f=document.createElement("div"),f.style.display="inline-flex",f.style.alignItems="center",f.style.whiteSpace="nowrap",c.appendChild(f),e=FilenameDialog.createFileTypes(b,t,b.editor.diagramFileTypes),+e.style.width="100%",f.appendChild(e));null!=B&&c.appendChild(B);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=P?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=G&&G()});f.className="geBtn";null==H||b.isOffline()||row.appendChild(b.createHelpIcon(H));b.editor.cancelFirst&&row.appendChild(f);mxEvent.addListener(t,"keypress",function(C){13==C.keyCode&&z.click()});row.appendChild(z);b.editor.cancelFirst||row.appendChild(f);c.appendChild(row);R.appendChild(c);this.container=R};FilenameDialog.filenameHelpLink=null;FilenameDialog.createFileTypes=function(b,e,g){var m=document.createElement("select");for(b=0;b<g.length;b++){var u=document.createElement("option");u.setAttribute("value",b);mxUtils.write(u,mxResources.get(g[b].description)+" (."+g[b].extension+")");m.appendChild(u)}mxEvent.addListener(m,"change",function(p){p=g[m.value].extension;var B=e.value.lastIndexOf(".drawio.");B=0<B?B:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<B?e.value.substring(0,B+1)+p:e.value+"."+p;"createEvent"indocument?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var B=0,H=0;H<g.length;H++){var S=g[H].extension,G=null;"drawio"!=S&&(G=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=G&&p.substring(p.length-G.length-1)=="."+G){B=H;break}}m.value=B};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return m};@@ -2028,37 +2028,37 @@ var WrapperWindow=function(b,e,g,m,u,p,B){var H=b.createSidebarContainer();B(H);(function(){mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph;if(null!=B.container&&!B.transparentBackground){if(B.pageVisible){var H=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=B.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(H),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,this.backgroundPageShape.init(B.container),S.style.position="absolute",B.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(G){B.dblClick(G)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){null!=B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.isMouseDown&&!mxEvent.isConsumed(G)&&B.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(G))}),mxUtils.bind(this,function(G){B.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(G))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=H,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};-mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var O=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=O&&this.gridColor!=O.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(O=G.background);if(G.isGridEnabled()||G.gridVisible){l=+mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var P=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=P&&this.gridColor!=P.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(P=G.background);if(G.isGridEnabled()||G.gridVisible){l=10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=S%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*-this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=O,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=-"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,"1"==urlParams.transparent?G.container.style.background="transparent":!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=O:(B.style.backgroundColor=G.diagramBackgroundColor,-G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],O=1;O<this.gridSteps;O++){var R=O*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'++this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=P,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=+"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,"1"==urlParams.transparent?G.container.style.background="transparent":!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=P:(B.style.backgroundColor=G.diagramBackgroundColor,+G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],P=1;P<this.gridSteps;P++){var R=P*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;-mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,O=this.view.translate,R=-this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;S=f.height;var l=new mxRectangle(G*O.x,G*O.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=-0;J<=K;J++){var ea=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(J+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(J+1)*l.height))]:[new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(F))];null!=N[J]?(N[J].points=ea,N[J].redraw()):(ea=new mxPolyline(ea,this.pageBreakColor),ea.dialect=this.dialect,ea.isDashed=this.pageBreakDashed,ea.pointerEvents=!1,ea.init(this.view.backgroundPane),ea.redraw(),N[J]=ea)}for(J=-K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var O=this.graph.getCellGeometry(H[G]);if(null!=O&&O.relative)return!1}}return e.apply(this,arguments)};var g=+mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,P=this.view.translate,R=+this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;S=f.height;var l=new mxRectangle(G*P.x,G*P.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=+0;J<=K;J++){var da=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(J+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(J+1)*l.height))]:[new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(F))];null!=N[J]?(N[J].points=da,N[J].redraw()):(da=new mxPolyline(da,this.pageBreakColor),da.dialect=this.dialect,da.isDashed=this.pageBreakDashed,da.pointerEvents=!1,da.init(this.view.backgroundPane),da.redraw(),N[J]=da)}for(J=+K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var P=this.graph.getCellGeometry(H[G]);if(null!=P&&P.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){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(),H=0<B.width?B.x/-this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,O=this.graph.pageScale,R=G.width*O;G=G.height*O;O=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+O*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-O)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,-H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,O,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=-mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var G=this.graph.model.getParent(B);if(H){var O=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);O=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=O&&O.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(O=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))O=G,this.graph.isTable(O)||(O=this.graph.model.getParent(O)),-O=!this.graph.selectionCellsHandler.isHandled(O)||this.graph.isCellSelected(O)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return O};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),O=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);-O=O||R;if(R||!O&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var W=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,ma=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ha.x+ba.x)*ma,(ha.y+ba.y)*ma,ba.width*ma,ba.height*ma))}return W};u.useCssTransforms&&+this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,P=this.graph.pageScale,R=G.width*P;G=G.height*P;P=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+P*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-P)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,+H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,P,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=+mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var G=this.graph.model.getParent(B);if(H){var P=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);P=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=P&&P.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(P=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))P=G,this.graph.isTable(P)||(P=this.graph.model.getParent(P)),+P=!this.graph.selectionCellsHandler.isHandled(P)||this.graph.isCellSelected(P)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return P};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),P=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);+P=P||R;if(R||!P&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var W=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,la=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ha.x+ba.x)*la,(ha.y+ba.y)*la,ba.width*la,ba.height*la))}return W};u.useCssTransforms&&(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(W,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(W){for(var ba=W.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(W.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(W){try{u.getModel().isEdge(W)?-S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(W,!1),ha=[],ma=[],Y;for(Y in ba)ha.push(ba[Y]),ma.push(Y);u.getModel().isEdge(W)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ha,"cells",[W],"force",!0));u.getModel().isEdge(W)?S=u.pasteEdgeStyle=!0:H=!0}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=+S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(W,!1),ha=[],la=[],Y;for(Y in ba)ha.push(ba[Y]),la.push(Y);u.getModel().isEdge(W)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ha,"cells",[W],"force",!0));u.getModel().isEdge(W)?S=u.pasteEdgeStyle=!0:H=!0}catch(ma){this.handleError(ma)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(W,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(W,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(W){null==W&&(W=window.event);return u.isEditing()||null!=W&&this.isSelectionAllowed(W)});this.container!=document.body||this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var W=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{W=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return W}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(W){if(null!=W){var ba=mxEvent.getSource(W);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(W)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||-9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var O=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();O.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,+9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var P=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();P.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(W){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(W)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(W)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(W,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(W){16==W.which?this.shiftDown=!0:32!=W.which||u.isEditing()?mxEvent.isConsumed(W)||27!=W.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(W)!=u.container||mxEvent.consume(W))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(W){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(W){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(W.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(W.getEvent()))&&(!mxEvent.isControlDown(W.getEvent())&&mxEvent.isRightMouseButton(W.getEvent())||mxEvent.isMiddleMouseButton(W.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(W){return f.apply(this,arguments)||13==W.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W)||mxClient.IS_SF&&mxEvent.isShiftDown(W))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var W=this.toolbar.container.firstChild,ba=[];null!=W;){var ha=W.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,W)&&(W.parentNode.removeChild(W),ba.push(W));-W=ha}W=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var ma=0;ma<F.length;ma++)this.toolbar.container.appendChild(F[ma]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=W;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();+W=ha}W=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var la=0;la<F.length;la++)this.toolbar.container.appendChild(F[la]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=W;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));W=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var J=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(W,ba){try{J.apply(this,-arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(W){}var ea=u.fireMouseEvent;u.fireMouseEvent=function(W,ba,ha){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};var da=u.foldCells;u.foldCells=function(W,ba,ha,ma,Y){try{da.apply(this,arguments)}catch(la){m.handleError(la)}};u.popupMenuHandler.autoExpand=+arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(W){}var da=u.fireMouseEvent;u.fireMouseEvent=function(W,ba,ha){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),da.apply(this,arguments)}catch(la){m.handleError(la)}};var ea=u.foldCells;u.foldCells=function(W,ba,ha,la,Y){try{ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};u.popupMenuHandler.autoExpand=!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(W,ba,ha){this.menus.createPopupMenu(W,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(W){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(W,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(W,ba){W=ba.getProperty("force");(this.updateDefaultStyle||W)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(ba=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||@@ -2077,28 +2077,28 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"arguments);g.updateActionStates()};b.showLinkDialog=mxUtils.bind(g,g.showLinkDialog);b.editLink=g.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),g=this.initSelectionState(),m=!0,u=0;u<e.length;u++){var p=b.getCurrentCellStyle(e[u]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(g,e[u],e,m),m=!1)}this.updateSelectionStateForTableCells(g);return g};EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,S=1,G=1,O=0,R=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;O<e.length-1;){var c=e[++O];null==R||R!=c||null!=H&&S!=H||(H=S,S=0,G++,m=g.getParent(R),R=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);-if(c==g.getChildAt(m,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}O==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){var e=mxUtils.sortCells(b.cells),g=this.editor.graph.model,m=g.getParent(e[0]),u=g.getParent(m);if(null!=m&&null!=u){for(var p=m.getIndex(e[0]),B=u.getIndex(m),H=null,S=1,G=1,P=0,R=B<u.getChildCount()-1?g.getChildAt(g.getChildAt(u,B+1),p):null;P<e.length-1;){var c=e[++P];null==R||R!=c||null!=H&&S!=H||(H=S,S=0,G++,m=g.getParent(R),R=B+G<u.getChildCount()?g.getChildAt(g.getChildAt(u,B+G),p):null);var f=this.editor.graph.view.getState(c);+if(c==g.getChildAt(m,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}P==G*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=G)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};EditorUi.prototype.createTimeout=function(b,e,g){var m=!0,u=null,p=mxUtils.bind(this,function(H){u.clear()&&(m=!1,H=null!=H?H:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(b,e,g)})},null!=g?g(H):this.handleError(H))}),B=window.setTimeout(p,null!=b?b:this.timeout);u={clear:function(){window.clearTimeout(B);return m},isAlive:function(){return m}};null!=e&&this.tryAndHandle(mxUtils.bind(this,function(){e(u)}),p);return u};EditorUi.prototype.tryAndHandle=function(b,e){try{b()}catch(g){null!=e?e(g):this.handleError(g)}};-EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<u.length;S++)try{var G=H[u[S]];if(mxUtils.isLightDarkColor(G)){var O=mxUtils.getLightDarkColor(G);m.setCellStyles(u[S],O.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&-"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){O=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,O.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};+EditorUi.prototype.removeUserDefinedDarkColors=function(b,e,g){var m=this.editor.graph;b=null!=b?b:m.getSelectionCells();var u=Graph.colorStyles,p=document.createElement("div");m.model.beginUpdate();try{for(var B=0;B<b.length;B++)if(m.model.isEdge(b[B])||m.model.isVertex(b[B])){var H=m.getCellStyle(b[B],!1);if(null!=H)for(var S=0;S<u.length;S++)try{var G=H[u[S]];if(mxUtils.isLightDarkColor(G)){var P=mxUtils.getLightDarkColor(G);m.setCellStyles(u[S],P.light,[b[B]])}}catch(c){}e&&m.isHtmlLabel(b[B])&&+"0"!=mxUtils.getValue(H,"html","0")&&(p.innerHTML=Graph.sanitizeHtml(m.getLabel(b[B])),Graph.addLightDarkColors(p,null,null,function(c,f,l){return mxUtils.isLightDarkColor(l)?(l=mxUtils.getLightDarkColor(l),c.style.setProperty(f,l.light),!0):!1})&&m.cellLabelChanged(b[B],p.innerHTML))}if(g&&mxUtils.isLightDarkColor(m.background)){P=mxUtils.getLightDarkColor(m.background);var R=new ChangePageSetup(this,P.light);R.ignoreImage=!0;m.model.execute(R)}}finally{m.model.endUpdate()}return b};EditorUi.prototype.updateSelectionStateForCell=function(b,e,g,m){g=this.editor.graph;b.cells.push(e);if(g.getModel().isVertex(e)){b.connections=0<g.model.getEdgeCount(e);b.unlocked=b.unlocked&&!g.isCellLocked(e);b.resizable=b.resizable&&g.isCellResizable(e);b.rotatable=b.rotatable&&g.isCellRotatable(e);b.movable=b.movable&&g.isCellMovable(e)&&!g.isTableRow(e)&&!g.isTableCell(e);b.swimlane=b.swimlane||g.isSwimlane(e);b.table=b.table||g.isTable(e);b.cell=b.cell||g.isTableCell(e);b.row=b.row||g.isTableRow(e);b.vertices.push(e);var u=g.getCellGeometry(e);if(null!=u&&(0<u.width?null==b.width?b.width=u.width:b.width!=u.width&&(b.width=""):b.containsLabel=!0,0<u.height?null==b.height?b.height=u.height:b.height!=u.height&&(b.height=""):b.containsLabel=!0,!u.relative||null!=u.offset)){var p=u.relative?u.offset.x:u.x;u=u.relative?u.offset.y:u.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=u:b.y!=u&&(b.y="")}}else g.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=!1);p=g.view.getState(e);null!=p&&(b.html=b.html&&g.isHtmlLabel(e),b.autoSize=b.autoSize||g.isAutoSizeState(p),b.glass=b.glass&&g.isGlassState(p),b.rounded=b.rounded&&g.isRoundedState(p),b.lineJumps=b.lineJumps&&g.isLineJumpState(p),b.image=b.image||g.isImageState(p),b.shadow=b.shadow&&g.isShadowState(p),b.fill=b.fill&&g.isFillState(p),b.gradient=b.fill&&g.isGradientState(p),b.stroke=b.stroke&&g.isStrokeState(p),e=mxUtils.getValue(p.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==e,g.mergeStyle(p.style,b.style,m))};EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,G){"mouseDown"==G.getProperty("eventName")&&e.hideShapePicker()}));var g=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",g);b.addListener(mxEvent.ESCAPE,g);b.view.addListener(mxEvent.SCALE,g);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,g);b.getSelectionModel().addListener(mxEvent.CHANGE,g);var m=b.popupMenuHandler.isMenuShowing;-b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var O=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(O.x,O.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",-g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,O){var R=O.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?B.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(S.cell);c=b.getCellGeometry(t);for(O.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=-t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(O.getGraphX(),O.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,R,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var O=-G.getProperty("arrow"),R=G.getProperty("direction"),c=G.getProperty("event");O=O.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+O.x-f.x;f=b.container.scrollTop+O.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,R,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},-function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),R,!0);null!=z&&(this.centerShapePicker(z,O,l,f,R),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H)}))}};+b.popupMenuHandler.isMenuShowing=function(){return m.apply(this,arguments)||null!=e.shapePicker||null!=e.currentMenu};var u=b.dblClick;b.dblClick=function(S,G){if(this.isEnabled())if(null!=G||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))u.apply(this,arguments);else{var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.x,P.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",+g);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();p.apply(this,arguments)};var B=this.hoverIcons.execute;this.hoverIcons.execute=function(S,G,P){var R=P.getEvent();this.graph.isCloneEvent(R)||mxEvent.isShiftDown(R)?B.apply(this,arguments):this.graph.connectVertex(S.cell,G,this.graph.defaultEdgeLength,R,null,null,mxUtils.bind(this,function(c,f,l){var t=b.getCompositeParent(S.cell);c=b.getCellGeometry(t);for(P.consume();null!=t&&b.model.isVertex(t)&&null!=c&&c.relative;)cell=+t,t=b.model.getParent(cell),c=b.getCellGeometry(t);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(P.getGraphX(),P.getGraphY(),t,mxUtils.bind(this,function(z){l(z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(z))}),G)}),30)}),mxUtils.bind(this,function(c){this.graph.selectCellsForConnectVertex(c,R,this)}))};var H=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H);H=window.setTimeout(mxUtils.bind(this,function(){var P=+G.getProperty("arrow"),R=G.getProperty("direction"),c=G.getProperty("event");P=P.getBoundingClientRect();var f=mxUtils.getOffset(b.container),l=b.container.scrollLeft+P.x-f.x;f=b.container.scrollTop+P.y-f.y;var t=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),z=e.showShapePicker(l,f,t,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(t,R,b.defaultEdgeLength,c,!0,!1,function(F,N,K){K(C);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(C))},+function(F){b.selectCellsForConnectVertex(F)},c,this.hoverIcons)}),R,!0);null!=z&&(this.centerShapePicker(z,P,l,f,R),mxUtils.setOpacity(z,30),mxEvent.addListener(z,"mouseenter",function(){mxUtils.setOpacity(z,100)}),mxEvent.addListener(z,"mouseleave",function(){e.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,G){null!=H&&window.clearTimeout(H)}))}};EditorUi.prototype.centerShapePicker=function(b,e,g,m,u){if(u==mxConstants.DIRECTION_EAST||u==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();u==mxConstants.DIRECTION_NORTH?(g-=p.width/2-10,m-=p.height+6):u==mxConstants.DIRECTION_SOUTH?(g-=p.width/2-10,m+=e.height+6):u==mxConstants.DIRECTION_WEST?(g-=p.width+6,m-=p.height/2-10):u==mxConstants.DIRECTION_EAST&&(g+=e.width+6,m-=p.height/2-10);b.style.left=g+"px";b.style.top=m+"px"};EditorUi.prototype.showShapePicker=function(b,e,g,m,u,p,B,H,S){var G=null;this.editor.graph.freehand.isDrawing()||(H=H||null==g,G=this.createShapePicker(b,e,g,m,u,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(g,p,H),p,B,H,S),null!=G&&(null==this.hoverIcons||p||this.hoverIcons.reset(),b=this.editor.graph,b.popupMenuHandler.hideMenu(),b.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=m,this.shapePicker=G));return G};-EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,S,G,O){O=null!=O?O:!0;var R=this.editor.graph,c=null;S=null!=S?S:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(R.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-z),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;R=this.editor.graph;c=document.createElement("div");+EditorUi.prototype.createShapePicker=function(b,e,g,m,u,p,B,H,S,G,P){P=null!=P?P:!0;var R=this.editor.graph,c=null;S=null!=S?S:function(t){t=t[0];var z=0,C=0,F=t.geometry;null!=F&&(R.model.isEdge(t)&&(t=F.getTerminalPoint(!1),F=new mxRectangle(0,0,t.x,t.y)),z=F.width/2,C=F.height/2);return new mxPoint(R.snap(Math.round(b/R.view.scale)-R.view.translate.x-z),R.snap(Math.round(e/R.view.scale)-R.view.translate.y-C))};if(null!=B&&0<B.length){var f=this;R=this.editor.graph;c=document.createElement("div");u=R.view.getState(g);var l=null==g||null!=u&&R.isTransparentState(u)?null:R.copyStyle(g);u=6>B.length?35*B.length:140;c.className="geToolbarContainer geSidebarContainer geShapePicker";c.setAttribute("title",mxResources.get("sidebarTooltip"));c.style.left=Math.round(b)+"px";c.style.top=Math.round(e)+"px";c.style.width=u+"px";mxClient.IS_POINTER&&(c.style.touchAction="none");H||mxUtils.setPrefixedStyle(c.style,"transform","translate(-22px,-22px)");R.container.appendChild(c);u=mxUtils.bind(this,function(t){var z=document.createElement("a");z.className="geToolbarButton";z.style.display="inline-block";z.style.position="relative";z.style.overflow="hidden";z.style.cursor="pointer";z.style.width="30px";z.style.height="30px";z.style.padding="1px";c.appendChild(z);null!=l&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(l,[t]):this.sidebar.graph.pasteCellStyles([t],R.currentVertexStyle,R.currentEdgeStyle);var C=t.geometry;R.model.isEdge(t)&&(C=C.getTerminalPoint(!1),C=new mxRectangle(0,0,C.x,C.y));null!=C&&-z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&R.isSelectionEmpty()){var N=R.cloneCell(t);if(null!=m)m(N);else{var K=S([N]);R.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);R.model.beginUpdate();try{R.addCell(N),R.model.isVertex(N)&&R.isAutoSizeCell(N)&&R.updateCellSize(N)}finally{R.model.endUpdate()}R.setSelectionCell(N);R.scrollCellToVisible(N);O&&+z.appendChild(this.sidebar.createVertexTemplateFromCells([t],C.width,C.height,"",!0,!1,null,!1,mxUtils.bind(this,function(F){if(!mxEvent.isShiftDown(F)||null==g&&R.isSelectionEmpty()){var N=R.cloneCell(t);if(null!=m)m(N);else{var K=S([N]);R.model.isEdge(N)?N.geometry.translate(K.x,K.y):(N.geometry.x=K.x,N.geometry.y=K.y);R.model.beginUpdate();try{R.addCell(N),R.model.isVertex(N)&&R.isAutoSizeCell(N)&&R.updateCellSize(N)}finally{R.model.endUpdate()}R.setSelectionCell(N);R.scrollCellToVisible(N);P&&R.startEditing(N);null!=f.hoverIcons&&f.hoverIcons.update(R.view.getState(N))}}else N=R.getEditableCells(null!=g?[g]:R.getSelectionCells()),R.updateShapes(t,N);null!=p&&p(F);mxEvent.consume(F)}),25,25,null,null,g))});for(G=0;G<(H?Math.min(B.length,4):B.length);G++)u(B[G]);B=c.offsetTop+c.clientHeight-(R.container.scrollTop+R.container.offsetHeight);0<B&&(c.style.top=Math.max(R.container.scrollTop+22,e-B)+"px");B=c.offsetLeft+c.clientWidth-(R.container.scrollLeft+R.container.offsetWidth);0<B&&(c.style.left=Math.max(R.container.scrollLeft+22,b-B)+"px")}return c};EditorUi.prototype.getCellsForShapePicker=function(b,e,g){var m=this.editor.graph,u=mxUtils.bind(this,function(p,B,H,S){return m.createVertex(null,null,S||"",0,0,B||120,H||60,p,!1)});e=mxUtils.bind(this,function(p,B,H){p=new mxCell(H||"",new mxGeometry(0,0,m.defaultEdgeLength+20,0),p);p.geometry.setTerminalPoint(new mxPoint(0,0),!0);p.geometry.setTerminalPoint(new mxPoint(p.geometry.width,null!=B?B:0),!1);p.geometry.points=null!=B?[new mxPoint(p.geometry.width/2,B)]:[];p.geometry.relative=!0;p.edge=@@ -2117,47 +2117,47 @@ e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:b==mxConstants.Ae?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==b?Format.boxMarkerImage.src:"halfCircle"==b?Format.halfCircleMarkerImage.src:"openAsync"==b?Format.openAsyncFilledMarkerImage.src:"async"==b?"1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?Format.dashMarkerImage.src:"baseDash"==b?Format.baseDashMarkerImage.src:"cross"==b?Format.crossMarkerImage.src:"circle"==b?Format.circleMarkerImage.src:"circlePlus"==b?Format.circlePlusMarkerImage.src:"ERone"==b?Format.EROneMarkerImage.src:"ERmandOne"==b?Format.ERmandOneMarkerImage.src:"ERmany"==b?Format.ERmanyMarkerImage.src:"ERoneToMany"==b?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),g=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));g.setEnabled(e.isEnabled())};-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},S=p.createCellLookup(B),G=p.cloneCells(B,null,H),O=new mxGraphModel,R=O.getChildAt(O.getRoot(),-0),c=0;c<G.length;c++){O.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!O.isEdge(B[c])&&null==S[mxObjectIdentity.get(O.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var B=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{B=B||p.getSelectionCells();B=p.getExportableCells(p.model.getTopmostCells(B));for(var H={},S=p.createCellLookup(B),G=p.cloneCells(B,null,H),P=new mxGraphModel,R=P.getChildAt(P.getRoot(),+0),c=0;c<G.length;c++){P.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!P.isEdge(B[c])&&null==S[mxObjectIdentity.get(P.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=g.apply(this,arguments);b.updatePasteActionStates();return B};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,B){u.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;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 P=this.graph.getPageLayout(),U=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*U.width),this.scale*(this.translate.y+P.y*U.height),this.scale*P.width*U.width,-this.scale*P.height*U.height)};b.getPreferredPageSize=function(P,U,X){P=this.getPageLayout();U=this.getPageSize();return new mxRectangle(0,0,P.width*U.width,P.height*U.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,U,X,aa){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,-wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;P=P?Math.max(.3,Math.min(U||1,Ea/wa.width)):qa;U=(Ea-P*wa.width)/2/P;var ra=0==this.lightboxVerticalDivider?0:(za-P*wa.height)/this.lightboxVerticalDivider/P;pa&&(U=Math.max(U,0),ra=Math.max(ra,-0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(P,Math.floor(U-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*P/qa,b.container.scrollLeft=Ba*P/qa;else if(0!=X||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+X/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,-"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var O=this.graph.getPageLayout(),T=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+O.x*T.width),this.scale*(this.translate.y+O.y*T.height),this.scale*O.width*T.width,+this.scale*O.height*T.height)};b.getPreferredPageSize=function(O,T,X){O=this.getPageLayout();T=this.getPageSize();return new mxRectangle(0,0,O.width*T.width,O.height*T.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(O,T,X,aa){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,+wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;O=O?Math.max(.3,Math.min(T||1,Ea/wa.width)):qa;T=(Ea-O*wa.width)/2/O;var ra=0==this.lightboxVerticalDivider?0:(za-O*wa.height)/this.lightboxVerticalDivider/O;pa&&(T=Math.max(T,0),ra=Math.max(ra,+0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(O,Math.floor(T-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*O/qa,b.container.scrollLeft=Ba*O/qa;else if(0!=X||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+X/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,+"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(O){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(O){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=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 p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(P,U,X){B++;-var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=X&&aa.setAttribute("title",X);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",U);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(P){window.location.href=-H;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var O=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,P+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());-S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());O.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";O.style.paddingLeft="4px";O.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(O.style.display="",S.style.display="",G.style.display="inline-block"):-(O.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){var U=new mxPopupMenu(f.funct);U.div.className+=" geMenubarMenu";U.smartSeparators=!0;U.showDisabled=!0;U.autoExpand=!0;U.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(U,arguments);U.destroy()});var X=mxUtils.getOffset(G);U.popup(X.x,X.y+G.offsetHeight,null,P);mxEvent.addListener(U.div,-"mouseleave",mxUtils.bind(this,function(){U.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?-(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),-600)}),P||200)}),C=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var U=F.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=-U.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));U=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=-U.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var J=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(P){null!=-J?window.location.href=J:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=-document.body))&&p(mxUtils.bind(this,function(P){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),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(P){mxEvent.isTouchEvent(P)||-(mxEvent.isShiftDown(P)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?z():C(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,-"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||C(30)}));var ea=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,U){this.startX=U.getGraphX();this.startY=U.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,U){},mouseUp:function(P,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ea&&Math.abs(this.scrollTop-b.container.scrollTop)<-ea&&Math.abs(this.startX-U.getGraphX())<ea&&Math.abs(this.startY-U.getGraphY())<ea&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ca=new mxPoint,W=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;W=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,-!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ca,1);var U=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(U.x!=this.translate.x||U.y!=this.translate.y)this.invalidate(),this.translate.x=U.x,this.translate.y=U.y}U=b.getPagePadding();var X=b.getPageSize();P=U.x-(this.x0||0)*X.width;U=U.y-(this.y0||0)*X.height;if(this.translate.x!=P||this.translate.y!=U)this.invalidate(),this.translate.x=P,this.translate.y=U}da.apply(this,arguments)};-if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var P=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var U=this.getPageLayout(),X=this.getDefaultTranslate(U),aa=this.view.translate.x,ja=this.view.translate.y;if(X.x!=aa||X.y!=ja){this.view.x0=U.x;this.view.y0=U.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((X.x-aa)*this.view.scale),this.container.scrollTop+=-Math.round((X.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ma=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Z=null,k=null,A=null,I=null,T=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||A)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&-(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",ma.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",ma.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";ma.style.transform=""},0)):(Y.style.transform="",ma.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=-"");var U=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+X.x,pa=b.container.offsetHeight/2-Z.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=U.x-k.x,pa+=U.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=-ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,U,X,aa){aa=null!=aa?aa:this.zoomFactor;(U=U||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var O=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=O?parseInt(O["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(O,T,X){B++;+var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",O);null!=X&&aa.setAttribute("title",X);O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("src",T);O.style.width="36px";O.style.filter="invert(100%)";aa.appendChild(O);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(O){window.location.href=+H;mxEvent.consume(O)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(O){this.actions.get("previousPage").funct();mxEvent.consume(O)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var P=p(mxUtils.bind(this,function(O){this.actions.get("nextPage").funct();mxEvent.consume(O)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var O=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,O+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());+S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(O-1,this.pages.length)].getName());P.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(O+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";P.style.paddingLeft="4px";P.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(P.style.display="",S.style.display="",G.style.display="inline-block"):+(P.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(O){var T=new mxPopupMenu(f.funct);T.div.className+=" geMenubarMenu";T.smartSeparators=!0;T.showDisabled=!0;T.autoExpand=!0;T.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(T,arguments);T.destroy()});var X=mxUtils.getOffset(G);T.popup(X.x,X.y+G.offsetHeight,null,O);mxEvent.addListener(T.div,+"mouseleave",mxUtils.bind(this,function(){T.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(O){this.actions.get("zoomOut").funct();mxEvent.consume(O)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){this.actions.get("zoomIn").funct();mxEvent.consume(O)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(O){b.isLightboxView()?+(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(O)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(O){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),+600)}),O||200)}),C=mxUtils.bind(this,function(O){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,O||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(O){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var T=F.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=+T.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));T=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=+T.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(O)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(O){null!=this.editor.editButtonFunc?+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(O)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var J=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(O){null!=+J?window.location.href=J:window.location.reload();mxEvent.consume(O)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(O){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(O)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=+document.body))&&p(mxUtils.bind(this,function(O){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(O))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||+(mxEvent.isShiftDown(O)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(O){mxEvent.consume(O)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(O){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(O)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(O){mxEvent.isShiftDown(O)?z():C(100);mxEvent.consume(O)}));mxEvent.addListener(this.chromelessToolbar,+"mouseleave",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||C(30)}));var da=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(O,T){this.startX=T.getGraphX();this.startY=T.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(O,T){},mouseUp:function(O,T){mxEvent.isTouchEvent(T.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<da&&Math.abs(this.scrollTop-b.container.scrollTop)<+da&&Math.abs(this.startX-T.getGraphX())<da&&Math.abs(this.startY-T.getGraphY())<da&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ea=b.view.validate,ca=new mxPoint,W=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;W=!0;var O=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,+!0);null==O&&(O=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));O=b.getPageLayout(O,ca,1);var T=b.getDefaultTranslate(O);this.x0=O.x;this.y0=O.y;if(T.x!=this.translate.x||T.y!=this.translate.y)this.invalidate(),this.translate.x=T.x,this.translate.y=T.y}T=b.getPagePadding();var X=b.getPageSize();O=T.x-(this.x0||0)*X.width;T=T.y-(this.y0||0)*X.height;if(this.translate.x!=O||this.translate.y!=T)this.invalidate(),this.translate.x=O,this.translate.y=T}ea.apply(this,arguments)};+if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var O=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var T=this.getPageLayout(),X=this.getDefaultTranslate(T),aa=this.view.translate.x,ja=this.view.translate.y;if(X.x!=aa||X.y!=ja){this.view.x0=T.x;this.view.y0=T.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;O||(this.container.scrollLeft+=Math.round((X.x-aa)*this.view.scale),this.container.scrollTop+=+Math.round((X.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var la=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ma=null,Z=null,k=null,A=null,I=null,U=function(O){null!=ma&&window.clearTimeout(ma);0<=O&&window.setTimeout(function(){if(!b.isMouseDown||A)ma=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&+(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",la.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",la.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";la.style.transform=""},0)):(Y.style.transform="",la.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=+"");var T=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+X.x,pa=b.container.offsetHeight/2-Z.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=T.x-k.x,pa+=T.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=+ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=ma=null}),null!=O?O:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(O,T,X,aa){aa=null!=aa?aa:this.zoomFactor;(T=T||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));O?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,-160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=U||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=U||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop--b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+P+")";ma.style.transformOrigin=aa+"px "+ja+"px";ma.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(U||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(U||null==Z?b.container.clientHeight/-2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}T(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},-null,function(P){1!=b.cumulativeZoomFactor&&T(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,U,X,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(P))X=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(X.x+(U?-aa:aa),X.y):b.view.setTranslate(X.x,X.y+(U?-aa:-aa));else if(X||b.isZoomWheelEvent(P))for(var pa=mxEvent.getSource(P);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),A=X,X=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?X=1+Math.abs(P.deltaY)/20*(X-1):null!=P.movementY&&"pointermove"==P.type&&(X=1+Math.max(1,Math.abs(P.movementY))/20*(X-1),aa=-1),b.lazyZoom(U,null,aa,X),mxEvent.consume(P),-!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};+160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);O=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=T||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=T||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-+b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+O+")";la.style.transformOrigin=aa+"px "+ja+"px";la.style.transform="scale("+O+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(T||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(T||null==Z?b.container.clientHeight/+2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+O+")")):b.view.validateBackgroundStyles(O,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",O))}U(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(O){null!=ma&&window.clearTimeout(ma)},+null,function(O){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(O){null==ma||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(O,T,X,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(O))X=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(O)?b.view.setTranslate(X.x+(T?-aa:aa),X.y):b.view.setTranslate(X.x,X.y+(T?+aa:-aa));else if(X||b.isZoomWheelEvent(O))for(var pa=mxEvent.getSource(O);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),A=X,X=b.zoomFactor,aa=null,O.ctrlKey&&null!=O.deltaY&&40>Math.abs(O.deltaY)&&Math.round(O.deltaY)!=O.deltaY?X=1+Math.abs(O.deltaY)/20*(X-1):null!=O.movementY&&"pointermove"==O.type&&(X=1+Math.max(1,Math.abs(O.movementY))/20*(X-1),aa=-1),b.lazyZoom(T,null,aa,X),mxEvent.consume(O),+!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(O){b.cumulativeZoomFactor=O.scale;b.lazyZoom(0<O.scale,!0);mxEvent.consume(O)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,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))};EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};@@ -2213,11 +2213,11 @@ EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=Grap"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(g,100);mxUtils.setPrefixedStyle(g.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(g.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(g.style,"transform","scaleX(0)");mxUtils.setOpacity(g,0);window.setTimeout(mxUtils.bind(this,function(){null!=g.parentNode&&g.parentNode.removeChild(g)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.style.textOverflow="ellipsis";e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.minWidth="0";e.setAttribute("title",b);e.innerHTML=Graph.sanitizeHtml(b);return e};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 e=document.createElement("div");e.className=b;return e};-EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(R){if(null!=B){var c=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(R);H!=O()&&(S=!0,G=null)}}function p(R){u(R);B=H=null}var B=null,H=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var O=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){B=new mxPoint(mxEvent.getClientX(R),-mxEvent.getClientY(R));H=O();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=O();m(c);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};+EditorUi.prototype.addSplitHandler=function(b,e,g,m){function u(R){if(null!=B){var c=new mxPoint(mxEvent.getClientX(R),mxEvent.getClientY(R));m(Math.max(0,H+(e?c.x-B.x:B.y-c.y)-g));mxEvent.consume(R);H!=P()&&(S=!0,G=null)}}function p(R){u(R);B=H=null}var B=null,H=null,S=!0,G=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var P=mxUtils.bind(this,function(){var R=parseInt(e?b.style.left:b.style.bottom);e||(R=R+g-this.footerHeight);return R});mxEvent.addGestureListeners(b,function(R){B=new mxPoint(mxEvent.getClientX(R),+mxEvent.getClientY(R));H=P();S=!1;mxEvent.consume(R)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(R){if(!S&&this.hsplitClickEnabled){var c=null!=G?G-g:0;G=P();m(c);mxEvent.consume(R)}}));mxEvent.addGestureListeners(document,null,u,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,u,p)})};EditorUi.prototype.prompt=function(b,e,g){b=new FilenameDialog(this,e,mxResources.get("apply"),function(m){g(parseFloat(m))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};EditorUi.prototype.handleError=function(b,e,g,m,u){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){u=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(u=mxUtils.htmlEntities(b.message));this.showError(e,u,p,g,null,null,null,null,null,null,null,null,m?g:null)}else null!=g&&g()};-EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,S,G,O,R,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,R,H,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,O||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,S,G);this.dialogs.push(this.dialog)};+EditorUi.prototype.showError=function(b,e,g,m,u,p,B,H,S,G,P,R,c){b=new ErrorDialog(this,b,e,g||mxResources.get("ok"),m,u,p,B,R,H,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,G||340,P||100+20*e,!0,!1,c);b.init()};EditorUi.prototype.showDialog=function(b,e,g,m,u,p,B,H,S,G){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,g,m,u,p,B,H,S,G);this.dialogs.push(this.dialog)};EditorUi.prototype.hideDialog=function(b,e,g){var m=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var u=this.dialogs.length-1;0<=u;u--)if(!this.dialogs[u].closing){m=this.dialogs[u];break}null==m||null!=g&&g!=this.dialog.container.firstChild||(m.closing=!0,0==m.close(b,e)?delete m.closing:(delete m.closing,b=mxUtils.lastIndexOf(this.dialogs,m),0<=b&&this.dialogs.splice(b,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog","dialog",m)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(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 e=b.getSelectionCells(),g=new mxDictionary,m=[],u=0;u<e.length;u++){var p=b.isTableCell(e[u])?b.model.getParent(e[u]):e[u];null==p||g.get(p)||(g.put(p,!0),m.push(p))}b.setSelectionCells(b.duplicateCells(m,!1))}catch(B){this.handleError(B)}};@@ -2228,7 +2228,7 @@ EditorUi.prototype.writeImageToClipboard=function(b,e,g,m){var u=this.base64ToBlEditorUi.prototype.writeTextToClipboard=function(b,e){navigator.clipboard.writeText(b)["catch"](e)};EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var g=b.indexOf("<mxGraphModel ");if(0<=g){var m=b.lastIndexOf("</mxGraphModel>");m>g&&(e=b.substring(g,m+21).replace(/>/g,">").replace(/</g,"<").replace(/\\"/g,'"').replace(/\n/g,""))}}catch(u){}return e};EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(g){if(null!=g){var m=decodeURIComponent(g);this.isCompatibleString(m)&&(g=m)}b(g)}),"text")}),"html")};EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(g){if(null!=g&&0<g.length&&"html"==e&&0<=mxUtils.indexOf(g[0].types,"text/html"))g[0].getType("text/html").then(mxUtils.bind(this,function(m){m.text().then(mxUtils.bind(this,function(u){try{var p=this.parseHtmlData(u),B="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var H=B.lastIndexOf("%3E");-0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(O){}try{var S=p.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(O){}}catch(O){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});+0<=H&&H<B.length-3&&(B=B.substring(0,H+3))}catch(P){}try{var S=p.getElementsByTagName("span"),G=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(B);this.isCompatibleString(G)&&(B=G)}catch(P){}}catch(P){}b(this.isCompatibleString(B)?B:null)}))["catch"](function(u){b(null)})}))["catch"](function(m){b(null)});else if(null!=g&&0<g.length&&"text"==e&&0<=mxUtils.indexOf(g[0].types,"text/plain"))g[0].getType("text/plain").then(function(m){m.text().then(function(u){b(u)})["catch"](function(){b(null)})})["catch"](function(){b(null)});else b(null)}))["catch"](function(g){b(null)})};EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var g="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(g?'<meta charset="utf-8">':"")+Graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));g=g&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=g&&null==g.nextSibling&&g.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==g.nodeName?(b=g.getAttribute("src"),null!=b&&(Editor.isPngDataUrl(b)&&@@ -2251,7 +2251,7 @@ l=0,37==R?l=-c:38==R?t=-c:39==R?l=c:40==R&&(t=c),F.currentDx+=l*C,F.currentDy+=t(null==g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(c=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=c)return c.funct;if(null!=H[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[R.keyCode],m.defaultEdgeLength,R,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return S.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(R,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},-c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,O=u.escape;u.escape=function(R){O.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,+c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,P=u.escape;u.escape=function(R){P.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,"zoomIn");u.bindAction(222,!0,"zoomIn");u.bindAction(173,!0,"zoomOut");u.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)u.bindAction(79,!0,"outline",!0),u.bindControlKey(36,function(){m.isEnabled()&&m.foldCells(!0)}),u.bindControlKey(35,function(){m.isEnabled()&&m.foldCells(!1)}),u.bindControlKey(13,function(){G.ctrlEnter()}),u.bindAction(8,!1,"delete"),u.bindAction(8,!0,"deleteAll"),u.bindAction(8,!1,"deleteLabels",!0),u.bindAction(46,!1,"delete"),u.bindAction(46,!0,"deleteAll"),u.bindAction(46,!1,"deleteLabels",!0),u.bindAction(36,!1,"resetView"),u.bindAction(72,!0,"fitWindow",!0),u.bindAction(74,!0,"fitPage"),u.bindAction(74,!0,"fitTwoPages",!0),u.bindAction(48,!0,"customZoom"),u.bindAction(82,!0,"turn"),u.bindAction(82,!0,"clearDefaultStyle",!0),u.bindAction(83,!0,"save"),u.bindAction(83,!0,"saveAs",!0),u.bindAction(65,!0,"selectAll"),u.bindAction(65,!0,"selectNone",!0),u.bindAction(73,!0,"selectVertices",!0),u.bindAction(69,!0,"selectEdges",!0),u.bindAction(69,!0,"editStyle"),u.bindAction(66,!0,"bold"),u.bindAction(66,!0,"toBack",!0),u.bindAction(70,!0,"toFront",!0),u.bindAction(68,!0,"duplicate"),u.bindAction(68,!0,"setAsDefaultStyle",!0),u.bindAction(90,!0,"undo"),u.bindAction(90,!0,"redo",!0),u.bindAction(89,!0,"redo"),u.bindAction(89,!0,"autosize",!0),u.bindAction(88,!0,"cut"),u.bindAction(67,!0,"copy"),u.bindAction(86,!0,"paste"),u.bindAction(71,!0,"group"),u.bindAction(77,!0,"editData"),u.bindAction(71,!0,"grid",!0),u.bindAction(73,!0,"italic"),u.bindAction(76,@@ -2264,43 +2264,43 @@ null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gnull}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(m){for(var u=0;u<b.length;u++)m=m.replace(new RegExp("&"+b[u][0]+";","g"),"&#"+b[u][1]+";");return e(m)};var g=mxUtils.getSizeForString;mxUtils.getSizeForString=function(m,u,p,B){return g(Graph.sanitizeHtml(m),u,p,B)}})();Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}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,e=function(m){return"function"===typeof m||"[object Function]"===b.call(m)},g=Math.pow(2,53)-1;return function(m){var u=Object(m);if(null==m)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,B;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(B=-arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var S=e(this)?Object(new this(H)):Array(H),G=0,O;G<H;)O=u[G],S[G]=p?"undefined"===typeof B?p(O,G):p.call(B,O,G):O,G+=1;S.length=H;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");+arguments[2])}var H=Number(u.length);H=isNaN(H)?0:0!==H&&isFinite(H)?(0<H?1:-1)*Math.floor(Math.abs(H)):H;H=Math.min(Math.max(H,0),g);for(var S=e(this)?Object(new this(H)):Array(H),G=0,P;G<H;)P=u[G],S[G]=p?"undefined"===typeof B?p(P,G):p.call(B,P,G):P,G+=1;S.length=H;return S}}());mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");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(e){}})();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="#424242";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.graph.refresh(),this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,g){return null};-mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};+mxImageShape.prototype.getImageDataUri=function(){var b=String(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};(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,u,p){return"default"==u&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();-(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var O=G.getElementsByTagName("img");0<O.length&&(O[0].className="geToolbarButton geAdaptiveAsset",O[0].style.margin="4px",O[0].style.width="18px")}return G}})();+(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var P=G.getElementsByTagName("img");0<P.length&&(P[0].className="geToolbarButton geAdaptiveAsset",P[0].style.margin="4px",P[0].style.width="18px")}return G}})();Graph=function(b,e,g,m,u,p){mxGraph.call(this,b,e,g,m);this.themes=u||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);-return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,O=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);-if(null==I||null==I.getHandleForEvent(Z)){var T=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),P=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=P+2;T.grow(P);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+-I,Z.getGraphY()-I))){var U=this.model.getParent(A.cell);I=this.model.getParent(U);if(!this.isCellSelected(I)){P*=k;var X=2*P;if(this.model.getChildAt(I,0)!=U&&mxUtils.intersects(T,new mxRectangle(A.x,A.y-P,A.width,X))||this.model.getChildAt(U,0)!=A.cell&&mxUtils.intersects(T,new mxRectangle(A.x-P,A.y,X,A.height))||mxUtils.intersects(T,new mxRectangle(A.x,A.y+A.height-P,A.width,X))||mxUtils.intersects(T,new mxRectangle(A.x+A.width-P,A.y,X,A.height)))U=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,-Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(P=I.getHandleForEvent(Z),null!=P&&(I.start(Z.getGraphX(),Z.getGraphY(),P),I.blockDelayedSelection=!U,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(T,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||-0<I.height)&&mxUtils.intersects(T,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(P=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),P),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&-this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),O=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));-this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var T=null;mxEvent.isShiftDown(k.getEvent())||(T=this.selectionCellsHandler.getHandler(A.cell));if(null!=T&&null!=-T.bends&&0<T.bends.length){T.redrawHandles();var P=null!=G?G:T.getHandleForEvent(H),U=this.view.getEdgeStyle(A),X=U==mxEdgeStyle.EntityRelation;I=A.absolutePoints;O||(P=G);P!=mxEvent.LABEL_HANDLE&&null!=I&&(P=G,null==P&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?P=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?P=T.bends.length-1:null!=I&&(null==U&&null==P||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&-(null!=U&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?P=2:(P=mxUtils.findNearestSegment(A,B.x,B.y),P=null==U?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Z=P==mxEvent.LABEL_HANDLE||0==P||P==T.bends.length-1;if(!X&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)T.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?-this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,T),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||T.destroy());O=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);T=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==-Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?T="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(A),U==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&-U!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(T=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,-A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))T="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))T="col-resize";for(k=A;null==T&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),-P=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*P+(0==I.x?k.width*P:0),k.y,1,k.height))?T="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*P+(0==I.y?k.height:0),k.width,1))&&(T="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=T&&A.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=+return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,P=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);+if(null==I||null==I.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),O=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=O+2;U.grow(O);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()++I,Z.getGraphY()-I))){var T=this.model.getParent(A.cell);I=this.model.getParent(T);if(!this.isCellSelected(I)){O*=k;var X=2*O;if(this.model.getChildAt(I,0)!=T&&mxUtils.intersects(U,new mxRectangle(A.x,A.y-O,A.width,X))||this.model.getChildAt(T,0)!=A.cell&&mxUtils.intersects(U,new mxRectangle(A.x-O,A.y,X,A.height))||mxUtils.intersects(U,new mxRectangle(A.x,A.y+A.height-O,A.width,X))||mxUtils.intersects(U,new mxRectangle(A.x+A.width-O,A.y,X,A.height)))T=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,+Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(O=I.getHandleForEvent(Z),null!=O&&(I.start(Z.getGraphX(),Z.getGraphY(),O),I.blockDelayedSelection=!T,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(U,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||+0<I.height)&&mxUtils.intersects(U,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(O=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),O),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&+this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),P=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));+this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(A.cell));if(null!=U&&null!=+U.bends&&0<U.bends.length){U.redrawHandles();var O=null!=G?G:U.getHandleForEvent(H),T=this.view.getEdgeStyle(A),X=T==mxEdgeStyle.EntityRelation;I=A.absolutePoints;P||(O=G);O!=mxEvent.LABEL_HANDLE&&null!=I&&(O=G,null==O&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?O=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?O=U.bends.length-1:null!=I&&(null==T&&null==O||T==mxEdgeStyle.SegmentConnector||T==mxEdgeStyle.OrthConnector)&&+(null!=T&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?O=2:(O=mxUtils.findNearestSegment(A,B.x,B.y),O=null==T?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE));Z=O==mxEvent.LABEL_HANDLE||0==O||O==U.bends.length-1;if(!X&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)U.start(k.getGraphX(),k.getGraphX(),O),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?+this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,U),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||U.destroy());P=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);U=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==+Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?U="pointer":(T=this.view.getEdgeStyle(A),T==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(U="crosshair",T!=mxEdgeStyle.SegmentConnector&&+T!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(U=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,+A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))U="col-resize";for(k=A;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),+O=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*O+(0==I.x?k.width*O:0),k.y,1,k.height))?U="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*O+(0==I.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&A.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=function(Z){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Z.lastLabelValue!=k&&(Z.lastLabelValue=k,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(k),c.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(c,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=c.innerHTML)),k=Z.lastSanitizedLabelValue));return k};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(Z,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;-this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,T=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var P=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)k.push(new mxRectangle(((U.x+X)*T+I.x)*P,(U.y*A+I.y)*P,T*P,A*P));for(X=1;X<U.height;X++)k.push(new mxRectangle((U.x*T+I.x)*P,((U.y+X)*A+I.y)*P,T*P,A*P));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],T=0;T<k.length;T++){var P=-this.graph.isTableCell(Z)&&this.graph.isTableCell(k[T])&&this.graph.isCellSelected(k[T])?this.graph.model.getParent(k[T]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[T])&&this.graph.isCellSelected(k[T])?k[T]:this.graph.getCompositeParent(k[T]);null==P||A.get(P)||(A.put(P,!0),I.push(P))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var T=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?T=!0:Z=this.graph.model.getParent(Z));T||this.graph.isTableRow(Z)&&-this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,T,P){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[U]);return U};var z=new mxRubberband(this);this.getRubberband=function(){return z};+this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,U=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var O=this.graph.view.scale,T=this.graph.getPageLayout(),X=0;X<T.width;X++)k.push(new mxRectangle(((T.x+X)*U+I.x)*O,(T.y*A+I.y)*O,U*O,A*O));for(X=1;X<T.height;X++)k.push(new mxRectangle((T.x*U+I.x)*O,((T.y+X)*A+I.y)*O,U*O,A*O));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],U=0;U<k.length;U++){var O=+this.graph.isTableCell(Z)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==O||A.get(O)||(A.put(O,!0),I.push(O))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&+this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,U,O){var T=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[T]);return T};var z=new mxRubberband(this);this.getRubberband=function(){return z};var C=(new Date).getTime(),F=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;N.apply(this,arguments);Z!=this.currentState?(C=(new Date).getTime(),F=0):F=(new Date).getTime()-C};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<F||(null==this.currentState||-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var J=this.isToggleEvent;this.isToggleEvent=function(Z){return J.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var ea=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return ea.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};-var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=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=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ca=this.click;this.click=function(Z){var k=null==Z.state&&+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var J=this.isToggleEvent;this.isToggleEvent=function(Z){return J.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var da=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return da.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};+var ea=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(ea=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=ea)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ca=this.click;this.click=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ca.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var I=this.getClickableLinkForCell(A);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,A):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var ba=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return ba.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=-function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var ma=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=ma.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):-Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),la=null==Z||this.isSelectionEmpty()||-this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);la=null;k.consume()}}));this.connectionHandler.selectCells=+function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var la=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=la.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):+Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var ma=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),ma=null==Z||this.isSelectionEmpty()||+this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=ma?this.addSelectionCells(ma):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);ma=null;k.consume()}}));this.connectionHandler.selectCells=function(Z,k){this.graph.setSelectionCell(k||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,k){var A=Z.view.graph;return k&&(A.isCellSelected(Z.cell)||A.isTableRow(Z.cell)&&A.selectionCellsHandler.isHandled(A.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}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.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/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">';@@ -2314,9 +2314,9 @@ Graph.createSvgImage=function(b,e,g,m,u){g=unescape(encodeURIComponent(Graph.svgGraph.getSvgFromDataUri=function(b){return null!=b&&"data:image/svg"==b.substring(0,14)?Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+decodeURIComponent(escape(atob(b.substring(b.indexOf(",")+1)))):null};Graph.createSvgNode=function(b,e,g,m,u){var p=mxUtils.createXmlDocument(),B=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=u&&B.setAttribute("style","background: "+u.light+"; background-color: "+u.cssText+";");null==p.createElementNS?(B.setAttribute("xmlns",mxConstants.NS_SVG),B.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):B.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);B.setAttribute("version","1.1");B.setAttribute("width",g+"px");B.setAttribute("height",m+"px");B.setAttribute("viewBox",b+" "+e+" "+g+" "+m);p.appendChild(B);return B};-Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(O){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);H.onerror=+Graph.htmlToPng=function(b,e,g,m,u,p){u=null!=u?u:"";p=null!=p?p:Editor.htmlRasterScale;var B=document.createElement("canvas");B.width=e*p;B.height=g*p;var H=document.createElement("img");H.onload=mxUtils.bind(this,function(){try{var G=B.getContext("2d");G.scale(p,p);G.drawImage(H,0,0);m(B.toDataURL())}catch(P){m(null)}});var S=mxUtils.createXmlDocument();S=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"svg"):S.createElement("svg");b=(new mxSvgCanvas2D(S)).convertHtml(b);H.onerror=function(G){m(null)};H.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+g+'">'+(""!=u?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+u+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+b+"</div></foreignObject></svg>")};-Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){B=null;for(var G=0;G<p[S].style.length;G++){var O=p[S].style.item(G),R=p[S].style.getPropertyValue(O);H=u(p[S],O,R)||H}"FONT"==p[S].nodeName&&+Graph.addLightDarkColors=function(b,e,g,m){function u(c,f,l){return null!=m?m(c,f,l):mxUtils.isValidColor(l)?(null==B&&null!=e&&(B={}),null!=B&&(B[f]=c.style.getPropertyValue(f)),l=mxUtils.getLightDarkColor(l,null,null,g),c.style.setProperty(f,l.cssText),!0):!1}for(var p=b.getElementsByTagName("*"),B=null,H=!1,S=0;S<p.length;S++)if(p[S]!=b&&null!=p[S].style){B=null;for(var G=0;G<p[S].style.length;G++){var P=p[S].style.item(G),R=p[S].style.getPropertyValue(P);H=u(p[S],P,R)||H}"FONT"==p[S].nodeName&&""==p[S].style.getPropertyValue("color")&&(R=p[S].getAttribute("color"),H=u(p[S],"color",R)||H);null!=e&&null!=B&&p[S].setAttribute(e,JSON.stringify(B))}return H};Graph.removeLightDarkColors=function(b,e){b=b.getElementsByTagName("*");for(var g=!1,m=0;m<b.length;m++)try{var u=b[m].getAttribute(e);if(null!=u){b[m].removeAttribute(e);var p=JSON.parse(u),B;for(B in p){var H=p[B];""==H?(b[m].style[B]=null,""==b[m].getAttribute("style")&&b[m].removeAttribute("style")):b[m].style[B]=H;g=!0}}}catch(S){}return g};Graph.getGivenColor=function(b,e){var g=null;if(b.nodeType==mxConstants.NODETYPE_ELEMENT){try{var m=b.getAttribute(Graph.backupStyleAttribute);if(null!=m){var u=JSON.parse(m);null!=u&&null!=u[e]&&("color"==e&&"FONT"==b.nodeName&&""==u[e]&&null!=b.getAttribute("color")?g=b.getAttribute("color"):""!=u[e]&&(g=u[e]))}}catch(p){}null==g&&""!=b.style[e]&&(g=b.style[e])}return g};Graph.setTextColor=function(b,e,g){for(var m=g?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,u=g?"color":"background-color",p=b.getElementsByTagName("*"),B=[],H=0;H<p.length;H++)B.push({node:p[H],value:p[H].style[u]});document.execCommand(g?"forecolor":"backcolor",!1,m);b=b.getElementsByTagName("*");for(H=0;H<b.length;H++){if(H<B.length&&B[H].node==b[H]&&B[H].value!=b[H].style[u]&&""==b[H].style[u])try{if(p=b[H].getAttribute(Graph.backupStyleAttribute),null!=p){var S=JSON.parse(p);S[u]=@@ -2327,24 +2327,24 @@ Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var g=b.bGraph.arrayBufferIndexOfString=function(b,e,g){var m=e.charCodeAt(0),u=1,p=-1;for(g=g||0;g<b.byteLength;g++)if(b[g]==m){p=g;break}for(g=p+1;-1<p&&g<b.byteLength&&g<p+e.length-1;g++){if(b[g]!=e.charCodeAt(u))return Graph.arrayBufferIndexOfString(b,e,p+1);u++}return u==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return g?e:Graph.zapGremlins(e)};Graph.fadeNodes=function(b,e,g,m,u){u=null!=u?u:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+u+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},u)},0)};-Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(O,R){if(O.getModel().isVertex(R)){var c=O.container.scrollWidth/2,f=O.container.scrollHeight/2;O.rootCell=R.referenceCell||R;O.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&-!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=O.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,O.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()+-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<R.startIndex){var ea=O.createVertex(null,null,mxResources.get("previousPage")+-" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ea.referenceCell=l;ea.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,ea)}if(z.length>(R.startIndex||0)+pageSize){var da=O.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");-da.referenceCell=l;da.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,da)}for(var ca in O.getModel().cells){var W=O.getModel().getCell(ca);W!=O.rootCell&&!O.getModel().isAncestor(O.rootCell,W)&&O.getModel().isVertex(W)&&O.removeCells([W])}O.addCells(K);var ba=O.getModel().getGeometry(O.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,O.getModel().setGeometry(O.rootCell,ba));R=[];for(ca in O.getModel().cells)W=O.getModel().getCell(ca),W!=O.rootCell&&O.getModel().isVertex(W)&&-O.getModel().getParent(W)==O.getDefaultParent()&&(R.push(W),ba=O.getModel().getGeometry(W),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,ma=2*Math.PI/ha,Y=Math.max(minSize,Math.min(O.container.scrollWidth/2.5-80,O.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=O.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*ma),ba.y+=Y*Math.cos(c*ma),O.getModel().setGeometry(R[c],ba))}finally{O.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=+Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(P,R){if(P.getModel().isVertex(R)){var c=P.container.scrollWidth/2,f=P.container.scrollHeight/2;P.rootCell=R.referenceCell||R;P.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&+!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=P.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,P.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()++";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<R.startIndex){var da=P.createVertex(null,null,mxResources.get("previousPage")++" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");da.referenceCell=l;da.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,da)}if(z.length>(R.startIndex||0)+pageSize){var ea=P.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");+ea.referenceCell=l;ea.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,ea)}for(var ca in P.getModel().cells){var W=P.getModel().getCell(ca);W!=P.rootCell&&!P.getModel().isAncestor(P.rootCell,W)&&P.getModel().isVertex(W)&&P.removeCells([W])}P.addCells(K);var ba=P.getModel().getGeometry(P.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,P.getModel().setGeometry(P.rootCell,ba));R=[];for(ca in P.getModel().cells)W=P.getModel().getCell(ca),W!=P.rootCell&&P.getModel().isVertex(W)&&+P.getModel().getParent(W)==P.getDefaultParent()&&(R.push(W),ba=P.getModel().getGeometry(W),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,la=2*Math.PI/ha,Y=Math.max(minSize,Math.min(P.container.scrollWidth/2.5-80,P.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=P.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*la),ba.y+=Y*Math.cos(c*la),P.getModel().setGeometry(R[c],ba))}finally{P.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position="absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=-"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(O){27==O.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(O){if(mxClient.isBrowserSupported()){var R=new Graph(O);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=-function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);O.parentNode.removeChild(O);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];+"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(P){27==P.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(P){if(mxClient.isBrowserSupported()){var R=new Graph(P);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=+function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);P.parentNode.removeChild(P);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(J){N.spacing=Math.min(60,Math.max(30,60-5*J.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();z=!1}))});p(R,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};-Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var g=document.createElement("div");g.style.position="absolute";g.style.visibility="hidden";var m=decodeURIComponent(escape(atob(b.substring(26)))),u=m.indexOf("<svg");if(0<=u){g.innerHTML=Graph.sanitizeHtml(m.substring(u));var p=g.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(g);try{m=e=-1;var B=p[0].getAttribute("width"),H=p[0].getAttribute("height");B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;H=null!=H&&"%"!=H.charAt(H.length-1)?parseFloat(H):NaN;var S=p[0].getAttribute("viewBox");u=null;if(null!=S&&!isNaN(B)&&!isNaN(H)){var G=S.split(" ");4<=S.length&&(e=parseFloat(G[2])/B,m=parseFloat(G[3])/H,u=new mxRectangle(parseFloat(G[0]),parseFloat(G[1]),parseFloat(G[2]),parseFloat(G[3])))}var O=p[0].getBBox();0<O.width&&0<O.height&&(null==u||O.width*O.height<u.width*u.height*-.7)&&(g.getElementsByTagName("svg")[0].setAttribute("viewBox",O.x+" "+O.y+" "+O.width+" "+O.height),g.getElementsByTagName("svg")[0].setAttribute("width",O.width/e),g.getElementsByTagName("svg")[0].setAttribute("height",O.height/m))}catch(R){}finally{document.body.removeChild(g)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(R){}return b};+Graph.clipSvgDataUri=function(b){if(null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var g=decodeURIComponent(escape(atob(b.substring(26)))),m=g.indexOf("<svg");if(0<=m){e.innerHTML=Graph.sanitizeHtml(g.substring(m));var u=e.getElementsByTagName("svg");if(0<u.length){document.body.appendChild(e);try{m=g=1;var p=u[0].getAttribute("width"),B=u[0].getAttribute("height");p=null!=p&&"%"!=p.charAt(p.length-+1)?parseFloat(p):NaN;B=null!=B&&"%"!=B.charAt(B.length-1)?parseFloat(B):NaN;var H=u[0].getAttribute("viewBox");if(null!=H&&!isNaN(p)&&!isNaN(B)){var S=H.split(" ");4<=H.length&&(g=parseFloat(S[2])/p,m=parseFloat(S[3])/B,new mxRectangle(parseFloat(S[0]),parseFloat(S[1]),parseFloat(S[2]),parseFloat(S[3])))}var G=u[0].getBBox();if(0<G.width&&0<G.height){p=0;var P=u[0].querySelectorAll("[stroke-width]");for(B=0;B<P.length;B++)p=Math.max(p,parseFloat(P[B].getAttribute("stroke-width")));G=new mxRectangle(G.x,+G.y,G.width,G.height);G.grow(p/2);e.getElementsByTagName("svg")[0].setAttribute("viewBox",G.x+" "+G.y+" "+G.width+" "+G.height);e.getElementsByTagName("svg")[0].setAttribute("width",G.width/g);e.getElementsByTagName("svg")[0].setAttribute("height",G.height/m)}}catch(R){}finally{document.body.removeChild(e)}b=Editor.createSvgDataUri(mxUtils.getXml(u[0]))}}}catch(R){}return b};Graph.createRemoveIcon=function(b,e){var g=document.createElement("img");g.setAttribute("src",Dialog.prototype.clearImage);g.setAttribute("title",b);g.setAttribute("width","13");g.setAttribute("height","10");g.style.marginLeft="4px";g.style.marginBottom="-1px";g.style.cursor="pointer";mxEvent.addListener(g,"click",e);return g};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.rewritePageLinks=function(b,e){function g(u,p){var B=u.getAttribute(p);if(null!=B){Graph.isPageLink(B)&&(B="#"+B.substring(B.indexOf(":")+1));var H=p;e&&"xlink:href"==p&&(u.removeAttribute(p),H="href");u.setAttribute(H,B)}}b=b.getElementsByTagName("a");if(null!=b)for(var m=0;m<b.length;m++)g(b[m],"href"),g(b[m],"xlink:href")};Graph.isLink=function(b){return null!=b&&b.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;@@ -2352,33 +2352,33 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBaGraph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(O){p=!0;B=new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O))}),S=mxUtils.bind(this,function(O){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(O))<u&&Math.abs(B.y-mxEvent.getClientY(O))<u}),G=mxUtils.bind(this,function(O){if(p)for(var R=mxEvent.getSource(O);null!=-R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,O);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,H,S,G);mxEvent.addListener(m.node,"click",function(O){mxEvent.consume(O)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(g,m){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var u=g.view.graph.tolerance,p=!0,B=null,H=mxUtils.bind(this,function(P){p=!0;B=new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P))}),S=mxUtils.bind(this,function(P){p=p&&null!=B&&Math.abs(B.x-mxEvent.getClientX(P))<u&&Math.abs(B.y-mxEvent.getClientY(P))<u}),G=mxUtils.bind(this,function(P){if(p)for(var R=mxEvent.getSource(P);null!=+R&&R!=m.node;){if("a"==R.nodeName.toLowerCase()){g.view.graph.labelLinkClicked(g,R,P);break}R=R.parentNode}});mxEvent.addGestureListeners(m.node,H,S,G);mxEvent.addListener(m.node,"click",function(P){mxEvent.consume(P)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(g){var m=mxEvent.getSource(g);"A"==m.nodeName&&(m=m.getAttribute("href"),null!=m&&this.graph.isCustomLink(m)&&(mxEvent.isTouchEvent(g)||!mxEvent.isPopupTrigger(g))&&this.graph.customLinkClicked(m)&&mxEvent.consume(g))}))}}this.initLayoutManager()};(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(B){return!this.isSpecialColor(B.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(B.style,"lineShape",null)&&(this.model.isVertex(B.cell)||"arrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(B){return this.isFillState(B)&&"wire"!=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(B){return!0};Graph.prototype.getTextColor=function(B,H){for(var S=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,H?"color":"background-color");null==S&&null!=B&&B!=this.cellEditor.textarea.parentNode;)S=B==this.cellEditor.textarea&&H?"default":Graph.getGivenColor(B,"color"),B=B.parentNode;if("rgba(0, 0, 0, 0)"==S||"transparent"==S)S=mxConstants.NONE;return S};Graph.prototype.isSpecialColor=function(B){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],B)};Graph.prototype.isGlassState=function(B){B=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return"label"==B||"rectangle"==B||"internalStorage"==B||"ext"==B||"umlLifeline"==B||"swimlane"==B||"process"==B};Graph.prototype.isRoundedState=function(B){return null!=B.shape?B.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(B){var H=mxUtils.getValue(B.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(B.style,mxConstants.STYLE_CURVED,!1)&&("connector"==H||"filledEdge"==H||"wire"==H)};Graph.prototype.isAutoSizeState=function(B){return"1"==mxUtils.getValue(B.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(B){return null!=mxUtils.getValue(B.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(B){return!0};Graph.prototype.getVerticesAndEdges=function(B,H){B=null!=B?B:!0;H=null!=H?H:!0;var S=this.model;return S.filterDescendants(function(G){return B&&S.isVertex(G)||H&&S.isEdge(G)},S.getRoot())};Graph.prototype.applyNewEdgeStyle=-function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),O;for(O in G)this.setCellStyles(O,G[O],H),"edgeStyle"==O&&"elbowEdgeStyle"==G[O]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},S=0;S<B.length;S++){var G=this.view.getState(B[S]);null!=G&&this.mergeStyle(G.style,H,0==S)}return H};-Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var G={},O;for(O in B){var R=B[O];null!=R&&(G[O]=!0,null==H[O]&&S?H[O]=R:H[O]!=R&&delete H[O])}for(O in H)G[O]||delete H[O]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,-0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(O){return 0>mxUtils.indexOf(S,O)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=-function(B,H,S,G,O,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete O[H[t]]:O[H[t]]=S[t]};Graph.prototype.includeDescendants=-function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,O){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;O=null!=O?O:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=-null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var ea=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(ea,K))for(var da=0;da<ea.length;da++){var ca=mxUtils.indexOf(t,ea[da]);0<=ca&&t.splice(ca,1)}}}}var W=this.model.isEdge(c);l=W?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||O)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=+function(B,H,S){B=this.getCellStyle(B).newEdgeStyle;if(null!=B){this.model.beginUpdate();try{var G=JSON.parse(B),P;for(P in G)this.setCellStyles(P,G[P],H),"edgeStyle"==P&&"elbowEdgeStyle"==G[P]&&null!=S&&this.setCellStyles("elbow",S==mxConstants.DIRECTION_SOUTH||S==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",H)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(B){for(var H={},S=0;S<B.length;S++){var G=this.view.getState(B[S]);null!=G&&this.mergeStyle(G.style,H,0==S)}return H};+Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var G={},P;for(P in B){var R=B[P];null!=R&&(G[P]=!0,null==H[P]&&S?H[P]=R:H[P]!=R&&delete H[P])}for(P in H)G[P]||delete H[P]}};Graph.prototype.getStartEditingCell=function(B,H){H=this.getCellStyle(B);H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,0));this.isTable(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B)&&(B=this.model.getChildAt(B,0),H=this.getCellStyle(B),H=parseInt(mxUtils.getValue(H,mxConstants.STYLE_STARTSIZE,+0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(P){return 0>mxUtils.indexOf(S,P)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=+function(B,H,S,G,P,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete P[H[t]]:P[H[t]]=S[t]};Graph.prototype.includeDescendants=+function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,P){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;P=null!=P?P:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=+null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var da=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(da,K))for(var ea=0;ea<da.length;ea++){var ca=mxUtils.indexOf(t,da[ea]);0<=ca&&t.splice(ca,1)}}}}var W=this.model.isEdge(c);l=W?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||P)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=mxUtils.setStyle(f,K,ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),W&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=-this.getCellStyle(H[S],!1),O=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,O,[H[S]])}}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,H,S,G,O,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,O,R){G=null!=G?G:!0;O=null!=O?O:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));-if(null!=S)for(var c=this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,O,R);if(null!=l)return l;if(this.isCellVisible(f)&&(O&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}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 H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=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.getCompositeParents=function(B){for(var H=new mxDictionary,S=[],G=0;G<B.length;G++){var O=this.getCompositeParent(B[G]);-this.isTableCell(O)&&(O=this.graph.model.getParent(O));this.isTableRow(O)&&(O=this.graph.model.getParent(O));null==O||H.get(O)||(H.put(O,!0),S.push(O))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);+this.getCellStyle(H[S],!1),P=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,P,[H[S]])}}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,H,S,G,P,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,P,R){G=null!=G?G:!0;P=null!=P?P:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));+if(null!=S)for(var c=this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,P,R);if(null!=l)return l;if(this.isCellVisible(f)&&(P&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}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 H=this.getCellGeometry(B);null!=H&&H.relative;)B=this.getModel().getParent(B),H=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.getCompositeParents=function(B){for(var H=new mxDictionary,S=[],G=0;G<B.length;G++){var P=this.getCompositeParent(B[G]);+this.isTableCell(P)&&(P=this.graph.model.getParent(P));this.isTableRow(P)&&(P=this.graph.model.getParent(P));null==P||H.get(P)||(H.put(P,!0),S.push(P))}return S};Graph.prototype.getReferenceTerminal=function(B){if(null!=B){var H=this.getCellGeometry(B);null!=H&&H.relative&&(B=this.model.getParent(B))}null!=B&&this.model.isEdge(B)&&(B=this.model.getParent(B));null!=B&&(B=this.getCompositeParent(B));return B};Graph.prototype.getCompositeParent=function(B){for(;this.isPart(B);){var H=this.model.getParent(B);if(!this.model.isVertex(H))break;B=H}return B};Graph.prototype.filterSelectionCells=function(B){var H=this.getSelectionCells();if(null!=B){for(var S=[],G=0;G<H.length;G++)B(H[G])||S.push(H[G]);H=S}return H};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(B){if(this.useCssTransforms){var H=this.currentScale,S=this.currentTranslate;B=new mxRectangle((B.x+2*S.x)*H-S.x,(B.y+2*S.y)*H-S.y,B.width*H,B.height*H)}b.apply(this,arguments)};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 H=this.graph.currentTranslate,S=this.graph.currentScale;B=new mxRectangle((B.x+H.x)*S,(B.y+H.y)*S,B.width*S,B.height*S)}return B};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(B){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=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var g=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(B){B=g.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};var m=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(B){B=m.apply(this,arguments);for(var H=[],S=0;S<B.length;S++)this.isTable(B[S])||this.isTableRow(B[S])||this.isTableCell(B[S])||H.push(B[S]);return H};Graph.prototype.updateCssTransform=function(){var B=this.view.getDrawPane();if(null!=B)if(B=B.parentNode,this.useCssTransforms){var H=B.getAttribute("transform");B.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;B.setAttribute("transform","scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");H!=B.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",B.getAttribute("transform"))}else B.removeAttribute("transformOrigin"),B.removeAttribute("transform")};-var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.useCssTransforms,O=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=-new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=O,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};+var u=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var B=this.graph.useCssTransforms,H=this.scale,S=this.translate;B&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);u.apply(this,arguments);B&&(this.scale=H,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.useCssTransforms,P=this.view.scale,R=this.view.translate;G&&(this.view.scale=1,this.view.translate=+new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);G&&(this.view.scale=P,this.view.translate=R,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,g){var m=e.getAttribute("href");m!=Graph.sanitizeLink(m)&&Graph.sanitizeNode(e);if(null!=m&&!this.isCustomLink(m)&&(mxEvent.isLeftMouseButton(g)&&!mxEvent.isPopupTrigger(g)||mxEvent.isTouchEvent(g))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(m)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(m),b);mxEvent.consume(g)}};Graph.prototype.openLink=function(b,e,g){var m=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var u=b.split("#")[1];window.location.hash=="#"+u&&(window.location.hash="");window.location.hash=u}else m=window.open(b,null!=e?e:"_blank",g?null:"noopener,noreferrer"),null==m||g||(m.opener=null)}catch(p){}return m};Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b,e){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};@@ -2393,7 +2393,7 @@ Graph.prototype.createLayouts=function(b){for(var e=[],g=0;g<b.length;g++)if(0<=Graph.prototype.getDataForCells=function(b,e){for(var g=[],m=0;m<b.length;m++){var u={};u.id=b[m].id;var p=null!=b[m].value?b[m].value.attributes:null;this.isReplacePlaceholders(b[m])&&e&&(u.value=this.getLabel(b[m]));if(null!=p)for(var B=0;B<p.length;B++)u[p[B].nodeName]=p[B].nodeValue;else u.label=this.convertValueToString(b[m]);g.push(u)}return g};Graph.prototype.getNodesForCells=function(b){for(var e=[],g=0;g<b.length;g++){var m=this.view.getState(b[g]);if(null!=m){for(var u=this.cellRenderer.getShapesForState(m),p=0;p<u.length;p++)null!=u[p]&&null!=u[p].node&&e.push(u[p].node);null!=m.control&&null!=m.control.node&&e.push(m.control.node)}}return e};Graph.prototype.createWipeAnimations=function(b,e){for(var g=[],m=0;m<b.length;m++){var u=this.view.getState(b[m]);null!=u&&null!=u.shape&&(this.model.isEdge(u.cell)&&null!=u.absolutePoints&&1<u.absolutePoints.length?g.push(this.createEdgeWipeAnimation(u,e)):this.model.isVertex(u.cell)&&null!=u.shape.bounds&&g.push(this.createVertexWipeAnimation(u,e)))}return g};-Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,O=1;O<p;O++)if(G<=m[O-1]){S.push(new mxPoint(g[O-1].x+(g[O].x-g[O-1].x)*G/m[O-1],g[O-1].y+(g[O].y-g[O-1].y)*G/m[O-1]));break}else G-=m[O-1],S.push(g[O]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=+Graph.prototype.createEdgeWipeAnimation=function(b,e){var g=b.absolutePoints.slice(),m=b.segments,u=b.length,p=g.length;return{execute:mxUtils.bind(this,function(B,H){if(null!=b.shape){var S=[g[0]];H=B/H;e||(H=1-H);for(var G=u*H,P=1;P<p;P++)if(G<=m[P-1]){S.push(new mxPoint(g[P-1].x+(g[P].x-g[P-1].x)*G/m[P-1],g[P-1].y+(g[P].y-g[P-1].y)*G/m[P-1]));break}else G-=m[P-1],S.push(g[P]);b.shape.points=S;b.shape.redraw();0==B&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=H)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.createVertexWipeAnimation=function(b,e){var g=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(m,u){null!=b.shape&&(u=m/u,e||(u=1-u),b.shape.bounds=new mxRectangle(g.x,g.y,g.width*u,g.height),b.shape.redraw(),0==m&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=u))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=g,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,g,m){g=null!=g?g:30;m=null!=m?m:30;var u=null,p=0,B=mxUtils.bind(this,function(){if(p==g||this.stoppingCustomActions){window.clearInterval(u);for(var H=0;H<b.length;H++)b[H].stop();null!=e&&e()}else for(H=0;H<b.length;H++)b[H].execute(p,g);p++});u=window.setInterval(B,m);B()};@@ -2408,11 +2408,11 @@ Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);retGraph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};Graph.prototype.formatDate=function(b,e,g){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 m=this.dateFormatCache,u=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,B=function(C,F){C=String(C);for(F=F||2;C.length<F;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",S=b[H+"Date"](),G=b[H+"Day"](),O=b[H+"Month"](),R=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:S,dd:B(S),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:O+1,mm:B(O+1),mmm:m.i18n.monthNames[O],mmmm:m.i18n.monthNames[O++/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(m.masks[e]||e||m.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),g=!0);var H=g?"getUTC":"get",S=b[H+"Date"](),G=b[H+"Day"](),P=b[H+"Month"](),R=b[H+"FullYear"](),c=b[H+"Hours"](),f=b[H+"Minutes"](),l=b[H+"Seconds"]();H=b[H+"Milliseconds"]();var t=g?0:b.getTimezoneOffset(),z={d:S,dd:B(S),ddd:m.i18n.dayNames[G],dddd:m.i18n.dayNames[G+7],m:P+1,mm:B(P+1),mmm:m.i18n.monthNames[P],mmmm:m.i18n.monthNames[P+12],yy:String(R).slice(2),yyyy:R,h:c%12||12,hh:B(c%12||12),H:c,HH:B(c),M:f,MM:B(f),s:l,ss:B(l),l:B(H,3),L:B(99<H?Math.round(H/10):H),t:12>c?"a":"p",tt:12>c?"am":"pm",T:12>c?"A":"P",TT:12>c?"AM":"PM",Z:g?"UTC":(String(b).match(u)||[""]).pop().replace(p,""),o:(0<t?"-":"+")+B(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in z?z[C]:C.slice(1,C.length-1)})};Graph.prototype.getLayerForCell=function(b){for(;null!=b&&!this.model.isLayer(b);)b=this.model.getParent(b);return b};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){e=this.getLayerForCell(b[0]);for(var g=1;g<b.length;g++)if(!this.model.isAncestor(e,b[g])){e=null;break}}return e};-Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(O.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(O.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=-"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[S]));var O=document.createElement("img");O.setAttribute("draggable","false");O.setAttribute("align","absmiddle");O.setAttribute("border","0");O.style.position="relative";O.style.width="16px";O.style.padding="0px 6px 0 4px";e&&(O.style.filter="invert(100%)",O.style.top="-2px");G.appendChild(O);mxUtils.write(G,S);g.appendChild(G);+Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var m=this.getModel(),u=m.getChildCount(m.root),p=0;p<u;p++)mxUtils.bind(this,function(B){function H(){m.isVisible(B)?(P.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(G,75)):(P.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(G,25))}var S=this.convertValueToString(B)||mxResources.get("background")||"Background",G=document.createElement("div");G.style.overflow=+"hidden";G.style.textOverflow="ellipsis";G.style.padding="2px";G.style.whiteSpace="nowrap";G.style.cursor="pointer";G.setAttribute("title",mxResources.get(m.isVisible(B)?"hideIt":"show",[S]));var P=document.createElement("img");P.setAttribute("draggable","false");P.setAttribute("align","absmiddle");P.setAttribute("border","0");P.style.position="relative";P.style.width="16px";P.style.padding="0px 6px 0 4px";e&&(P.style.filter="invert(100%)",P.style.top="-2px");G.appendChild(P);mxUtils.write(G,S);g.appendChild(G);mxEvent.addListener(G,"click",function(){m.setVisible(B,!m.isVisible(B));H();null!=b&&b(B)});H()})(m.getChildAt(m.root,p));return g};Graph.prototype.replacePlaceholders=function(b,e,g,m){m=[];if(null!=e){for(var u=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var B=null;if(match.index>u&&"%"==e.charAt(match.index-1))B=p.substring(1);else{var H=p.substring(1,p.length-1),S={mm:mxConstants.MILLIMETERS,"in":mxConstants.INCHES,m:mxConstants.METERS,current:this.view.unit};if("id"==H)B=b.id;else if("width"===H.substring(0,5)&&this.model.isVertex(b)){var G=this.getCellGeometry(b);null!=G&&(B=G.width,5<H.length&&(B=Editor.toUnit(B,S[H.substring(6)])))}else if("height"==H.substring(0,6)&&this.model.isVertex(b))G=this.getCellGeometry(b),null!=G&&(B=G.height,6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])));else if("length"==H.substring(0,6)){for(G=b;null!=G&&!this.model.isEdge(G);)G=this.model.getParent(G);G=this.view.getState(G);null!=G&&(B=Math.round(G.length/this.view.scale),6<H.length&&(B=Editor.toUnit(B,S[H.substring(7)])))}else if(0>H.indexOf("{"))for(S=b;null==B&&null!=@@ -2426,13 +2426,13 @@ Graph.prototype.updateShapes=function(b,e,g){this.model.beginUpdate();try{var m=this.model.isEdge(b)&&this.model.isEdge(e[p]))if(g){var B=this.model.getStyle(e[p]);if(null!=B){var H=B.split(";");0<H.length&&0>H[0].indexOf("=")&&(H=H.slice(1));this.model.setStyle(e[p],H.join(";"))}this.setCellStyles(mxConstants.STYLE_PERIMETER,null,[e[p]]);this.setCellStyles("points",null,[e[p]]);this.pasteStyle(u,[e[p]],null,!0)}else u=this.copyStyle(e[p]),this.model.setStyle(e[p],m),this.pasteStyle(u,[e[p]]);"1"==mxUtils.getValue(this.getCellStyle(e[p],!1),"composite","0")&&this.removeChildCells(e[p])}}finally{this.model.endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,g){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=g&&(mxEvent.isTouchEvent(e)?g.update(g.getState(this.view.getState(b[1]))):g.reset())):this.setSelectionCells(b)};Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&null!=g.geometry&&g.geometry.relative&&g.parent!=b.parent;)g=this.model.getParent(g);null!=g&&null!=g.parent&&g.parent==b.parent&&(e=g.parent.getIndex(g),this.model.add(g.parent,b,e))};-Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),O=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(O.x+=G.geometry.width/2,O.y-=g):e==-mxConstants.DIRECTION_SOUTH?(O.x+=G.geometry.width/2,O.y+=G.geometry.height+g):(O.x=e==mxConstants.DIRECTION_WEST?O.x-g:O.x+(G.geometry.width+g),O.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(O.x+=b.parent.geometry.x,O.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+O.x*g,c+O.y*g)).grow(40*g);p=null!=p?+Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),P=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(P.x+=G.geometry.width/2,P.y-=g):e==+mxConstants.DIRECTION_SOUTH?(P.x+=G.geometry.width/2,P.y+=G.geometry.height+g):(P.x=e==mxConstants.DIRECTION_WEST?P.x-g:P.x+(G.geometry.width+g),P.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(P.x+=b.parent.geometry.x,P.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+P.x*g,c+P.y*g)).grow(40*g);p=null!=p?this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==R||null==z||mxUtils.intersects(R,z)||(l=p[t])}}var C=-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?O.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=b.geometry.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-b.geometry.width/2:O.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=S?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],-!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var ea=this.getCellGeometry(N);null!=ea&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?O.y-=ea.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=ea.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-ea.width/2:O.x+ea.width/2),ea.x=O.x-ea.width/2,ea.y=O.y-ea.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&-mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=da&&(F.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=da&&da.geometry.setTerminalPoint(O,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",-"cells",[da]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+O.x*g,c+O.y*g,u)};+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?P.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=b.geometry.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-b.geometry.width/2:P.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=S?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],+!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var da=this.getCellGeometry(N);null!=da&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?P.y-=da.height/2:e==mxConstants.DIRECTION_SOUTH?P.y+=da.height/2:P.x=e==mxConstants.DIRECTION_WEST?P.x-da.width/2:P.x+da.width/2),da.x=P.x-da.width/2,da.y=P.y-da.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var ea=mxEvent.isControlDown(m)&&+mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=ea&&(F.push(ea),this.applyNewEdgeStyle(b,[ea],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(ea,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=ea&&ea.geometry.setTerminalPoint(P,!1);null!=ea&&this.fireEvent(new mxEventObject("cellsInserted",+"cells",[ea]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+P.x*g,c+P.y*g,u)};Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,u=0;u<b.length;u++)if(m=b[u],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),null==g&&(g=e.getAttribute("label")||"");return g||""}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,e){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),e||(b=mxUtils.removeJavascriptProtocol(b)),b):null};@@ -2443,8 +2443,8 @@ mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYGraph.prototype.getDefaultColor=function(b,e,g){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(b=mxUtils.getLightDarkColor(g),g="light-dark("+b.dark+", "+b.light+")");return g};Graph.prototype.setAdaptiveColors=function(b){this.adaptiveColors="default"==b?null:b;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(b=this.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};Graph.prototype.updateAlternateBounds=function(b,e,g){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var m=this.layoutManager.getLayout(this.model.getParent(b));null!=m&&m.constructor==mxStackLayout&&(m.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};-Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var S=0,G=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var O=this.useCssTransforms?1:this.view.scale;-S=Math.round(H.width-B.width/O);G=Math.round(H.height-B.height/O)}if(0!=G||0!=S){var R=this.model.getParent(g[p]),c=this.layoutManager.getLayout(R);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,R,S,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(R,c,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};+Graph.prototype.foldCells=function(b,e,g,m,u){e=null!=e?e:!1;null==g&&(g=this.getFoldableCells(this.getSelectionCells(),b));if(null!=g){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<g.length;p++){var B=this.view.getState(g[p]),H=this.getCellGeometry(g[p]);if(null!=B&&null!=H){var S=0,G=0;if(H.alternateBounds)S=H.width-H.alternateBounds.width,G=H.height-H.alternateBounds.height;else{var P=this.useCssTransforms?1:this.view.scale;+S=Math.round(H.width-B.width/P);G=Math.round(H.height-B.height/P)}if(0!=G||0!=S){var R=this.model.getParent(g[p]),c=this.layoutManager.getLayout(R);null==c?null!=u&&this.isMoveCellsEvent(u,B)&&this.moveSiblings(B,R,S,G):null!=u&&mxEvent.isAltDown(u)||c.constructor!=mxStackLayout||c.resizeLast||this.resizeParentStacks(R,c,S,G)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(g)}};Graph.prototype.moveSiblings=function(b,e,g,m){this.model.beginUpdate();try{var u=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<u.length;e++)if(u[e]!=b.cell){var p=this.view.getState(u[e]),B=this.getCellGeometry(u[e]);null!=p&&null!=B&&(B=B.clone(),B.translate(Math.round(g*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(m*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(u[e],B))}}finally{this.model.endUpdate()}};Graph.prototype.resizeParentStacks=function(b,e,g,m){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var u=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==u&&!e.resizeLast;){var p=this.getCellGeometry(b),B=this.view.getState(b);null!=B&&null!=p&&(p=p.clone(),e.horizontal?p.width+=g+Math.min(0,B.width/this.view.scale-p.width):p.height+=m+Math.min(0,B.height/this.view.scale-p.height),this.model.setGeometry(b,p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(this.getLayerForCell(b))&&(null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};@@ -2486,7 +2486,7 @@ HoverIcons.prototype.click=function(b,e,g){var m=g.getEvent(),u=g.getGraphX(),p=HoverIcons.prototype.execute=function(b,e,g){g=g.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,g,this.graph.isCloneEvent(g),this.graph.isCloneEvent(g)),g,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var g=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&-(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,S,G){if(null!=g){var O=new mxRectangle(S,G,H.clientWidth,H.clientHeight);mxUtils.intersects(O,g)&&(H==this.arrowUp?G-=O.y+O.height-g.y:H==this.arrowRight?S+=g.x+g.width-O.x:H==this.arrowDown?G+=g.y+g.height-O.y:H==this.arrowLeft&&(S-=O.x+O.width-g.x))}H.style.left=S+"px";H.style.top=G+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-+(g=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(H,S,G){if(null!=g){var P=new mxRectangle(S,G,H.clientWidth,H.clientHeight);mxUtils.intersects(P,g)&&(H==this.arrowUp?G-=P.y+P.height-g.y:H==this.arrowRight?S+=g.x+g.width-P.x:H==this.arrowDown?G+=g.y+g.height-P.y:H==this.arrowLeft&&(S-=P.x+P.width-g.x))}H.style.left=S+"px";H.style.top=G+"px";mxUtils.setOpacity(H,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());var m=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),u=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==m&&m==u&&u==b&&(b=u=m=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),B=mxUtils.bind(this,function(H,S){var G=this.graph.model.isVertex(H)&&this.graph.getCellGeometry(H);null==H||this.graph.model.isAncestor(H,this.currentState.cell)||this.graph.isSwimlane(H)||!(null==G||null==p||G.height<3*p.height&&G.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});B(e,this.arrowRight);B(m,this.arrowLeft);B(u,this.arrowUp);B(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),@@ -2505,37 +2505,37 @@ Graph.prototype.setTableValues=function(b,e,g){for(var m=this.model.getChildCellGraph.prototype.createCrossFunctionalSwimlane=function(b,e,g,m,u,p,B,H,S){g=null!=g?g:120;m=null!=m?m:120;B=null!=B?B:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";H=null!=H?H:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";u=this.createVertex(null,null,null!=u?u:"",0,0,e*g,b*m,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==u?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(u),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);u.geometry.width+=p;u.geometry.height+=p;B=this.createVertex(null,null,"",0,p,e*g+p,m,B);u.insert(this.createParent(B,this.createVertex(null,null,"",p,0,g,m,H),e,g,0));return 1<b?(B.geometry.y=m+p,this.createParent(u,this.createParent(B,this.createVertex(null,null,"",p,0,g,m,S),e,g,0),b-1,0,m)):u};-Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),S=null,G=[],O=0;O<B.length;O++){var R=this.getCellGeometry(B[O]),c={cell:B[O],rospan:1,colspan:1,row:u,col:O,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;c.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+p.x),R.height+(null!=g&&null!=-g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[O]&&1<g[O].rowspan?(c.rowspan=g[O].rowspan-1,c.colspan=g[O].colspan,c.actual=g[O].actual):null!=S&&1<S.colspan?(c.rowspan=S.rowspan,c.colspan=S.colspan-1,c.actual=S.actual):(S=this.getCurrentCellStyle(B[O],!0),null!=S&&(c.rowspan=parseInt(S.rowspan||1),c.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,+Graph.prototype.visitTableCells=function(b,e){var g=null,m=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var u=0;u<m.length;u++){for(var p=this.getActualStartSize(m[u],!0),B=this.model.getChildCells(m[u],!0),H=this.getCellStyle(m[u],!0),S=null,G=[],P=0;P<B.length;P++){var R=this.getCellGeometry(B[P]),c={cell:B[P],rospan:1,colspan:1,row:u,col:P,geo:R};R=null!=R.alternateBounds?R.alternateBounds:R;c.point=new mxPoint(R.width+(null!=S?S.point.x:b.x+p.x),R.height+(null!=g&&null!=+g[0]?g[0].point.y:b.y+p.y));c.actual=c;null!=g&&null!=g[P]&&1<g[P].rowspan?(c.rowspan=g[P].rowspan-1,c.colspan=g[P].colspan,c.actual=g[P].actual):null!=S&&1<S.colspan?(c.rowspan=S.rowspan,c.colspan=S.colspan-1,c.actual=S.actual):(S=this.getCurrentCellStyle(B[P],!0),null!=S&&(c.rowspan=parseInt(S.rowspan||1),c.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(H,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(c,B.length,m.length,b.x+(S?p.x:0),b.y+(S?p.y:0));G.push(c);S=c}g=G}};Graph.prototype.getTableLines=function(b,e,g){var m=[],u=[];(e||g)&&this.visitTableCells(b,mxUtils.bind(this,function(p,B,H,S,G){e&&p.row<H-1&&(null==m[p.row]&&(m[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&m[p.row].push(null),m[p.row].push(p.point));g&&p.col<B-1&&(null==u[p.col]&&(u[p.col]=[new mxPoint(p.point.x,G)]),1<p.colspan&&u[p.col].push(null),u[p.col].push(p.point))}));return m.concat(u)};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,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(S,G))}}var O=this.getCellGeometry(p);null!=O&&(g||(g=b==B[B.length-1]),g&&(O=O.clone(),O.height+=e,m.setGeometry(p,O)))}}finally{m.endUpdate()}};-Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),G=0;G<S.length;G++){u=S[G];B=m.getChildCells(u,!0);var O=B[b],R=this.getCellGeometry(O);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(O,R));b<B.length-1&&(O=B[b+1],R=this.getCellGeometry(O),null!=R&&(R=R.clone(),-R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(O,R)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};+Graph.prototype.setTableRowHeight=function(b,e,g){g=null!=g?g:!0;var m=this.getModel();m.beginUpdate();try{var u=this.getCellGeometry(b);if(null!=u){u=u.clone();u.height+=e;m.setGeometry(b,u);var p=m.getParent(b),B=m.getChildCells(p,!0);if(!g){var H=mxUtils.indexOf(B,b);if(H<B.length-1){var S=B[H+1],G=this.getCellGeometry(S);null!=G&&(G=G.clone(),G.y+=e,G.height-=e,m.setGeometry(S,G))}}var P=this.getCellGeometry(p);null!=P&&(g||(g=b==B[B.length-1]),g&&(P=P.clone(),P.height+=e,m.setGeometry(p,P)))}}finally{m.endUpdate()}};+Graph.prototype.setTableColumnWidth=function(b,e,g){g=null!=g?g:!1;var m=this.getModel(),u=m.getParent(b),p=m.getParent(u),B=m.getChildCells(u,!0);b=mxUtils.indexOf(B,b);var H=b==B.length-1;m.beginUpdate();try{for(var S=m.getChildCells(p,!0),G=0;G<S.length;G++){u=S[G];B=m.getChildCells(u,!0);var P=B[b],R=this.getCellGeometry(P);null!=R&&(R=R.clone(),R.width+=e,null!=R.alternateBounds&&(R.alternateBounds.width+=e),m.setGeometry(P,R));b<B.length-1&&(P=B[b+1],R=this.getCellGeometry(P),null!=R&&(R=R.clone(),+R.x+=e,g||(R.width-=e,null!=R.alternateBounds&&(R.alternateBounds.width-=e)),m.setGeometry(P,R)))}if(H||g){var c=this.getCellGeometry(p);null!=c&&(c=c.clone(),c.width+=e,m.setGeometry(p,c))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{m.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,e){for(var g=0,m=0;m<b.length;m++)if(!this.isVertexIgnored(b[m])){var u=this.graph.getCellGeometry(b[m]);null!=u&&(g+=e?u.width:u.height)}return g};TableLayout.prototype.getRowLayout=function(b,e){var g=this.graph.model.getChildCells(b,!0),m=this.graph.getActualStartSize(b,!0);b=this.getSize(g,!0);e=e-m.x-m.width;var u=[];m=m.x;for(var p=0;p<g.length;p++){var B=this.graph.getCellGeometry(g[p]);null!=B&&(m+=(null!=B.alternateBounds?B.alternateBounds.width:B.width)*e/b,u.push(Math.round(m)))}return u};TableLayout.prototype.layoutRow=function(b,e,g,m){var u=this.graph.getModel(),p=u.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var B=b.x,H=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var S=0;S<p.length;S++){var G=this.graph.getCellGeometry(p[S]);null!=G&&(G=G.clone(),G.y=b.y,G.height=g-b.y-b.height,null!=e?(G.x=e[S],G.width=e[S+1]-G.x,S==p.length-1&&S<e.length-2&&(G.width=m-G.x-b.x-b.width)):(G.x=B,B+=G.width,S==p.length-1?G.width=m-b.x-b.width-H:H+=G.width),G.alternateBounds=new mxRectangle(0,0,G.width,G.height),u.setGeometry(p[S],G))}return H};-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,O=B.getChildCells(b,!0),R=0;R<O.length;R++)B.setVisible(O[R],!0);var c=this.getSize(O,!1);if(0<S&&0<G&&0<-O.length&&0<c){if(u){var f=this.graph.getCellGeometry(O[O.length-1]);null!=f&&(f=f.clone(),f.height=S-c+f.height,B.setGeometry(O[O.length-1],f))}var l=p?null:this.getRowLayout(O[0],G),t=[],z=e.y;for(R=0;R<O.length;R++)f=this.graph.getCellGeometry(O[R]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*S,f.height=Math.round(z)-f.y,B.setGeometry(O[R],f)),H=Math.max(H,this.layoutRow(O[R],l,f.height,G,t));m&&S<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,-g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(R=0;R<O.length;R++)B.setVisible(O[R],+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),g=this.graph.getCellGeometry(b),m=this.graph.getCellStyle(b),u="1"==mxUtils.getValue(m,"resizeLastRow","0"),p="1"==mxUtils.getValue(m,"resizeLast","0");m="1"==mxUtils.getValue(m,"fixedRows","0");var B=this.graph.getModel(),H=0;B.beginUpdate();try{for(var S=g.height-e.y-e.height,G=g.width-e.x-e.width,P=B.getChildCells(b,!0),R=0;R<P.length;R++)B.setVisible(P[R],!0);var c=this.getSize(P,!1);if(0<S&&0<G&&0<+P.length&&0<c){if(u){var f=this.graph.getCellGeometry(P[P.length-1]);null!=f&&(f=f.clone(),f.height=S-c+f.height,B.setGeometry(P[P.length-1],f))}var l=p?null:this.getRowLayout(P[0],G),t=[],z=e.y;for(R=0;R<P.length;R++)f=this.graph.getCellGeometry(P[R]),null!=f&&(f=f.clone(),f.x=e.x,f.width=G,f.y=Math.round(z),z=u||m?z+f.height:z+f.height/c*S,f.height=Math.round(z)-f.y,B.setGeometry(P[R],f)),H=Math.max(H,this.layoutRow(P[R],l,f.height,G,t));m&&S<c&&(g=g.clone(),g.height=z+e.height,B.setGeometry(b,+g));p&&G<H+Graph.minTableColumnWidth&&(g=g.clone(),g.width=H+e.width+e.x+Graph.minTableColumnWidth,B.setGeometry(b,g));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){B.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=F.width}C.actual.col==C.col&&(F=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=F.height)}}))}else for(R=0;R<P.length;R++)B.setVisible(P[R],!1)}finally{B.endUpdate()}}};(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(R,c){c=null!=c?c:!0;var f=this.getState(R);null!=f&&c&&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=e.apply(this,arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(f);return f};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var R=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=R)for(var c=0;c<R.length;c++)if("hidden"!=R[c].getAttribute("visibility"))return R[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,c){return u.apply(this,arguments)||null!=R.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);-this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,la,Z){var k=new mxPoint(la,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=la||k.y!=Z},z=.5*this.scale;-f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var ea=0;ea<this.validEdges.length;ea++){var da=this.validEdges[ea],ca=da.absolutePoints;if(null!=ca&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var W=null;for(da=0;da<ca.length-1;da++){var ba=ca[da+1],ha=ca[da];for(J=ca[da+2];da<ca.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,J.x,J.y,ba.x,ba.y)<1*this.scale*-this.scale;)ba=J,da++,J=ca[da+2];var ma=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=ma&&(Math.abs(ma.x-N.x)>z||Math.abs(ma.y-N.y)>z)&&(Math.abs(ma.x-F.x)>z||Math.abs(ma.y-F.y)>z)&&(null==W||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,W.x,W.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){J=ma.x-N.x;W=ma.y-N.y;ma={distSq:J*J+W*W,x:ma.x,y:ma.y};for(J=0;J<K.length;J++)if(K[J].distSq>-ma.distSq){K.splice(J,0,ma);ma=null;break}null==ma||0!=K.length&&K[K.length-1].x===ma.x&&K[K.length-1].y===ma.y||K.push(ma)}W=ha}}}for(da=0;da<K.length;da++)f=t(1,K[da].x,K[da].y)||f}ma=c[c.length-1];f=t(0,ma.x,ma.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,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)B.apply(this,-arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;R.begin();for(var ea=0;ea<this.state.routedPoints.length;ea++){var da=this.state.routedPoints[ea],ca=new mxPoint(da.x/this.scale,da.y/this.scale);0==ea?ca=c[0]:ea==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var W=-!1;if(null!=F&&1==da.type){var ba=this.state.routedPoints[ea+1];da=ba.x/this.scale-ca.x;ba=ba.y/this.scale-ca.y;da=da*da+ba*ba;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);da>t*t&&0<N&&(da=F.x-ca.x,ba=F.y-ca.y,da=da*da+ba*ba,da>t*t&&(W=new mxPoint(ca.x-J.x,ca.y-J.y),da=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(W),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(W.x--J.y*K,W.y+J.x*K),R.lineTo(da.x-J.y*K,da.y+J.x*K),R.lineTo(da.x,da.y)):"line"==z?(R.moveTo(W.x+J.y*K,W.y-J.x*K),R.lineTo(W.x-J.y*K,W.y+J.x*K),R.moveTo(da.x-J.y*K,da.y+J.x*K),R.lineTo(da.x+J.y*K,da.y-J.x*K),R.moveTo(da.x,da.y)):"arc"==z?(K*=1.3,R.curveTo(W.x-J.y*K,W.y+J.x*K,da.x-J.y*K,da.y+J.x*K,da.x,da.y)):(R.moveTo(da.x,da.y),C=!0),K=[da],W=!0))}else J=null;W||(K.push(ca),F=ca)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=+this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,ma,Z){var k=new mxPoint(ma,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=ma||k.y!=Z},z=.5*this.scale;+f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var da=0;da<this.validEdges.length;da++){var ea=this.validEdges[da],ca=ea.absolutePoints;if(null!=ca&&mxUtils.intersects(R,ea)&&"1"!=ea.style.noJump){var W=null;for(ea=0;ea<ca.length-1;ea++){var ba=ca[ea+1],ha=ca[ea];for(J=ca[ea+2];ea<ca.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,J.x,J.y,ba.x,ba.y)<1*this.scale*+this.scale;)ba=J,ea++,J=ca[ea+2];var la=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=la&&(Math.abs(la.x-N.x)>z||Math.abs(la.y-N.y)>z)&&(Math.abs(la.x-F.x)>z||Math.abs(la.y-F.y)>z)&&(null==W||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,W.x,W.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){J=la.x-N.x;W=la.y-N.y;la={distSq:J*J+W*W,x:la.x,y:la.y};for(J=0;J<K.length;J++)if(K[J].distSq>+la.distSq){K.splice(J,0,la);la=null;break}null==la||0!=K.length&&K[K.length-1].x===la.x&&K[K.length-1].y===la.y||K.push(la)}W=ha}}}for(ea=0;ea<K.length;ea++)f=t(1,K[ea].x,K[ea].y)||f}la=c[c.length-1];f=t(0,la.x,la.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,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)B.apply(this,+arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;R.begin();for(var da=0;da<this.state.routedPoints.length;da++){var ea=this.state.routedPoints[da],ca=new mxPoint(ea.x/this.scale,ea.y/this.scale);0==da?ca=c[0]:da==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var W=+!1;if(null!=F&&1==ea.type){var ba=this.state.routedPoints[da+1];ea=ba.x/this.scale-ca.x;ba=ba.y/this.scale-ca.y;ea=ea*ea+ba*ba;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);ea>t*t&&0<N&&(ea=F.x-ca.x,ba=F.y-ca.y,ea=ea*ea+ba*ba,ea>t*t&&(W=new mxPoint(ca.x-J.x,ca.y-J.y),ea=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(W),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(W.x-+J.y*K,W.y+J.x*K),R.lineTo(ea.x-J.y*K,ea.y+J.x*K),R.lineTo(ea.x,ea.y)):"line"==z?(R.moveTo(W.x+J.y*K,W.y-J.x*K),R.lineTo(W.x-J.y*K,W.y+J.x*K),R.moveTo(ea.x-J.y*K,ea.y+J.x*K),R.lineTo(ea.x+J.y*K,ea.y-J.x*K),R.moveTo(ea.x,ea.y)):"arc"==z?(K*=1.3,R.curveTo(W.x-J.y*K,W.y+J.x*K,ea.x-J.y*K,ea.y+J.x*K,ea.x,ea.y)):(R.moveTo(ea.x,ea.y),C=!0),K=[ea],W=!0))}else J=null;W||(K.push(ca),F=ca)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(R,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,c,f,l){if(null==c||null==R||"1"!=c.style.snapToPoint&&"1"!=R.style.snapToPoint)S.apply(this,arguments);else{c=this.getTerminalPort(R,c,l);var t=this.getNextPoint(R,f,l),z=this.graph.isOrthogonal(R),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(R.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=function(R,c,f,l,t){if(null!=c&&null!=R){R=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=R)for(var z=0;z<R.length;z++){var C=this.graph.getConnectionPoint(c,R[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,c,f){var l=G.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,-l));return l};var O=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return O.apply(this,arguments)}})();+l));return l};var P=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(R){if(null!=R.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(R.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"string"===typeof c&&"stencil("==c.substring(0,8))try{var f=c.substring(8,c.length-1),l=mxUtils.parseXml(Graph.decompress(f));return new mxShape(new mxStencil(l.documentElement))}catch(t){null!=window.console&&console.log("Error in shape: "+t)}}return P.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(b){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[b]};mxStencilRegistry.setFileLoaded=function(b){mxStencilRegistry.filesLoaded[b]=!0};mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var g=mxStencilRegistry.getBasenameForStencil(b);if(null!=g){e=mxStencilRegistry.libraries[g];if(null!=e){if(null==mxStencilRegistry.packages[g]){for(var m=0;m<e.length;m++){var u=e[m];if(!mxStencilRegistry.isFileLoaded(u))if(mxStencilRegistry.setFileLoaded(u),".xml"==u.toLowerCase().substring(u.length-4,u.length))mxStencilRegistry.loadStencilSet(u,null);else if(".js"==u.toLowerCase().substring(u.length-3,u.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(u);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(B){null!=window.console&&console.log("error in getStencil:",b,g,e,u,B)}}mxStencilRegistry.packages[g]=1}}else g=g.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+g+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};@@ -2559,8 +2559,8 @@ M,Q,V){M=null!=M?M:0;Q=null!=Q?Q:0;var ia=new mxCodec(x.ownerDocument),ka=new mxka.getChildren(xa[0]);null!=ua&&(x=this.moveCells(ua,M,Q,!1,this.getDefaultParent()),oa[ka.getChildAt(ka.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ia,ta,oa),this.updateCustomLinks(oa,x),V)){this.isGridEnabled()&&(M=this.snap(M),Q=this.snap(Q));var Fa=this.getBoundingBoxFromGeometry(x,!0);null!=Fa&&this.moveCells(x,M-Fa.x,Q-Fa.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var M={},Q=this.cloneCells(x,null,M),V=new mxDictionary,ia=0;ia<x.length;ia++)V.put(x[ia],!0);var ka=new mxCodec,oa=new mxGraphModel,xa=oa.getChildAt(oa.getRoot(),0);for(ia=0;ia<Q.length;ia++){oa.add(xa,Q[ia]);var ta=this.view.getState(x[ia]);if(null!=ta){var ua=this.getCellGeometry(Q[ia]);null!=ua&&ua.relative&&!this.model.isEdge(x[ia])&&null==V.get(this.model.getParent(x[ia]))&&(ua.offset=null,ua.relative=!1,ua.x=ta.x/ta.view.scale-ta.view.translate.x,ua.y=ta.y/ta.view.scale-ta.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(M,this.createCellLookup(x)),Q);return ka.encode(oa)};Graph.prototype.isSwimlane=function(x,M){var Q=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(Q=this.getCurrentCellStyle(x,M)[mxConstants.STYLE_SHAPE]);return Q==mxConstants.SHAPE_SWIMLANE||"table"==Q||"tableRow"==Q};var H=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(x){return null!=x&&H.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellEditable(this.model.getParent(x)):-!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&S.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var M=this.model.getParent(x);if(null!=M){var Q=this.getCurrentCellStyle(M);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==M||!this.isTable(M))};var O=Graph.prototype.splitEdge;-Graph.prototype.splitEdge=function(x,M,Q,V,ia,ka,oa,xa){null==xa&&(xa=this.model.getParent(x),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=O.apply(this,[x,M,Q,V,ia,ka,oa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(M=0;M<ta.length;M++){var ua=this.getCellGeometry(ta[M]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[M])}var Fa=this.getChildCells(x,!0);for(M=0;M<Fa.length;M++)ua=this.getCellGeometry(Fa[M]),+!0:!1};var S=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=function(x){return null!=x&&S.apply(this,arguments)?this.isTableCell(x)||this.isTableRow(x)?this.isCellMovable(this.model.getParent(x)):!0:!1};var G=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var M=this.model.getParent(x);if(null!=M){var Q=this.getCurrentCellStyle(M);if(null!=Q.expand)return"0"!=Q.expand}return G.apply(this,arguments)&&(null==M||!this.isTable(M))};var P=Graph.prototype.splitEdge;+Graph.prototype.splitEdge=function(x,M,Q,V,ia,ka,oa,xa){null==xa&&(xa=this.model.getParent(x),this.isTable(xa)||this.isTableRow(xa))&&(xa=this.getCellAt(ka,oa,null,!0,!1));Q=null;this.model.beginUpdate();try{Q=P.apply(this,[x,M,Q,V,ia,ka,oa,xa]);this.model.setValue(Q,"");var ta=this.getChildCells(Q,!0);for(M=0;M<ta.length;M++){var ua=this.getCellGeometry(ta[M]);null!=ua&&ua.relative&&0<ua.x&&this.model.remove(ta[M])}var Fa=this.getChildCells(x,!0);for(M=0;M<Fa.length;M++)ua=this.getCellGeometry(Fa[M]),null!=ua&&ua.relative&&0>=ua.x&&this.model.remove(Fa[M]);var Na=this.model.getTerminal(Q,!1);if(null!=Na){var Wa=this.getCurrentCellStyle(Na);null!=Wa&&"1"==Wa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[Q]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[Q]))}}finally{this.model.endUpdate()}return Q};var R=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,M,Q){if(M||Q)R.apply(this,arguments);else{var V=this.getSelectionCell(),ia=null,ka=[],oa=mxUtils.bind(this,function(xa){if(null!=this.view.getState(xa)&&(this.model.isVertex(xa)||this.model.isEdge(xa)))if(ka.push(xa),xa==V)ia=ka.length-1;else if(x&&null==V&&0<ka.length||null!=ia&&x&&ka.length>ia||!x&&0<ia)return;for(var ta=0;ta<this.model.getChildCount(xa);ta++)oa(this.model.getChildAt(xa,ta))});oa(this.model.root);0<ka.length&&(ia=null!=ia?mxUtils.mod(ia+(x?1:-1),ka.length):0,this.setSelectionCell(ka[ia]))}};Graph.prototype.swapShapes=function(x,M){if(this.model.isVertex(x)&&this.model.isVertex(M)&&2==this.getMovableCells([x,M]).length){var Q=this.getCellGeometry(x),V=this.getCellGeometry(M);if(null!=Q&&null!=V){var ia=Q.clone(),ka=V.clone();this.model.beginUpdate();try{ia.x=V.getCenterX()-Q.width/2,ia.y=V.getCenterY()-Q.height/2,ka.x=Q.getCenterX()-V.width/2,ka.y=Q.getCenterY()-V.height/2,this.model.setGeometry(x,ia),this.model.setGeometry(M,ka)}finally{this.model.endUpdate()}}}};var c=Graph.prototype.moveCells;@@ -2665,13 +2665,13 @@ M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getBorderColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getMinimumSize=function(x){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,Q=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/Q-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/Q-M.y);Q=this.graph.view.unit;this.hint.innerHTML=e(x,Q)+", "+e(M,Q);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&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ea=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){ea.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=-parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=da.apply(this,+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var da=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){da.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=+parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var ea=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=ea.apply(this,arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ca=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ca.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var W=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return W.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(x){var M=ha.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,M){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(M.getEvent())};-mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var ma=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ma.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 Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||la.apply(this,arguments)&&+mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return la.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 Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ma=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||ma.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var Z=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return Z.apply(this,arguments).grow(-this.getSelectionBorderInset())};var k=null,A=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==k&&(k=mxCellRenderer.defaultShapes.tableLine);var x=A.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var M=function(ab,Oa,Qa){for(var kb=[],cb=0;cb<ab.length;cb++){var Ya=ab[cb];kb.push(null==Ya?null:new mxPoint((ta+Ya.x+Oa)*ka,(ua+Ya.y+Qa)*ka))}return kb},Q=this,V=this.graph,ia=V.model,ka=V.view.scale,oa=this.state,xa=this.selectionBorder,ta=this.state.origin.x+V.view.translate.x,ua=this.state.origin.y+V.view.translate.y;null==x&&(x=[]);var Fa=V.view.getCellStates(ia.getChildCells(this.state.cell,!0));if(0<Fa.length){var Na=ia.getChildCells(Fa[0].cell,!0),Wa=V.getTableLines(this.state.cell,!1,!0),Xa=V.getTableLines(this.state.cell,!0,!1);for(ia=0;ia<Fa.length;ia++)mxUtils.bind(this,function(ab){var Oa=Fa[ab],Qa=null;if(V.isCellMovable(Oa.cell)){Qa=ab<Fa.length-1?Fa[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa.cell):null;var kb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:@@ -2686,13 +2686,13 @@ this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMovethis.graph,M=x.model,Q=[],V=0;V<M.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ia){if(null!=ia&&M.isVertex(ia.cell)&&x.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ia.cell,oa),mxEvent.consume(oa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(M.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=-function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var T=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){T.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();+function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();-x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=+x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var O=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ia=this.customHandles[V].shape.bounds,ka=ia.getCenterX(),oa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-oa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-oa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/=2,this.graph.isTable(this.state.cell)&&(M+=7),x.x=-this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=P.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){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+"°";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/+this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=O.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){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+"°";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/x),M)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.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 U=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){U.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){X.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 T=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){T.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){X.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 aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,M){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,M,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(M.x/ia-V.x);V=this.roundLength(M.y/ia-V.y);var oa=this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');@@ -2736,11 +2736,11 @@ mxResources.get("rotateTooltip")),this.rotationShape.node.style.display=null!=ththis.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state.text?this.state.text.boundingBox:null,null==Q&&(Q=this.state),Q=Q.y+Q.height,null!=M&&(Q=Math.max(Q,M.y+M.height)),this.linkHint.style.left=x.x+x.width/2+"px",this.linkHint.style.top=Math.round(Q+this.verticalOffset/2+Editor.hintOffset)+"px",this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":"")};var Za=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Za.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();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 La=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(La.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=-function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.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(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function O(){mxCylinder.call(this)}function R(){mxShape.call(this)}-function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function J(){mxActor.call(this)}function ea(){mxActor.call(this)}function da(){mxActor.call(this)}function ca(d,n){this.canvas=d;this.canvas.setLineJoin("round");+function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.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(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function P(){mxCylinder.call(this)}function R(){mxShape.call(this)}+function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function J(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(){mxActor.call(this)}function ca(d,n){this.canvas=d;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ca.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ca.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ca.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ca.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=-mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function ma(){mxActor.call(this)}function Y(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function T(){mxEllipse.call(this)}-function P(){mxShape.call(this)}function U(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);+mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function la(){mxActor.call(this)}function Y(){mxActor.call(this)}function ma(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function U(){mxEllipse.call(this)}+function O(){mxShape.call(this)}function T(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Aa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Za(){mxActor.call(this)}function La(){mxActor.call(this)}function $a(){mxActor.call(this)}function Da(){mxActor.call(this)}function x(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,fa,L,va){E+=L;var na=q.clone();q.x-=v*(2*E+L);q.y-=D*(2*E+L);v*=E+L;D*=E+L;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);va?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==@@ -2757,7 +2757,7 @@ p);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.redrawPath=functionn,(.5-Ya)*n),d.lineTo(.5*n,(1-Ya)*n)):(d.translate((q-n)/2,(v-n)/2),d.moveTo(0,.25*n),d.lineTo(.5*n,n*Ya),d.lineTo(n,.25*n),d.lineTo(n,.75*n),d.lineTo(.5*n,(1-Ya)*n),d.lineTo(0,.75*n),d.close());d.end()};mxCellRenderer.registerShape("isoCube",H);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(d,n,y,q,v,D){n=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(D&&null!=this.fill||!D&&null==this.fill)d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,n/2),d.moveTo(0,n),d.curveTo(0,2*n,q,2*n,q,n),D||(d.stroke(),d.begin()),d.translate(0,-n);D||(d.moveTo(0,n),d.curveTo(0,-n/3,q,-n/3,q,n),d.lineTo(q,v-n),d.curveTo(q,v+n/3,0,v+n/3,0,v-n),d.close())};S.prototype.getLabelMargins=function(d){return new mxRectangle(0,2.5*Math.min(d.height/2,Math.round(d.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",S);mxUtils.extend(G,mxCylinder);G.prototype.size=30;G.prototype.darkOpacity=0;G.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(q,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),E=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));d.translate(n,y);d.begin();d.moveTo(0,0);d.lineTo(q-D,0);d.lineTo(q,D);d.lineTo(q,v);d.lineTo(0,v);d.lineTo(0,0);d.close();d.end();d.fillAndStroke();this.outline||(d.setShadow(!1),0!=E&&(d.setFillAlpha(Math.abs(E)),d.setFillColor(0>E?"#FFFFFF":"#000000"),-d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(O,G);mxCellRenderer.registerShape("note2",O);O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=+d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.close(),d.fill()),d.begin(),d.moveTo(q-D,0),d.lineTo(q-D,D),d.lineTo(q,D),d.end(),d.stroke())};mxCellRenderer.registerShape("note",G);mxUtils.extend(P,G);mxCellRenderer.registerShape("note2",P);P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,0)}return null};mxUtils.extend(R,mxShape);R.prototype.isoAngle=15;R.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;D=Math.min(q*Math.tan(D),.5*v);d.translate(n,y);d.begin();d.moveTo(.5*q,0);d.lineTo(q,D);d.lineTo(q,v-D);d.lineTo(.5*q,v);d.lineTo(0,v-D);d.lineTo(0,D);d.close();d.fillAndStroke();d.setShadow(!1);d.begin();d.moveTo(0,D);d.lineTo(.5*q,2*D);d.lineTo(q,D);d.moveTo(.5*q,2*D);d.lineTo(.5*q,v);d.stroke()};mxCellRenderer.registerShape("isoCube2",R);mxUtils.extend(c,mxShape);c.prototype.size=15;c.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D),d.lineTo(q,v-D),d.arcTo(.5*q,D,0,0,1,.5*q,v),d.arcTo(.5*q,D,0,0,1,0,v-D),d.close(),d.fillAndStroke(),d.setShadow(!1),d.begin(),d.moveTo(q,D),d.arcTo(.5*q,D,0,0,1,.5*q,2*D),d.arcTo(.5*q,D,0,0,1,0,D),d.stroke())};mxCellRenderer.registerShape("cylinder2",c);mxUtils.extend(f,mxCylinder);f.prototype.size=15;f.prototype.paintVertexShape=function(d,n,y,q,v){var D=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"lid",!0);d.translate(n,y);0==D?(d.rect(0,0,q,v),d.fillAndStroke()):(d.begin(),E?(d.moveTo(0,D),d.arcTo(.5*q,D,0,0,1,.5*q,0),d.arcTo(.5*q,D,0,0,1,q,D)):(d.moveTo(0,0),d.arcTo(.5*q,D,0,0,0,.5*q,D),d.arcTo(.5*q,D,@@ -2776,11 +2776,11 @@ q,v){n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",thifunction(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,d.height*n),0,0)}return null};f.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(n/=2);return new mxRectangle(0,Math.min(d.height*this.scale,2*n*this.scale),0,Math.max(0,.3*n*this.scale))}return null};t.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};z.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*-this.scale,0,0,0):null};O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,+this.scale,0,0,0):null};P.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(d,-n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",J);mxUtils.extend(ea,mxActor);-ea.prototype.size=.5;ea.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ea);mxUtils.extend(da,mxActor);-da.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ca.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ca.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,+n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",J);mxUtils.extend(da,mxActor);+da.prototype.size=.5;da.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",da);mxUtils.extend(ea,mxActor);+ea.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ea);ca.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ca.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)};ca.prototype.quadTo=function(d,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ca.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ca.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ca.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),fa=this.defaultVariation;5>E&&(E=5,fa/=3);var L=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var va=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,L*D+this.lastX-va*v,y*D+this.lastY-va*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n};ca.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};var hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;@@ -2792,18 +2792,18 @@ D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,function(d,n,y,q,v){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,v*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+v);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",W);mxCellRenderer.registerShape("process2",W);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",-this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(ma,mxActor);ma.prototype.size=.2;ma.prototype.fixedSize=20;ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(d,+this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(la,mxActor);la.prototype.size=.2;la.prototype.fixedSize=20;la.prototype.isRoundable=function(){return!0};la.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(0,v),new mxPoint(n,v/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",-ma);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,-0),new mxPoint(q-n,0),new mxPoint(q,.5*v),new mxPoint(q-n,v),new mxPoint(n,v),new mxPoint(0,.5*v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(la,mxRectangleShape);la.prototype.isHtmlAllowed=function(){return!1};la.prototype.paintForeground=function(d,n,y,q,v){var D=Math.min(q/5,v/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+v-D);d.moveTo(n+D,y+v/2);d.lineTo(n+q-D,y+v/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};-mxCellRenderer.registerShape("plus",la);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||+la);mxUtils.extend(Y,mxHexagon);Y.prototype.size=.25;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(n,+0),new mxPoint(q-n,0),new mxPoint(q,.5*v),new mxPoint(q-n,v),new mxPoint(n,v),new mxPoint(0,.5*v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("hexagon",Y);mxUtils.extend(ma,mxRectangleShape);ma.prototype.isHtmlAllowed=function(){return!1};ma.prototype.paintForeground=function(d,n,y,q,v){var D=Math.min(q/5,v/5)+1;d.begin();d.moveTo(n+q/2,y+D);d.lineTo(n+q/2,y+v-D);d.moveTo(n+D,y+v/2);d.lineTo(n+q-D,y+v/2);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};+mxCellRenderer.registerShape("plus",ma);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};mxRhombus.prototype.paintVertexShape=function(d,n,y,q,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var D=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&(d.setShadow(!1),db.apply(this,[d,n,y,q,v]))}};mxUtils.extend(Z,mxRectangleShape);Z.prototype.isHtmlAllowed=function(){return!1};Z.prototype.getLabelBounds=function(d){if(1==this.style["double"]){var n=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(d.x+n,d.y+n,d.width-2*n,d.height-2*n)}return d};Z.prototype.paintForeground=function(d,n,y,q,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var D=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var fa=this.style["symbol"+D+"Align"],L=this.style["symbol"+D+"VerticalAlign"],va=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=fa==mxConstants.ALIGN_CENTER?bb+(q-va)/2:fa==mxConstants.ALIGN_RIGHT?bb+(q-va-Va):bb+Va;Ga=L==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:L==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();fa=new E;fa.style=this.style;E.prototype.paintVertexShape.call(fa,d,bb,Ga,va,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",Z);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,n,y,q,v,D){D?(d.moveTo(0,0),d.lineTo(q/2,v/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(0,v),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.ellipse(q/4,0,q/2,v/4);d.fillAndStroke();d.begin();d.moveTo(q/2,v/4);d.lineTo(q/2,2*v/3);d.moveTo(q/2,v/3);d.lineTo(0,v/3);d.moveTo(q/2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};I.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",-I);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",T);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(U,mxShape);-U.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};U.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};U.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(X,mxRectangleShape);X.prototype.size=+I);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(O,mxShape);O.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",O);mxUtils.extend(T,mxShape);+T.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};T.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};T.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(X,mxRectangleShape);X.prototype.size=40;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};X.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=X&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};X.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,D))};mxCellRenderer.registerShape("umlLifeline",X);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,@@ -2817,7 +2817,7 @@ mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAd=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?J.prototype.fixedSize:J.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa)]);va=d.getCenterX();d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",-mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?ma.prototype.fixedSize:ma.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,+mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?la.prototype.fixedSize:la.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,d),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,d),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,d),new mxPoint(E+L,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,d),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(na,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(na,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(na,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va-v),new mxPoint(na,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]);na=new mxPoint(na,d);q&&(y.x<E||y.x>E+L?na.y=y.y:na.x=y.x);return mxUtils.getPerimeterPoint(fa,na,y)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?Y.prototype.fixedSize:Y.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*@@ -2934,7 +2934,7 @@ d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectanMath.min(n.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),q=Math.max(1.5*aa.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,-"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,+"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ma.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),q=parseFloat(mxUtils.getValue(this.state.style,"size",y?Da.prototype.fixedSize:Da.prototype.size));return new mxPoint(n.x+n.width-q*(y?1:n.width),n.getCenterY())},function(n,y){n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(n.width,n.x+n.width-y.x)):Math.max(0,Math.min(1,(n.x+n.width-y.x)/n.width));this.state.style.size=n},!1)]},callout:function(d){var n=[jb(d,["size","position"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",ha.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ha.prototype.position)));mxUtils.getValue(this.state.style,"base",ha.prototype.base);return new mxPoint(y.x+v*y.width,y.y+y.height-q)},function(y,q){mxUtils.getValue(this.state.style,"base",ha.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(y.height,y.y+y.height-q.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(q.x-y.x)/y.width)))/100},!1),jb(d,["position2"],function(y){var q=@@ -2948,8 +2948,8 @@ return new mxPoint(n.x+(n.width+y)/2,n.y+q)},function(n,y){this.state.style.dx=MMath.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(n.x+3*n.width/4,n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},tape:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));-return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(ma.prototype.size,!0,null,-!0,ma.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(ea.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=+return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(la.prototype.size,!0,null,+!0,la.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(da.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=ib[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=ib[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}return d};mxEdgeHandler.prototype.createCustomHandles=function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=ib[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(zb),Math.sin(zb));var rb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,fa=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==fa&&null!=n&&(fa=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var L=sb.x,va=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=fa){d=function(Ga,Ka,Ja){Ga-=bb.x;var Ia=Ka-bb.y;Ka=(Va*Ga-na*Ia)/(L*Va-va*na);Ga=(va*Ga-L*Ia)/(va*na-L*Va);fb?@@ -2961,7 +2961,7 @@ new mxElbowEdgeHandler(d);y.snapToTerminals=!1;return y}return Cb.apply(this,arg0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y-q)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y-q)));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};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))];Fa.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.getConstraints=+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;ma.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;G.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(y+q)));d.push(new mxConnectionConstraint(new mxPoint(1,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));n>=2*q&&d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return d};C.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,Math.min(y,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));d.push(new mxConnectionConstraint(new mxPoint(1,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*q,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(y+q)));d.push(new mxConnectionConstraint(new mxPoint(0,1),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(1,@@ -2983,7 +2983,7 @@ mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05.5),!1)];Ba.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)];l.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)];F.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)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,+[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)];la.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)];ja.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,@@ -3004,72 +3004,72 @@ mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),n0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};X.prototype.constraints=null;x.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)];M.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)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.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(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.cellLabelChanged(G[O],"")}finally{p.getModel().endUpdate()}}}function g(G,O,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,-l));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,O,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var m=this.editorUi,u=m.editor,p=u.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),-function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,O=p.container.scrollLeft,R=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(O-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&-p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,O){try{var R=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(R.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=+Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),P=0;P<G.length;P++)p.cellLabelChanged(G[P],"")}finally{p.getModel().endUpdate()}}}function g(G,P,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,+l));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,P,[G]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[G])}finally{f.getModel().endUpdate()}}var m=this.editorUi,u=m.editor,p=u.graph,B=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(m.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";m.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),+function(){p.popupMenuHandler.hideMenu();var G=p.view.scale,P=p.container.scrollLeft,R=p.container.scrollTop,c=p.view.translate.x,f=p.view.translate.y;m.actions.get("resetView").funct();1E-5>Math.abs(G-p.view.scale)&&5>Math.abs(P-p.container.scrollLeft)&&5>Math.abs(R-p.container.scrollTop)&&c==p.view.translate.x&&f==p.view.translate.y&&m.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){p.isSelectionEmpty()?m.actions.get("smartFit").funct():p.isEnabled()&&+p.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){m.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(G,P){try{var R=mxUtils.parseXml(G);u.graph.setSelectionCells(u.graph.importGraphModel(R.documentElement))}catch(c){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+c.message)}}));m.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=B;this.addAction("save",function(){m.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=B;this.addAction("saveAs...",function(){m.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){m.showDialog((new ExportDialog(m)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var G=new EditDiagramDialog(m);m.showDialog(G.container,620,420,!0,!1);G.init()}).isEnabled=B;this.addAction("pageSetup...",function(){m.showDialog((new PageSetupDialog(m)).container,-320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=m.copyXml(),null!=G&&p.removeCells(G,!1)}catch(O){}try{null==-G&&mxClipboard.cut(p)}catch(O){m.handleError(O)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){m.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(O){if(null!=O){p.getModel().beginUpdate();try{m.pasteXml(O,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),-G=!0)}catch(O){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function O(c){if(null!=c){for(var f=!0,l=0;l<c.length&&f;l++)f=f&&p.model.isEdge(c[l]);var t=p.view.translate;l=p.view.scale;var z=t.x,C=t.y;t=null;if(1==c.length&&f){var F=p.getCellGeometry(c[0]);null!=F&&(t=F.getTerminalPoint(!0))}t=null!=t?t:p.getBoundingBoxFromGeometry(c,f);null!=t&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/l-z)),l=Math.round(p.snap(p.popupMenuHandler.triggerY/-l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function R(){p.getModel().beginUpdate();try{O(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{O(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else R()}),G=!0)}catch(c){}G||R()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],-G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),O=0;O<G.length;O++)if(p.getModel().isVertex(G[O])){var R=p.getCellGeometry(G[O]);-null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(G[O],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),-mxUtils.bind(this,function(O){m.handleError(O)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(O){m.handleError(O)}))}catch(O){m.handleError(O)}});this.addAction("pasteData",function(G,O){function R(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=O?O:G;var c=-p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)R(c.getRoot(),m.copiedValue);else for(O=0;O<f.length;O++)R(f[O],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,O){G=null!=O?O:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",+320,240,!0,!0)}).isEnabled=B;this.addAction("print...",function(){m.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){m.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){m.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var G=null;try{G=m.copyXml(),null!=G&&p.removeCells(G,!1)}catch(P){}try{null==+G&&mxClipboard.cut(p)}catch(P){m.handleError(P)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{m.copyXml()}catch(G){}try{mxClipboard.copy(p)}catch(G){m.handleError(G)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(P){if(null!=P){p.getModel().beginUpdate();try{m.pasteXml(P,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),+G=!0)}catch(P){}G||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(G){function P(c){if(null!=c){for(var f=!0,l=0;l<c.length&&f;l++)f=f&&p.model.isEdge(c[l]);var t=p.view.translate;l=p.view.scale;var z=t.x,C=t.y;t=null;if(1==c.length&&f){var F=p.getCellGeometry(c[0]);null!=F&&(t=F.getTerminalPoint(!0))}t=null!=t?t:p.getBoundingBoxFromGeometry(c,f);null!=t&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/l-z)),l=Math.round(p.snap(p.popupMenuHandler.triggerY/+l-C)),p.cellsMoved(c,f-t.x,l-t.y))}}function R(){p.getModel().beginUpdate();try{P(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){G=!1;try{Editor.enableNativeCipboard&&(m.readGraphModelFromClipboard(function(c){if(null!=c){p.getModel().beginUpdate();try{P(m.pasteXml(c,!0))}finally{p.getModel().endUpdate()}}else R()}),G=!0)}catch(c){}G||R()}});this.addAction("swap",function(){var G=p.getSelectionCells();2==G.length&&p.swapShapes(G[0],+G[1])});this.addAction("copySize",function(){var G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.getModel().isVertex(G)&&(G=p.getCellGeometry(G),null!=G&&(m.copiedSize=new mxRectangle(G.x,G.y,G.width,G.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedSize){p.getModel().beginUpdate();try{for(var G=p.getResizableCells(p.getSelectionCells()),P=0;P<G.length;P++)if(p.getModel().isVertex(G[P])){var R=p.getCellGeometry(G[P]);+null!=R&&(R=R.clone(),R.width=m.copiedSize.width,R.height=m.copiedSize.height,p.getModel().setGeometry(G[P],R))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var G=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&null!=G&&(G=G.cloneValue(),null==G||isNaN(G.nodeType)||(m.copiedValue=G))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G)try{p.isHtmlLabel(G)?m.writeHtmlToClipboard(p.getLabel(G),+mxUtils.bind(this,function(P){m.handleError(P)})):m.writeTextToClipboard(p.getLabel(G),mxUtils.bind(this,function(P){m.handleError(P)}))}catch(P){m.handleError(P)}});this.addAction("pasteData",function(G,P){function R(l,t){var z=c.getValue(l);t=l.cloneValue(t);t.removeAttribute("placeholders");null==z||isNaN(z.nodeType)||t.setAttribute("placeholders",z.getAttribute("placeholders"));null!=G&&mxEvent.isShiftDown(G)||t.setAttribute("label",p.convertValueToString(l));c.setValue(l,t)}G=null!=P?P:G;var c=+p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=m.copiedValue){c.beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)R(c.getRoot(),m.copiedValue);else for(P=0;P<f.length;P++)R(f[P],m.copiedValue)}finally{c.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(G,P){G=null!=P?P:G;null!=G&&mxEvent.isShiftDown(G)?e():b(null!=G&&(mxEvent.isControlDown(G)||mxEvent.isMetaDown(G)||mxEvent.isAltDown(G)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(G){m.handleError(G)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var G=m.getSelectionState();if(null!=G.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",G.rowspan,[G.mergeCell]),p.setCellStyles("colspan",-G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=m.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,O){G=null!=O?O:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),+G.colspan,[G.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var G=m.getSelectionState();if(0<G.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,G.cells),p.setCellStyles("colspan",null,G.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(G,P){G=null!=P?P:G;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=G?mxEvent.isShiftDown(G):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(G){G=p.getSelectionCell();p.isEnabled()&&null!=G&&p.addSelectionCells(p.getEdges(G))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,-!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),O=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(O,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,+!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(p.getSelectionCell()),R=1==mxUtils.getValue(P,mxConstants.STYLE_EDITABLE,1)?0:1;p.setCellStyles(mxConstants.STYLE_MOVABLE,R,G);p.setCellStyles(mxConstants.STYLE_RESIZABLE,R,G);p.setCellStyles(mxConstants.STYLE_ROTATABLE,R,G);p.setCellStyles(mxConstants.STYLE_DELETABLE,R,G);p.setCellStyles(mxConstants.STYLE_EDITABLE,R,G);p.setCellStyles("locked",1==R?0:1,G);p.setCellStyles("connectable",R,G)}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){p.model.isVertex(p.getSelectionCell())&&Graph.exploreFromCell(m.editor.graph,m.editor.graph.getSelectionCell())});this.addAction("home",function(){p.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){p.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){p.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){p.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){p.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(G){p.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(G){p.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(p.isEnabled()){var G=mxUtils.sortCells(p.getSelectionCells(),!0);1!=G.length||p.isTable(G[0])||p.isTableRow(G[0])?(G=p.getCellsForGroup(G),1<G.length&&p.setSelectionCell(p.groupCells(null,0,G))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",-function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var O=p.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)p.model.contains(G[R])&&(0==p.model.getChildCount(G[R])&&p.model.isVertex(G[R])&&p.setCellStyles("container","0",[G[R]]),O.push(G[R]))}finally{p.model.endUpdate()}0<O.length&&p.setSelectionCells(O)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var O=-[],R=0;R<G.length;R++)p.isTableRow(G[R])||p.isTableCell(G[R])||O.push(G[R]);p.removeCellsFromParent(O);0<O.length&&p.scrollCellToVisible(O[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var O=-"";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(O=R)}O=new TextareaDialog(m,mxResources.get("editTooltip")+":",O,function(c){p.setTooltipForCell(G,c)});m.showDialog(O.container,320,200,!0,!0);O.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());-null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var O=p.getLinkForCell(G,!0)||"";m.showLinkDialog(O,mxResources.get("ok"),function(R,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<R.length?R:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&-!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,O,R){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=O&&0<O.length&&(c=O[0].iconUrl,f=O[0].name||O[0].type,f=f.charAt(0).toUpperCase()+-f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));O=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));O.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([O],!0));O.geometry.x=c.x;O.geometry.y=c.y;p.setAttributeForCell(O,"linkTarget",R);p.setLinkForCell(O,G);p.cellSizeUpdated(O,!0);p.getModel().beginUpdate();try{O=p.addCell(O),-p.fireEvent(new mxEventObject("cellsInserted","cells",[O]))}finally{p.getModel().endUpdate()}p.setSelectionCell(O);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),O=p.getParentByName(G,"A",p.cellEditor.textarea),R="";if(null==O&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==O;f++)c[f].textContent==-G.textContent&&(O=c[f]);null!=O&&"A"==O.nodeName&&(R=O.getAttribute("href")||"",p.selectNode(O));var l=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=-G[O];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var O=p.getEditableCells(p.getSelectionCells()),-R=0;R<O.length;R++)if(state=p.getView().getState(O[R]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[O[R]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[O[R]])}}m.fireEvent(new mxEventObject("styleChanged",-"keys",["html"],"values",[null!=G?G:"0"],"cells",O))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),O="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(O=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,O)});this.addAction("rotation",function(){var G="0",O=p.getView().getState(p.getSelectionCell());null!=O&&(G=O.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(m,G,mxResources.get("apply"),+function(){if(p.isEnabled()){var G=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var P=p.ungroupCells();if(null!=G)for(var R=0;R<G.length;R++)p.model.contains(G[R])&&(0==p.model.getChildCount(G[R])&&p.model.isVertex(G[R])&&p.setCellStyles("container","0",[G[R]]),P.push(G[R]))}finally{p.model.endUpdate()}0<P.length&&p.setSelectionCells(P)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var G=p.getSelectionCells();if(null!=G){for(var P=+[],R=0;R<G.length;R++)p.isTableRow(G[R])||p.isTableCell(G[R])||P.push(G[R]);p.removeCellsFromParent(P);0<P.length&&p.scrollCellToVisible(P[0])}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var G=p.getSelectionCell()||p.getModel().getRoot();m.showDataDialog(G)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=+"";if(mxUtils.isNode(G.value)){var R=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&G.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(R=G.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==R&&(R=G.value.getAttribute("tooltip"));null!=R&&(P=R)}P=new TextareaDialog(m,mxResources.get("editTooltip")+":",P,function(c){p.setTooltipForCell(G,c)});m.showDialog(P.container,320,200,!0,!0);P.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var G=p.getLinkForCell(p.getSelectionCell());+null!=G&&p.openLink(G)});this.addAction("editLink...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&null!=G&&p.isCellEditable(G)){var P=p.getLinkForCell(G,!0)||"";m.showLinkDialog(P,mxResources.get("ok"),function(R,c,f){p.getModel().beginUpdate();try{p.setLinkForCell(G,0<R.length?R:null),p.setAttributeForCell(G,"linkTarget",f)}finally{p.getModel().endUpdate()}},!0,p.getLinkTargetForCell(G))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&+!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),m.actions.get("image").funct())})).isEnabled=B;this.addAction("editImage...",function(){m.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&m.showLinkDialog("",mxResources.get("ok"),function(G,P,R){G=mxUtils.trim(G);if(0<G.length){var c=null,f=p.getLinkTitle(G);null!=P&&0<P.length&&(c=P[0].iconUrl,f=P[0].name||P[0].type,f=f.charAt(0).toUpperCase()++f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));P=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=c?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+c:"spacing=10;"));P.vertex=!0;c=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([P],!0));P.geometry.x=c.x;P.geometry.y=c.y;p.setAttributeForCell(P,"linkTarget",R);p.setLinkForCell(P,G);p.cellSizeUpdated(P,!0);p.getModel().beginUpdate();try{P=p.addCell(P),+p.fireEvent(new mxEventObject("cellsInserted","cells",[P]))}finally{p.getModel().endUpdate()}p.setSelectionCell(P);p.scrollCellToVisible(p.getSelectionCell())}},!0)},null,null,"L")).isEnabled=B;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var G=p.getSelectedElement(),P=p.getParentByName(G,"A",p.cellEditor.textarea),R="";if(null==P&&null!=G&&null!=G.getElementsByTagName)for(var c=G.getElementsByTagName("a"),f=0;f<c.length&&null==P;f++)c[f].textContent==+G.textContent&&(P=c[f]);null!=P&&"A"==P.nodeName&&(R=P.getAttribute("href")||"",p.selectNode(P));var l=p.cellEditor.saveSelection();m.showLinkDialog(R,mxResources.get("ok"),mxUtils.bind(this,function(t){p.cellEditor.restoreSelection(l);null!=t&&p.insertLink(t)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=B;this.addAction("autosize",function(){var G=p.getSelectionCells();if(null!=G){p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=+G[P];p.getModel().isVertex(R)&&(0<p.getModel().getChildCount(R)?p.updateGroupBounds([R],0,!0):p.updateCellSize(R))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var G=p.getCommonStyle(p.getSelectionCells());G="1"==mxUtils.getValue(G,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var P=p.getEditableCells(p.getSelectionCells()),+R=0;R<P.length;R++)if(state=p.getView().getState(P[R]),null!=state){var c=mxUtils.getValue(state.style,"html","0");if("1"==c&&null==G)p.removeTextStyleForCell(state.cell),p.setCellStyles("html",G,[P[R]]);else if("0"==c&&"1"==G){var f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>"));p.cellLabelChanged(state.cell,Graph.sanitizeHtml(f));p.setCellStyles("html",G,[P[R]])}}m.fireEvent(new mxEventObject("styleChanged",+"keys",["html"],"values",[null!=G?G:"0"],"cells",P))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var G=p.getView().getState(p.getSelectionCell()),P="wrap";p.stopEditing();null!=G&&"wrap"==G.style[mxConstants.STYLE_WHITE_SPACE]&&(P=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,P)});this.addAction("rotation",function(){var G="0",P=p.getView().getState(p.getSelectionCell());null!=P&&(G=P.style[mxConstants.STYLE_ROTATION]||G);G=new FilenameDialog(m,G,mxResources.get("apply"),function(R){null!=R&&0<R.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,R)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");m.showDialog(G.container,375,80,!0,!0);G.init()});this.addAction("resetView",function(){p.zoomTo(1);m.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(G){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,m.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(G){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,m.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){p.pageVisible&&p.isSelectionEmpty()?p.fitPages():m.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(2):this.get("pageView").funct()}),-null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(O){O=parseInt(O);!isNaN(O)&&0<O&&p.zoomTo(O/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,-300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(O){O=parseInt(O);!isNaN(O)&&0<O&&(O=new ChangePageSetup(m,null,null,null,O/100),O.ignoreColor=!0,O.ignoreImage=!0,p.model.execute(O))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}));var H=null;H=this.addAction("grid",+null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){p.pageVisible?p.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&p.zoomTo(P/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(G.container,+300,80,!0,!0);G.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var G=new FilenameDialog(this.editorUi,parseInt(100*p.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(P){P=parseInt(P);!isNaN(P)&&0<P&&(P=new ChangePageSetup(m,null,null,null,P/100),P.ignoreColor=!0,P.ignoreImage=!0,p.model.execute(P))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(G.container,300,80,!0,!0);G.init()}));var H=null;H=this.addAction("grid",function(){p.setGridEnabled(!p.isGridEnabled());p.defaultGridEnabled=p.isGridEnabled();m.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.isGridEnabled()});H.setEnabled(!1);H=this.addAction("guides",function(){p.graphHandler.guidesEnabled=!p.graphHandler.guidesEnabled;m.fireEvent(new mxEventObject("guidesEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});H.setEnabled(!1);H=this.addAction("animations",function(){Editor.enableAnimations=!Editor.enableAnimations;m.fireEvent(new mxEventObject("enableAnimationsChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return Editor.enableAnimations});H=this.addAction("tooltips",function(){p.tooltipHandler.setEnabled(!p.tooltipHandler.isEnabled());m.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.tooltipHandler.isEnabled()});H=this.addAction("collapseExpand",function(){var G=new ChangePageSetup(m);G.ignoreColor=!0;G.ignoreImage=!0;G.foldingEnabled=!p.foldingEnabled;p.model.execute(G)});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.foldingEnabled});H.isEnabled=B;H=this.addAction("pageView",mxUtils.bind(this,function(){m.setPageVisible(!p.pageVisible)}));H.setToggleAction(!0);H.setSelectedCallback(function(){return p.pageVisible});H=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;m.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionArrowsEnabled});H=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());m.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});H=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());m.fireEvent(new mxEventObject("copyConnectChanged"))});H.setToggleAction(!0);H.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});H.isEnabled=B;H=this.addAction("autosave",function(){m.editor.setAutosave(!m.editor.autosave)});H.setToggleAction(!0);H.setSelectedCallback(function(){return m.editor.autosave});H.isEnabled=B;H.visible=!1;this.addAction("help",function(){var G="";mxResources.isLanguageSupported(mxClient.language)&&-(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));H=mxUtils.bind(this,function(G,O,R,c){return this.addAction(G,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,-O,f);(O&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(f,function(t){t.style.fontWeight=null;"B"==t.nodeName&&p.replaceElement(t)}):(O&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(t){t.style.fontStyle=null;"I"==t.nodeName&&p.replaceElement(t)}):(O&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(t){t.style.textDecoration=null;"U"==t.nodeName&&p.replaceElement(t)});for(var l=0;l<f.length;l++)0==p.model.getChildCount(f[l])&&+(G="_"+mxClient.language);p.openLink(RESOURCES_PATH+"/help"+G+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(m.showDialog((new AboutDialog(m)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));H=mxUtils.bind(this,function(G,P,R,c){return this.addAction(G,function(){if(null!=R&&p.cellEditor.isContentEditing())R();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,+P,f);(P&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?p.updateLabelElements(f,function(t){t.style.fontWeight=null;"B"==t.nodeName&&p.replaceElement(t)}):(P&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(t){t.style.fontStyle=null;"I"==t.nodeName&&p.replaceElement(t)}):(P&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(t){t.style.textDecoration=null;"U"==t.nodeName&&p.replaceElement(t)});for(var l=0;l<f.length;l++)0==p.model.getChildCount(f[l])&&p.autoSizeCell(f[l],!1)}finally{p.getModel().endUpdate()}}},null,null,c)});H("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");H("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");H("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){m.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000","default",p.shapeForegroundColor)});this.addAction("strokeColor...",function(){m.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("fillColor...",function(){m.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",p.shapeBackgroundColor)});this.addAction("gradientColor...",function(){m.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("backgroundColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,-"backcolor",null,"default",p.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("removeFormat",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&!p.isEditing()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.removeTextStyleForCell(G[O],!0)}finally{p.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,+"backcolor",null,"default",p.shapeBackgroundColor)});this.addAction("borderColor...",function(){m.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR,null,null,"default",p.shapeForegroundColor)});this.addAction("removeFormat",function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&!p.isEditing()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),P=0;P<G.length;P++)p.removeTextStyleForCell(G[P],!0)}finally{p.getModel().endUpdate()}}});this.addAction("vertical",function(){m.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){m.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("sharp",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});-this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),O=p.getCurrentCellStyle(G[0]),-R="1"==mxUtils.getValue(O,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,-"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),O="1";null!=G&&null!=p.getFoldingImage(G)&&(O="0");p.setCellStyles("collapsible",O);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[O],"cells",p.getSelectionCells()))});this.addAction("editStyle...",-mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var O=p.getModel();O=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",O.getStyle(G[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),G)},null,null,400,220);this.editorUi.showDialog(O.container,420,300,!0,!0);O.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var O=u.graph.selectionCellsHandler.getHandler(G);if(O instanceof mxEdgeHandler){var R=p.view.translate,c=p.view.scale,f=R.x;R=R.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,R+=l.y,G=-p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-R));O.addPointAt(O.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=-G[O];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var O=0;O<G.length;O++){var R=G[O];if(p.getModel().isEdge(R)){var c=p.getCellGeometry(R);+this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),p.setCellStyles(mxConstants.STYLE_CURVED,"0"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!p.isSelectionEmpty()&&p.isEnabled()){p.getModel().beginUpdate();try{var G=p.getSelectionCells(),P=p.getCurrentCellStyle(G[0]),+R="1"==mxUtils.getValue(P,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,R);p.setCellStyles(mxConstants.STYLE_CURVED,null);m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[R,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,+"1"),m.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var G=p.view.getState(p.getSelectionCell()),P="1";null!=G&&null!=p.getFoldingImage(G)&&(P="0");p.setCellStyles("collapsible",P);m.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[P],"cells",p.getSelectionCells()))});this.addAction("editStyle...",+mxUtils.bind(this,function(){var G=p.getEditableCells(p.getSelectionCells());if(null!=G&&0<G.length){var P=p.getModel();P=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",P.getStyle(G[0])||"",function(R){null!=R&&p.setCellStyle(mxUtils.trim(R),G)},null,null,400,220);this.editorUi.showDialog(P.container,420,300,!0,!0);P.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&m.setDefaultStyle(p.getSelectionCell())},+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&m.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var G=p.getSelectionCell();if(null!=G&&p.getModel().isEdge(G)){var P=u.graph.selectionCellsHandler.getHandler(G);if(P instanceof mxEdgeHandler){var R=p.view.translate,c=p.view.scale,f=R.x;R=R.y;G=p.getModel().getParent(G);for(var l=p.getCellGeometry(G);p.getModel().isVertex(G)&&null!=l;)f+=l.x,R+=l.y,G=+p.getModel().getParent(G),l=p.getCellGeometry(G);f=Math.round(p.snap(p.popupMenuHandler.triggerX/c-f));c=Math.round(p.snap(p.popupMenuHandler.triggerY/c-R));P.addPointAt(P.state,f,c)}}});this.addAction("removeWaypoint",function(){var G=m.actions.get("removeWaypoint");null!=G.handler&&G.handler.removePoint(G.handler.state,G.index)});this.addAction("clearAnchors",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=+G[P];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[R]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[R]))}}finally{p.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var G=p.getSelectionCells();if(null!=G){G=p.getEditableCells(p.addAllEdges(G));p.getModel().beginUpdate();try{for(var P=0;P<G.length;P++){var R=G[P];if(p.getModel().isEdge(R)){var c=p.getCellGeometry(R);null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(R,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,G-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,-mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",O=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=O&&(R=O.style[mxConstants.STYLE_IMAGE]||R,c=O.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();-m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ea=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ea.x;K[0].geometry.y=-ea.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var da=p.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var W=-p.getModel().getGeometry(ca);null!=W&&(W=W.clone(),W.width=t,W.height=z,p.getModel().setGeometry(ca,W))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var O=p.getCurrentCellStyle(G),R=O[mxConstants.STYLE_IMAGE],-c=O[mxConstants.STYLE_SHAPE];R&&"image"==c&&(O=new CropImageDialog(m,R,O[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(O.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",+mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",P=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=P&&(R=P.style[mxConstants.STYLE_IMAGE]||R,c=P.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();+m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var da=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=da.x;K[0].geometry.y=+da.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var ea=p.getCurrentCellStyle(K[0]);"image"!=ea[mxConstants.STYLE_SHAPE]&&"label"!=ea[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var W=+p.getModel().getGeometry(ca);null!=W&&(W=W.clone(),W.width=t,W.height=z,p.getModel().setGeometry(ca,W))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var P=p.getCurrentCellStyle(G),R=P[mxConstants.STYLE_IMAGE],+c=P[mxConstants.STYLE_SHAPE];R&&"image"==c&&(P=new CropImageDialog(m,R,P[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(P.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),-this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G&&null!=G.geometry){var O=-new ConnectionPointsDialog(m,G);m.showDialog(O.container,350,450,!0,!1,function(){O.destroy()});O.init()}},null,null,"Alt+Shift+Q").isEnabled=B};Actions.prototype.addAction=function(b,e,g,m,u){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,g,m,u))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};+this.outlineWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G&&null!=G.geometry){var P=+new ConnectionPointsDialog(m,G);m.showDialog(P.container,350,450,!0,!1,function(){P.destroy()});P.init()}},null,null,"Alt+Shift+Q").isEnabled=B};Actions.prototype.addAction=function(b,e,g,m,u){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,g,m,u))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,g,m,u){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=g?g:!0;this.iconCls=m;this.shortcut=u;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;DrawioFile.RESTRICT_EXPORT=!1;mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;@@ -3080,24 +3080,24 @@ function(B){g&&(window.clearTimeout(m),this.sync.cleanup(b,e,B))}),u,p):this.updDrawioFile.prototype.updateFile=function(b,e,g,m,u){null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",u,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(p){try{null!=g&&g()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[p]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=p?this.mergeFile(p,b,e,m,u):this.reloadFile(b,e))}catch(B){null!=e&&e(B)}}),e))};DrawioFile.prototype.mergeFile=function(b,e,g,m,u){try{var p=b.getShadowPages();if(null!=p&&0<p.length){var B=this.getShadowPages(),H=[this.ui.diffPages(null!=m?m:B,p)],S=this.ignorePatches(H);if(S)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var G=this.isModified()?this.ui.diffPages(B,-this.isRealtime()?this.ownPages:this.ui.pages):null,O=this.ui.patchPages(this.ui.clonePages(B),H[0]),R=this.ui.getHashValueForPages(O,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",O,"patches",H,"changes",G,"checksum",R,"current",c,"valid",R==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=R&&R!=c)this.checksumError(g,H,null,null,"mergeFile",+this.isRealtime()?this.ownPages:this.ui.pages):null,P=this.ui.patchPages(this.ui.clonePages(B),H[0]),R=this.ui.getHashValueForPages(P,{}),c=this.ui.getHashValueForPages(p,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",B,"pages",p,"patched",P,"patches",H,"changes",G,"checksum",R,"current",c,"valid",R==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",u);if(null!=R&&R!=c)this.checksumError(g,H,null,null,"mergeFile",R,c,b.getCurrentRevisionId());else{this.setShadowPages(p);if(null!=this.sync){var f=this.sync.patchRealtime(H,DrawioFile.LAST_WRITE_WINS?G:null,null,u);null==f||mxUtils.isEmptyObject(f)||H.push(f)}this.patch(H,DrawioFile.LAST_WRITE_WINS?G:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=g&&g(z);try{var l=this.getCurrentUser(),t=null!=l?l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),t,z)}catch(C){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(z){null!=g&&g(z)}};DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),g=e.document.createElement("mxfile");if(null!=b)for(var m=0;m<b.length;m++){var u=e.encode(new mxGraphModel(b[m].root));"1"!=urlParams.dev&&(u=this.ui.anonymizeNode(u,!0));u.setAttribute("id",b[m].getId());b[m].viewState&&this.ui.editor.graph.saveViewState(b[m].viewState,u,!0);g.appendChild(u)}return mxUtils.getPrettyXml(g)};DrawioFile.prototype.compressReportData=function(b,e,g){e=null!=e?e:1E4;null!=g&&null!=b&&b.length>g?b=b.substring(0,g)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};-DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),G=null!=S?S.id:"unknown",O=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,c=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):+DrawioFile.prototype.checksumError=function(b,e,g,m,u,p,B,H){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var S=this.getCurrentUser(),G=null!=S?S.id:"unknown",P=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",R=JSON.stringify(e).length,c=null;if(null!=e&&1E3>R){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);c=JSON.stringify(e);c=null!=c&&1E3>c.length?Graph.compress(c):null}this.getLatestVersion(mxUtils.bind(this,function(f){try{var l=null!=c?"report":"error",t=this.ui.getHashValueForPages(f.getShadowPages()),z="unknown",C="unknown",F="unknown";try{var N=null!=f.initialData&&0<f.initialData.length?mxUtils.parseXml(f.initialData).documentElement:null;null!=N&&(null!=N.getAttribute("version")&&(z=N.getAttribute("version")),null!=N.getAttribute("agent")&&(C=N.getAttribute("agent")),null!=N.getAttribute("type")&&(F=N.getAttribute("type")))}catch(K){}EditorUi.logError("Checksum "+-l+" in "+u,null,this.getMode()+"."+O,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+O,action:u,label:"user_"++l+" in "+u,null,this.getMode()+"."+P,"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=B?"-current_"+B:"")+(null!=H?"-rev_"+this.ui.hashValue(H):"")+(null!=t?"-latest_"+t:"")+"-latestRev_"+this.ui.hashValue(f.getCurrentRevisionId())+("-latestVersion_"+z)+("-latestAgent_"+C)+("-latestType_"+F));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+P,action:u,label:"user_"+G+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+R+"-patches_"+e.length+"-size_"+this.getSize()})}catch(K){}}),function(){})}catch(f){}};-DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),O=G.lastIndexOf(".");B="xml";0<O&&(B=G.substring(O));var R=null!=g?g.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()++DrawioFile.prototype.sendErrorReport=function(b,e,g,m){try{var u=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),B=this.getCurrentUser(),H=null!=B?this.ui.hashValue(B.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",G=this.getTitle(),P=G.lastIndexOf(".");B="xml";0<P&&(B=G.substring(P));var R=null!=g?g.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()+" ("+B+")\nUser="+H+S+"\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!=e?"\n\n"+e:"")+(null!=g?"\n\nError: "+g.message:"")+"\n\nStack:\n"+R+"\n\nShadow:\n"+u+"\n\nData:\n"+p,m)}catch(c){}};DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var g=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),m=this.ui.editor.graph,u=m.getSelectionCells(),p=m.getViewState(),B=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(H){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[g],"viewState",[p],"latestFile",H);null!=H?(this.ui.replaceFileData(H.getData(),[g]),this.ui.restoreViewState(B,p,u),this.setDescriptor(H.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var S=this.ui.getCurrentFile();null!=S&&(S.stats=this.stats,S.patch([g]),S.fileChanged());this.ui.restoreViewState(B,p,u);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(H){null!=e&&e(H)}};DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var g=0;g<b.length&&e;g++)e=e&&mxUtils.isEmptyObject(b[g]);return e};-DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,O=H.mathEnabled,R=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());R.apply(this,arguments)};H.model.beginUpdate();+DrawioFile.prototype.patch=function(b,e,g,m){if(null!=b){var u=this.ui.editor.undoManager,p=u.history.slice(),B=u.indexOfNextAdd,H=this.ui.editor.graph;H.container.style.visibility="hidden";var S=this.changeListenerEnabled;this.changeListenerEnabled=g;var G=H.foldingEnabled,P=H.mathEnabled,R=H.cellRenderer.redraw;H.cellRenderer.redraw=function(C){C.view.graph.isEditing(C.cell)&&(C.view.graph.scrollCellToVisible(C.cell),C.view.graph.cellEditor.resize());R.apply(this,arguments)};H.model.beginUpdate();try{if(g){for(var c=this.ui.pages.slice(),f=this.ui.currentPage,l=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),t=0;t<l.length;t++){var z=mxUtils.indexOf(this.ui.pages,l[t]);0>z?this.ui.insertPage(l[t],Math.min(t,this.ui.pages.length)):this.ui.movePage(z,t)}for(t=0;t<c.length;t++)0>mxUtils.indexOf(l,c[t])&&this.ui.removePage(c[t]);0<=mxUtils.indexOf(this.ui.pages,f)&&this.ui.selectPage(f,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,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);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)O!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);H.checkDefaultParent()}finally{H.container.style.visibility="";H.model.endUpdate();H.cellRenderer.redraw=R;this.changeListenerEnabled=S;g||(u.history=p,u.indexOfNextAdd=B,u.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)P!=H.mathEnabled?(this.ui.editor.updateGraphComponents(),H.refresh()):(G!=H.foldingEnabled?H.view.revalidate():H.view.validate(),H.sizeDidChange());null!=this.sync&&this.isRealtime()&&!m&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",g)}return b};DrawioFile.prototype.save=function(b,e,g,m,u,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",m,"overwrite",u,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!u&&this.invalidChecksum)if(null!=g)g({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=g)g({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(B){if(null!=g)g(B);else throw B;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};@@ -3148,7 +3148,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=newmxUtils.bind(this,function(e){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(g){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",g);b(e,g)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};DrawioFile.prototype.fileSaved=function(b,e,g,m,u,p,B){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;p=null!=p?p:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=g&&g()):this.sync.fileSaved(p,e,g,m,u,B)}catch(G){this.invalidChecksum=-this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}catch(O){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};+this.inConflictState=!0;this.descriptorChanged();null!=m&&m(G);try{var H=this.getCurrentUser(),S=null!=H?H.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),S,G)}catch(P){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(G){this.descriptorChanged(),null!=m&&m(G)}};DrawioFile.prototype.autosave=function(b,e,g,m){null==this.lastAutosave&&(this.lastAutosave=Date.now());var u=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var p=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==p&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var B=this.isAutosaveRevision();B&&(this.lastAutosaveRevision=(new Date).getTime());this.save(B,mxUtils.bind(this,function(H){this.autosaveCompleted();null!=g&&g(H)}),mxUtils.bind(this,function(H){null!=m&&m(H)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=g&&g(null)}catch(H){null!=m&&m(H)}}),u);this.autosaveThread=p;EditorUi.debug("DrawioFile.autosave",[this],"thread",p,"delay",b,"maxDelay",e,"actualDelay",u,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};@@ -3157,10 +3157,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(thisDrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,g){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,g,m,u,p,B){DrawioFile.call(this,b,e);this.title=g;this.mode=m?null:App.MODE_DEVICE;this.fileHandle=u;this.desc=p;this.editable=B};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,g,m,u){this.saveAs(this.title,e,g,m,u)};LocalFile.prototype.saveAs=function(b,e,g,m,u){this.saveFile(b,!1,e,g,null,m,u)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};-LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),O=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=+LocalFile.prototype.saveFile=function(b,e,g,m,u,p,B){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;u||this.updateFileData();var H=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var S=this.getData(),G=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=g&&g()}),P=mxUtils.bind(this,function(R){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var c=mxUtils.bind(this,function(l){this.savingFile=!1;null!=m&&m({error:l})});this.saveDraft(S);this.fileHandle.createWritable().then(mxUtils.bind(this,function(l){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[t],"conflict",this.desc.lastModified!=t.lastModified);B||this.desc.lastModified==t.lastModified?l.write(H?this.ui.base64ToBlob(R,"image/png"):R).then(mxUtils.bind(this,function(){l.close().then(mxUtils.bind(this,function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(z){try{var C=this.desc;this.savingFile=!1;this.desc=z;this.fileSaved(S,C,G,c);this.removeDraft()}catch(F){c(F)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(t){this.invalidFileHandle=!0;c(t)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(R,b,H?"image/png":"text/xml",H);else if(R.length<MAX_REQUEST_SIZE){var f=b.lastIndexOf(".");f=0<f?b.substring(f+1):"xml";-(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){O(R)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):O(S)};+(new mxXmlRequest(SAVE_URL,"format="+f+"&xml="+encodeURIComponent(R)+"&filename="+encodeURIComponent(b)+(H?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(R)}));G()}});H?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(R){P(R)}),m,this.ui.getCurrentFile()!=this?S:null,e.scale,e.border)):P(S)};LocalFile.prototype.rename=function(b,e,g){this.title=b;this.descriptorChanged();null!=e&&e()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";@@ -3241,34 +3241,34 @@ type:"bool",defVal:!1,isVisible:function(k,A){A=A.editorUi.editor.graph.model;redefVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\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, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#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,[email protected],default,#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,[email protected],default,#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,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';-Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var T=I.sets||[];I=I.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var U=T[P];switch(U.type){case "path":null!=I.stroke&&this._drawToContext(k,U,I);break;case "fillPath":this._drawToContext(k,U,I);break;case "fillSketch":this.fillSketch(k,U,I)}}};A.fillSketch=function(I,T,P){var U=k.state.strokeColor,X=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=P.fillWeight;-0>pa&&(pa=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,T,P);k.setDashed(ja);k.setStrokeWidth(X);k.setStrokeColor(U);k.setStrokeAlpha(aa)};A._drawToContext=function(I,T,P){I.begin();for(var U=0;U<T.ops.length;U++){var X=T.ops[U],aa=X.data;switch(X.op){case "move":I.moveTo(aa[0],aa[1]);break;case "bcurveTo":I.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":I.lineTo(aa[0],aa[1])}}I.end();-"fillPath"===T.type&&P.filled?I.fill():I.stroke()};return A};(function(){function k(U,X,aa){this.canvas=U;this.rc=X;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;+Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var U=I.sets||[];I=I.options||this.getDefaultOptions();for(var O=0;O<U.length;O++){var T=U[O];switch(T.type){case "path":null!=I.stroke&&this._drawToContext(k,T,I);break;case "fillPath":this._drawToContext(k,T,I);break;case "fillSketch":this.fillSketch(k,T,I)}}};A.fillSketch=function(I,U,O){var T=k.state.strokeColor,X=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=O.fillWeight;+0>pa&&(pa=O.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(O.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,U,O);k.setDashed(ja);k.setStrokeWidth(X);k.setStrokeColor(T);k.setStrokeAlpha(aa)};A._drawToContext=function(I,U,O){I.begin();for(var T=0;T<U.ops.length;T++){var X=U.ops[T],aa=X.data;switch(X.op){case "move":I.moveTo(aa[0],aa[1]);break;case "bcurveTo":I.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":I.lineTo(aa[0],aa[1])}}I.end();+"fillPath"===U.type&&O.filled?I.fill():I.stroke()};return A};(function(){function k(T,X,aa){this.canvas=T;this.rc=X;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,-k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(U,X){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=U?this.canvas.state.strokeColor===-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;U=null;(aa.filled=X)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(T,X){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=T?this.canvas.state.strokeColor===+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;T=null;(aa.filled=X)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);X=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==X?-1:X;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",X);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",X);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",X);X=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==X?-1:X;X=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==X&&(X="auto");"auto"==X&&(X=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&X.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&X.push(mxUtils.hex2rgb(Editor.darkColor)),X=-null!=aa.fill&&(null!=U||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=X;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],-this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(U,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,U,X),this.lastX=U,this.lastY=X)};k.prototype.moveTo=function(U,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,X),this.lastX=U,this.lastY=X,this.firstX=U,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,-arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(U,X,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,X,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(U,X,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,X,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(U,X,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);-else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,U,X,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(U,X,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,X,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(U,X,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,-arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+aa/2,X+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(U,X,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(U+pa,X),this.lineTo(U+aa-pa,X),this.quadTo(U+aa,X,U+aa,X+sa),this.lineTo(U+aa,X+ja-sa),this.quadTo(U+aa,X+ja,U+aa-pa,X+ja),this.lineTo(U+pa,X+ja),this.quadTo(U,X+ja,U,X+ja-sa),this.lineTo(U,X+sa),this.quadTo(U,X,U+pa,X))};k.prototype.drawPath=function(U){if(0<-this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var X in U)this.nextShape.options[X]=U[X];U.stroke!=mxConstants.NONE&&null!=U.stroke||delete this.nextShape.options.stroke;U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,+null!=aa.fill&&(null!=T||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=X;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(T,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,X),this.lastX=T,this.lastY=X)};k.prototype.moveTo=function(T,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,X),this.lastX=T,this.lastY=X,this.firstX=T,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(T,X,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,X,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(T,X,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,X,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(T,X,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);+else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,T,X,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(T,X,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,X,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(T,X,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+aa/2,X+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(T,X,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+pa,X),this.lineTo(T+aa-pa,X),this.quadTo(T+aa,X,T+aa,X+sa),this.lineTo(T+aa,X+ja-sa),this.quadTo(T+aa,X+ja,T+aa-pa,X+ja),this.lineTo(T+pa,X+ja),this.quadTo(T,X+ja,T,X+ja-sa),this.lineTo(T,X+sa),this.quadTo(T,X,T+pa,X))};k.prototype.drawPath=function(T){if(0<+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var X in T)this.nextShape.options[X]=T[X];T.stroke!=mxConstants.NONE&&null!=T.stroke||delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.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(U){return new k(U,Editor.createRoughCanvas(U),this)};var A=mxShape.prototype.createHandJiggle;-mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(U):this.createRoughCanvas(U)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,X,aa,ja,pa){null!=U.handJiggle&&U.handJiggle.passThrough||I.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=-function(U){var X=U.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==k&&!this.outline){U.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=U.setStrokeColor;U.setStrokeColor=function(){};var wa=U.setFillColor;U.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;T.apply(this,-arguments);U.handJiggle.passThrough=!1;U.setFillColor=wa;U.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;U.restore();aa&&null!=ja&&(U.addTolerance=function(){})}T.apply(this,arguments);U.addTolerance=X};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(U,X,aa,ja,pa,sa){null!=U.handJiggle&&U.handJiggle.constructor==k?(U.handJiggle.passThrough=!0,P.apply(this,arguments),U.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=-function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var T=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var U=0;U<T.length;U++)if("mxgraph"==T[U].getAttribute("class")){P.push(T[U]);-break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,I),0<T.length&&(k=mxUtils.parseXml(T),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(T=k.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&-(T=decodeURIComponent(T)),null!=T&&0<T.length)k=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(T=k.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);-var T=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<T.length?(A=Graph.decompress(T,null,A),null!=A&&0<A.length&&(P=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],I&&(P=Editor.parseDiagramNode(P,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(P,!0)),P=A.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),-null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var T=k.indexOf("stream",-I)+9;if(0<k.substring(I,T).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",T-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){T=k.indexOf("stream",I)+9;P=k.indexOf("endstream",T-1);T=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"});P=T.indexOf("/Subject <");if(0<P){I=T.substring(P+14,T.indexOf(">",P));if(null!=I){A=I;I=[];for(T=0;T<A.length;T+=2)P=A.substr(T,2),"00"!=P&&I.push(String.fromCharCode(parseInt(P,-16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";P=T=0;for(var U=[],X=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(I+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ja=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ja>P){A=k.substring(P,ja);break}}10==aa&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],U[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==A&&null!=-U&&(A=Editor.extractGraphModelFromXref(U));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=+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(T){return new k(T,Editor.createRoughCanvas(T),this)};var A=mxShape.prototype.createHandJiggle;+mxShape.prototype.createHandJiggle=function(T){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,X,aa,ja,pa){null!=T.handJiggle&&T.handJiggle.passThrough||I.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=+function(T){var X=T.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==k&&!this.outline){T.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=T.setStrokeColor;T.setStrokeColor=function(){};var wa=T.setFillColor;T.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;U.apply(this,+arguments);T.handJiggle.passThrough=!1;T.setFillColor=wa;T.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;T.restore();aa&&null!=ja&&(T.addTolerance=function(){})}U.apply(this,arguments);T.addTolerance=X};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,X,aa,ja,pa,sa){null!=T.handJiggle&&T.handJiggle.constructor==k?(T.handJiggle.passThrough=!0,O.apply(this,arguments),T.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),O=[];if(null!=U&&0<U.length)for(var T=0;T<U.length;T++)if("mxgraph"==U[T].getAttribute("class")){O.push(U[T]);+break}0<O.length&&(U=O[0].getAttribute("data-mxgraph"),null!=U?(O=JSON.parse(U),null!=O&&null!=O.xml&&(k=mxUtils.parseXml(O.xml),k=k.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&(U=mxUtils.getTextContent(O[0]),U=Graph.decompress(U,null,I),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&+(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(O=null,"diagram"==k.nodeName?O=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(O=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=O&&(k=Editor.parseDiagramNode(O,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);+var U=mxUtils.trim(mxUtils.getTextContent(k)),O=null;0<U.length?(A=Graph.decompress(U,null,A),null!=A&&0<A.length&&(O=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(O=k[0],I&&(O=Editor.parseDiagramNode(O,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(O,!0)),O=A.documentElement));return O};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),+null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var U=k.indexOf("stream",+I)+9;if(0<k.substring(I,U).indexOf("application#2Fvnd.jgraph.mxfile")){var O=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,O)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){U=k.indexOf("stream",I)+9;O=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,O)),{to:"string"});O=U.indexOf("/Subject <");if(0<O){I=U.substring(O+14,U.indexOf(">",O));if(null!=I){A=I;I=[];for(U=0;U<A.length;U+=2)O=A.substr(U,2),"00"!=O&&I.push(String.fromCharCode(parseInt(O,+16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";O=U=0;for(var T=[],X=null;O<k.length;){var aa=k.charCodeAt(O);O+=1;10!=aa&&(I+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=k.indexOf("%3C%2Fmxfile%3E",O)+15;O-=9;if(ja>O){A=k.substring(O,ja);break}}10==aa&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],T[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==A&&null!=+T&&(A=Editor.extractGraphModelFromXref(T));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(I=mxUtils.getTextContent(A[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&@@ -3284,52 +3284,52 @@ k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight)(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));-A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var T=k[I].indexOf(")");T=Editor.trimCssUrl(k[I].substring(0,T));var P=document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");A.parentNode.insertBefore(P,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";+A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var U=k[I].indexOf(")");U=Editor.trimCssUrl(k[I].substring(0,U));var O=document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",U);O.setAttribute("as","font");O.setAttribute("crossorigin","");A.parentNode.insertBefore(O,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],I=0;I<k;I++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+-" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(T=new mxCodec(I.ownerDocument),T.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var T=new mxCodec(I.ownerDocument);-T.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==-k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),I=0;I<A.length;I++)this.graph.addExtFont(A[I].name,A[I].url)}catch(P){console.log("ExtFonts format error: "+P.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(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=T&&I.setAttribute("backgroundImage",JSON.stringify(T));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",-this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),I.setAttribute("extFonts",T.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),-null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){T=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());-else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var T=null;Editor.doMathJaxRender=function(X){try{null==T?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):T!=X&&Editor.mathJaxQueue.push(X)}catch(aa){MathJax.typesetClear([X]),null!=aa.retry?(T=X,aa.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());I()})})["catch"](function(ja){console.log("Error in MathJax.retry: "++" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(U=new mxCodec(I.ownerDocument),U.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var U=new mxCodec(I.ownerDocument);+U.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==+k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),I=0;I<A.length;I++)this.graph.addExtFont(A[I].name,A[I].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(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=U&&I.setAttribute("backgroundImage",JSON.stringify(U));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",+this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),I.setAttribute("extFonts",U.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),+null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&+this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());+else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=function(X){try{null==U?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):U!=X&&Editor.mathJaxQueue.push(X)}catch(aa){MathJax.typesetClear([X]),null!=aa.retry?(U=X,aa.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());I()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+ja.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var X=0;X<Editor.mathJaxQueue.length;X++)Editor.doMathJaxRender(Editor.mathJaxQueue[X])}}};Editor.MathJaxRender=function(X){"undefined"!==typeof MathJax&&-"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var X=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var U=-document.createElement("script");U.setAttribute("type","text/javascript");U.setAttribute("src",k);A[0].parentNode.appendChild(U)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],T=0,P=!0,U;k=$jscomp.makeIterator(k);for(U=k.next();!U.done;U=k.next())U=U.value,'"'===U?(P&&U===A&&(I[T]+=U),P=!P):","===U&&P?U=I[++T]="":I[T]+=U,A=U;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&+"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var O=Editor.prototype.init;Editor.prototype.init=function(){O.apply(this,arguments);var X=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var T=+document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",k);A[0].parentNode.appendChild(T)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],U=0,O=!0,T;k=$jscomp.makeIterator(k);for(T=k.next();!T.done;T=k.next())T=T.value,'"'===T?(O&&T===A&&(I[U]+=T),O=!O):","===T&&O?T=I[++U]="":I[U]+=T,A=T;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.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(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(T){null!=T&&navigator.onLine&&("http://"!=T.substring(0,7)&&"https://"!=T.substring(0,8)||T.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&-I.isCorsEnabledForUrl(T)?"chrome-extension://"!=T.substring(0,19)&&(T=A.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T));return T};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,T,P){try{var U=!0,X=window.setTimeout(mxUtils.bind(this,function(){U=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=T?this.convertImageToDataUri(k,A,I,T,!0):A(k)});-if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(X);U&&(200>pa.getStatus()||299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);U&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(X);if(U)try{T=null!=T&&P?T:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(T,T);pa.height=ja.height*T;pa.width=-ja.width*T;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(X);U&&(null!=I?I():A(k))};ja.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,T){function P(){0<U.length?U.shift()():A(k)}null==T&&(T=this.createImageUrlConverter());var U=[],X=I||{};I=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){U.push(mxUtils.bind(this,function(){try{if(null!=-sa){var qa=T.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=X[qa];null==wa?this.convertImageToDataUri(qa,function(Ba){null!=Ba&&(X[qa]=Ba,sa.setAttribute(ja,Ba));P()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),P())}else null!=qa&&sa.setAttribute(ja,qa),P()}}catch(Ba){P()}}))})(aa[pa])});I("image","xlink:href");I("img","src");P()};Editor.base64Encode=function(k){for(var A="",I=0,T=k.length,P,U,X;I<T;){P=k.charCodeAt(I++)&255;if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>-2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);A+="==";break}U=k.charCodeAt(I++);if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);A+="=";break}X=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>-2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(X&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return A};Editor.prototype.loadUrl=function(k,A,I,T,P,U,X,aa){try{var ja=!X&&(T||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var pa=mxUtils.bind(this,-function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}U=null!=U?U:"data:image/png;base64,";qa=U+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?-I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){P&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),T=JSON.parse(I);-null!=T&&null!=T.error&&null!=T.error.message&&(A=T.error.message+" ("+A+")")}catch(P){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var T=null!=k?k.lastIndexOf("/"):-1;0<=T&&(k=k.substring(0,T+1));T=document.getElementsByTagName("base");var P=null;null!=T&&0<T.length&&(P=T[0].getAttribute("href"));for(var U=1;U<I.length;U++)if(T=I[U].indexOf(")"),0<T){var X=Editor.trimCssUrl(I[U].substring(0,-T));this.graph.isRelativeUrl(X)&&(X=null!=P?P+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);A.push('url("'+X+'"'+I[U].substring(T))}else A.push(I[U])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=-mxUtils.bind(this,function(){if(0==T){for(var ja=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);ja.push('"'+I[pa].substring(sa))}A(ja.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var U=I[k].indexOf(")"),X=null,aa=I[k].indexOf("format(",U);0<aa&&(X=Editor.trimCssUrl(I[k].substring(aa+7,I[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;T++;+return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&+I.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=A.apply(this,arguments)):U=PROXY_URL+"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,U,O){try{var T=!0,X=window.setTimeout(mxUtils.bind(this,function(){T=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(k,A,I,U,!0):A(k)});+if(/(\.svg)$/i.test(k)&&!O)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(X);T&&(200>pa.getStatus()||299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);T&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(X);if(T)try{U=null!=U&&O?U:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(U,U);pa.height=ja.height*U;pa.width=+ja.width*U;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(X);T&&(null!=I?I():A(k))};ja.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,U){function O(){0<T.length?T.shift()():A(k)}null==U&&(U=this.createImageUrlConverter());var T=[],X=I||{};I=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){T.push(mxUtils.bind(this,function(){try{if(null!=+sa){var qa=U.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=X[qa];null==wa?this.convertImageToDataUri(qa,function(Ba){null!=Ba&&(X[qa]=Ba,sa.setAttribute(ja,Ba));O()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),O())}else null!=qa&&sa.setAttribute(ja,qa),O()}}catch(Ba){O()}}))})(aa[pa])});I("image","xlink:href");I("img","src");O()};Editor.base64Encode=function(k){for(var A="",I=0,U=k.length,O,T,X;I<U;){O=k.charCodeAt(I++)&255;if(I==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4);A+="==";break}T=k.charCodeAt(I++);if(I==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);A+="=";break}X=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(X&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return A};Editor.prototype.loadUrl=function(k,A,I,U,O,T,X,aa){try{var ja=!X&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));O=null!=O?O:!0;var pa=mxUtils.bind(this,+function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}T=null!=T?T:"data:image/png;base64,";qa=T+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?+I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){O&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),U=JSON.parse(I);+null!=U&&null!=U.error&&null!=U.error.message&&(A=U.error.message+" ("+A+")")}catch(O){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var O=null;null!=U&&0<U.length&&(O=U[0].getAttribute("href"));for(var T=1;T<I.length;T++)if(U=I[T].indexOf(")"),0<U){var X=Editor.trimCssUrl(I[T].substring(0,+U));this.graph.isRelativeUrl(X)&&(X=null!=O?O+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);A.push('url("'+X+'"'+I[T].substring(U))}else A.push(I[T])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var O=+mxUtils.bind(this,function(){if(0==U){for(var ja=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);ja.push('"'+I[pa].substring(sa))}A(ja.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var T=I[k].indexOf(")"),X=null,aa=I[k].indexOf("format(",T);0<aa&&(X=Editor.trimCssUrl(I[k].substring(aa+7,I[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;var pa="application/x-font-ttf";if("svg"==X||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";else if("otf"==X||"embedded-opentype"==X||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==X||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==X||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==X||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==X||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,-ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=wa;T--;P()}),mxUtils.bind(this,function(wa){T--;P()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,U)),X)}P()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=-function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(I.join(""),k)}),U=0;U<A.length;U++)mxUtils.bind(this,function(X,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(T++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),-mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;I.push(ja+"\n");T--;P()}),mxUtils.bind(this,function(ja){T--;I.push("@import url("+aa+");\n");P()}))):I.push(this.cachedGoogleFonts[aa]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+aa+'")}\n')})(A[U].name,A[U].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var T=mxUtils.getTextContent(A[I]);-0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),T=A.split("\n");A=[];for(var P=[],U=0;U<T.length;U++)"@import"==T[U].substring(0,7)?A.push(T[U]):P.push(T[U]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,-A.join("\n")),I.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,P.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var T=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(T/k,T/A))};Editor.prototype.exportToCanvas=function(k,A,I,T,P,U,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{U=null!=U?U:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;wa=null!=-wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ja&&(Ca="dark"==Ea&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,X,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),-La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&(aa=U?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));-x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=P&&P(Xa)}};ua.onerror=function(Fa){null!=P&&P(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=P&&P(Fa)}});Ha.onerror=-function(Ra){null!=P&&P(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=P&&P(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=P&&P(Za)}}))}catch(Ra){null!=P&&P(Ra)}}),I,sa)}catch(Ma){null!=P&&P(Ma)}};Editor.crcTable=-[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,T){for(var P=0;P<T;P++)k=Editor.crcTable[(k^A.charCodeAt(I+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,T,P){function U(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function X(sa){sa=U(sa,4);return sa.charCodeAt(3)+-(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(U(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(U(k,4),"IHDR"!=U(k,4))null!=P&&P();else{U(k,17);P=k.substring(0,ja);do{var pa=X(k);if("IDAT"==U(k,4)){P=k.substring(0,ja-8);"pHYs"==A&&"dpi"==I?(I=Math.round(T/.0254),I=aa(I)+-aa(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,A,0,4);T=Editor.updateCRC(T,I,0,I.length);P+=aa(I.length)+A+I+aa(T^4294967295);P+=k.substring(ja-8,k.length);break}P+=k.substring(ja-8,ja-4+pa);U(k,pa);U(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;+ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=wa;U--;O()}),mxUtils.bind(this,function(wa){U--;O()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,T)),X)}O()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=+function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(I.join(""),k)}),T=0;T<A.length;T++)mxUtils.bind(this,function(X,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),+mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;I.push(ja+"\n");U--;O()}),mxUtils.bind(this,function(ja){U--;I.push("@import url("+aa+");\n");O()}))):I.push(this.cachedGoogleFonts[aa]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+aa+'")}\n')})(A[T].name,A[T].url);O()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var U=mxUtils.getTextContent(A[I]);+0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),U=A.split("\n");A=[];for(var O=[],T=0;T<U.length;T++)"@import"==U[T].substring(0,7)?A.push(U[T]):O.push(U[T]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,+A.join("\n")),I.appendChild(k));0<O.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,O.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var U=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(U/k,U/A))};Editor.prototype.exportToCanvas=function(k,A,I,U,O,T,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{T=null!=T?T:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;wa=null!=+wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==Ca&&0==ja&&(Ca="dark"==Ea&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,X,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),+La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&(aa=T?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));+x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=O&&O(Xa)}};ua.onerror=function(Fa){null!=O&&O(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=O&&O(Fa)}});Ha.onerror=+function(Ra){null!=O&&O(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=O&&O(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=O&&O(Za)}}))}catch(Ra){null!=O&&O(Ra)}}),I,sa)}catch(Ma){null!=O&&O(Ma)}};Editor.crcTable=+[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,U){for(var O=0;O<U;O++)k=Editor.crcTable[(k^A.charCodeAt(I+O))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,U,O){function T(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function X(sa){sa=T(sa,4);return sa.charCodeAt(3)++(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(T(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(T(k,4),"IHDR"!=T(k,4))null!=O&&O();else{T(k,17);O=k.substring(0,ja);do{var pa=X(k);if("IDAT"==T(k,4)){O=k.substring(0,ja-8);"pHYs"==A&&"dpi"==I?(I=Math.round(U/.0254),I=aa(I)++aa(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+U;U=4294967295;U=Editor.updateCRC(U,A,0,4);U=Editor.updateCRC(U,I,0,I.length);O+=aa(I.length)+A+I+aa(U^4294967295);O+=k.substring(ja-8,k.length);break}O+=k.substring(ja-8,ja-4+pa);T(k,pa);T(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var I=null;null!=k.editor.graph.getModel().getParent(A)?I=A.getId():null!=k.currentPage&&(I=k.currentPage.getId());-return I});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var O=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?O.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||-"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var T=A.getCurrentFile();null!=T&&T.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(X){A.editor.setAutosave(X);A.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(X){this.listener=function(){X(A.editor.autosave)};-A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(X){A.actions.get("mathematicalTypesetting").funct()},{install:function(X){this.listener=function(){X(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});-k.appendChild(P);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var U=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");U.style.position="absolute";U.style.left="85%";P.appendChild(U)}}return k};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=+return I});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var 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.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||+"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var U=A.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(X){A.editor.setAutosave(X);A.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(X){this.listener=function(){X(A.editor.autosave)};+A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var O=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(X){A.actions.get("mathematicalTypesetting").funct()},{install:function(X){this.listener=function(){X(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});+k.appendChild(O);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var T=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");T.style.position="absolute";T.style.left="85%";O.appendChild(T)}}return k};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,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},@@ -3353,94 +3353,94 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispNamestroke:"#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(k,A,I,T){if(null!=A){var P=mxUtils.bind(this,function(X){if(null!=X)if(I)for(var aa=0;aa<X.length;aa++){if("function"!==typeof X[aa].isVisible||X[aa].isVisible(T,this))A[X[aa].name]=X[aa]}else for(var ja in A){var pa=!1;for(aa=0;aa<X.length;aa++)if(X[aa].name==ja&&X[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),U=this.editorUi.editor.graph.view.getState(k);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||-[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),P(U.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{P(JSON.parse(k))}catch(X){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&-!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,T=k.edges,P=0;P<I.length;P++)this.findCommonProperties(I[P],A,0==P,k);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],A,0==I.length&&0==P,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;-StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,T){function P(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=+function(k,A,I,U){if(null!=A){var O=mxUtils.bind(this,function(X){if(null!=X)if(I)for(var aa=0;aa<X.length;aa++){if("function"!==typeof X[aa].isVisible||X[aa].isVisible(U,this))A[X[aa].name]=X[aa]}else for(var ja in A){var pa=!1;for(aa=0;aa<X.length;aa++)if(X[aa].name==ja&&X[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),T=this.editorUi.editor.graph.view.getState(k);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||+[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),O(T.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{O(JSON.parse(k))}catch(X){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&+!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,U=k.edges,O=0;O<I.length;O++)this.findCommonProperties(I[O],A,0==O,k);for(O=0;O<U.length;O++)this.findCommonProperties(U[O],A,0==I.length&&0==O,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;+StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,U){function O(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<-M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function U(Da,+M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function T(Da,x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function X(Da,x,M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background=-"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){P(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=-"1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);P(Da,+"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){O(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=+"1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);O(Da,Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==-x;mxEvent.addListener(Q,"change",function(){P(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);+x;mxEvent.addListener(Q,"change",function(){O(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(X(Da,x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",-mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;U(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=-null;P(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",+mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;T(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=+null;O(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<-M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}P(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");U(xa,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,-"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){P(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className=+M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}O(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");T(xa,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,+"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){O(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className="geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat="no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage="url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";-Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==I.vertices.length&&0==I.edges.length?Ea=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Ea=I.edges[0].id);null==Ea||T||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(T=A[Ha],"function"!=typeof T.isVisible||T.isVisible(I,this)){var Aa=null!=T.getValue?T.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]+-""):null!=T.getDefaultValue?T.getDefaultValue(I,this):T.defVal;if("separator"==T.type)Ma=!Ma;else{if("staticArr"==T.type)T.size=parseInt(I.style[T.sizeProperty]||A[T.sizeProperty].defVal)||0;else if(null!=T.dependentProps){var Ra=T.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=I.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}T.dependentPropsDefVal=La;T.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,T,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(T=Ba[Ea],-A=T.parentRow,I=0;I<T.values.length;I++)Ha=sa(T.name,T.values[I],{type:T.type,parentRow:T.parentRow,isDeletable:T.isDeletable,index:I,defVal:T.defVal,countProperty:T.countProperty,size:T.size},0==I%2,T.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",-function(){Ba.style.opacity="0.5"})},I=this.editorUi,T=I.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";P.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(P);var U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.position="relative";U.style.textAlign="center";U.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");-ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);X.push(ja);U.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=X[Ba]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&-(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(T.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:-"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";T.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Aa){T.getModel().beginUpdate();try{for(var Ra=I.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=T.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):-mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!T.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||-null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),T.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));T.getModel().setStyle(Ra[Za],La)}}finally{T.getModel().endUpdate()}}));Ca.className="geStyleButton";+Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==I.vertices.length&&0==I.edges.length?Ea=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Ea=I.edges[0].id);null==Ea||U||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(U=A[Ha],"function"!=typeof U.isVisible||U.isVisible(I,this)){var Aa=null!=U.getValue?U.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]++""):null!=U.getDefaultValue?U.getDefaultValue(I,this):U.defVal;if("separator"==U.type)Ma=!Ma;else{if("staticArr"==U.type)U.size=parseInt(I.style[U.sizeProperty]||A[U.sizeProperty].defVal)||0;else if(null!=U.dependentProps){var Ra=U.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=I.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}U.dependentPropsDefVal=La;U.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,U,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(U=Ba[Ea],+A=U.parentRow,I=0;I<U.values.length;I++)Ha=sa(U.name,U.values[I],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:I,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==I%2,U.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",+function(){Ba.style.opacity="0.5"})},I=this.editorUi,U=I.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";O.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(O);var T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");+ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);X.push(ja);T.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=X[Ba]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&+(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(U.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:+"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Aa){U.getModel().beginUpdate();try{for(var Ra=I.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=U.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):+mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!U.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||+null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(Ra[Za],La)}}finally{U.getModel().endUpdate()}}));Ca.className="geStyleButton";Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=-Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";P.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+-mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",P.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});P.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(P),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(X.length-1,Editor.isDarkMode()?+Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";O.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "++mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",O.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});O.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(O),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(X.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"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(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"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&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(U)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};+1<this.defaultColorSchemes.length&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=function(k,A){var I=Graph.fontMapping[A];null==I&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,I){if(null!=k&&0<k.length&&null!=-A&&0<A.length){var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var P=Graph.customFontElements[T];null!=P&&P.url!=A&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=A,"http:"==A.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(A)),P={name:k,url:A,elt:Graph.createFontElement(k,P)},Graph.customFontElements[T]=P,A=document.getElementsByTagName("head")[0],null!=I&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=I,P.elt.onerror=I):I()),null!=A&&A.appendChild(P.elt)):-null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var T="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=T&&Graph.addFont(T,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",-null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(T){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=-"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(P){A=P}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(P){A=null});this.isMouseInsertPoint=function(){return null!=-A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var U=this.graph.getCellStyle(P);if(null!=U&&"rack"==U.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;X.marginLeft=U.marginLeft||0;X.marginRight=U.marginRight||0;X.marginTop=-U.marginTop||0;X.marginBottom=U.marginBottom||0;X.allowGaps=U.allowGaps||0;X.horizontal="1"==mxUtils.getValue(U,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,T,P,U,X,aa,ja,-pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};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(k,A,I,T){function P(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function U(Ea){aa.setHiddenTags(Ea?[]:ja.slice());P();aa.refresh()}+A&&0<A.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var O=Graph.customFontElements[U];null!=O&&O.url!=A&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=A,"http:"==A.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(A)),O={name:k,url:A,elt:Graph.createFontElement(k,O)},Graph.customFontElements[U]=O,A=document.getElementsByTagName("head")[0],null!=I&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=I,O.elt.onerror=I):I()),null!=A&&A.appendChild(O.elt)):+null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var U="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=U&&Graph.addFont(U,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",+null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=+"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(O){A=O}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(O){A=null});this.isMouseInsertPoint=function(){return null!=+A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var T=this.graph.getCellStyle(O);if(null!=T&&"rack"==T.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;X.marginLeft=T.marginLeft||0;X.marginRight=T.marginRight||0;X.marginTop=+T.marginTop||0;X.marginBottom=T.marginBottom||0;X.allowGaps=T.allowGaps||0;X.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,U,O,T,X,aa,ja,+pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};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(k,A,I,U){function O(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function T(Ea){aa.setHiddenTags(Ea?[]:ja.slice());O();aa.refresh()}function X(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),La=document.createElement("td");La.style.align="center";La.style.width="16px";var $a=document.createElement("img");$a.setAttribute("src",Ra?Editor.visibleImage:Editor.hiddenImage);$a.setAttribute("title",mxResources.get(Ra?"hideIt":"show",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";La.appendChild($a);mxEvent.addListener($a,"click",function(x){mxEvent.isShiftDown(x)?-U(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),P(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=-"invert(100%)";mxEvent.addListener($a,"click",function(x){U(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,-"click",function(x){if(mxEvent.isShiftDown(x))U(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)U(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);P();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);+T(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),O(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=+"invert(100%)";mxEvent.addListener($a,"click",function(x){T(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,+"click",function(x){if(mxEvent.isShiftDown(x))T(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)T(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);O();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);$a.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";mxEvent.addListener($a,"click",function(x){var M=mxUtils.indexOf(ja,Ha);0<=M&&ja.splice(M,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[Ha]);aa.refresh();mxEvent.consume(x)});La.appendChild($a)}else{var Da=document.createElement("input");Da.setAttribute("type","checkbox");Da.style.margin="0px";Da.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Da.checked=Da.defaultChecked;Da.style.background="transparent";Da.setAttribute("title",mxResources.get(Da.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Da,"change",function(x){Da.checked?aa.addTagsForCells(aa.getSelectionCells(),[Ha]):aa.removeTagsForCells(aa.getSelectionCells(),[Ha]);mxEvent.consume(x)});La.appendChild(Da)}Za.appendChild(La)}Ca.appendChild(Za)})(Ea[Ma]);ya.appendChild(Ca);sa.appendChild(ya)}}var aa=this,ja=aa.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);aa.addListener(mxEvent.ROOT,function(){ja=aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?X(ja):X(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display="flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(aa.isEnabled()){sa.style.bottom="34px";var Ba=document.createElement("a");Ba.className="geToolbarButton geAdaptiveAsset geToggleItem";Ba.style.width="16px";Ba.style.height="18px";Ba.style.backgroundPosition="center center";Ba.style.backgroundRepeat=-"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());P();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=I&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage+-")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){I(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=T&&wa.appendChild(T);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=-Editor.guid();document.execCommand("fontname",!1,I);for(var T=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,U=0;U<T.length;U++)T[U].getAttribute("face")==I&&(P=!0,T[U].setAttribute("face",k),null!=A?T[U].setAttribute("data-font-src",A):T[U].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=+"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());O();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=I&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage++")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){I(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=U&&wa.appendChild(U);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=+Editor.guid();document.execCommand("fontname",!1,I);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),O=!1,T=0;T<U.length;T++)U[T].getAttribute("face")==I&&(O=!0,U[T].setAttribute("face",k),null!=A?U[T].setAttribute("data-font-src",A):U[T].removeAttribute("data-font-src"));O||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.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 k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=-function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,T,P,U,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,+function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,U,O,T,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),-ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var J=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){J.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ea=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=-function(){ea.apply(this,arguments);this.enumerationState=0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)++ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var J=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){J.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var da=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=+function(){da.apply(this,arguments);this.enumerationState=0};var ea=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return ea.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var I=k.view.scale,-T=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==T&&A.scale==I||(A.bounds=k,A.value=T,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),+U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==U&&A.scale==I||(A.bounds=k,A.value=U,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var W=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){W.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,I){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 T=!1,P=0,U=0,X=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<P&&P--;0==P&&pa()}),pa=mxUtils.bind(this,function(){if(U<k.length){var sa=this.stoppingCustomActions,qa=-k[U++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,-!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&+window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,O=0,T=0,X=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<O&&O--;0==O&&pa()}),pa=mxUtils.bind(this,function(){if(T<k.length){var sa=this.stoppingCustomActions,qa=+k[T++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),O++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,+!0)),qa.opacity.value);null!=qa.fadeIn&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(O++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(X(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){X();var Ba=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(X(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(X(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(X(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,-Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(P++,this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==P?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var T=document.createElement("div");-T.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var P=T.getElementsByTagName("a"),U=!1,X=0;X<P.length;X++)I=P[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(P[X].setAttribute("href",this.updateCustomLink(k,I)),U=!0);U&&this.labelChanged(A,T.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(T){}return A};-Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var T=A[I],P;for(P in T)this.updateCustomLinkAction(k,T[P],"cells"),this.updateCustomLinkAction(k,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var T=[],P=0;P<A[I].length;P++)if("*"==A[I][P])T.push(A[I][P]);else{var U=k[A[I][P]];null!=U?""!=U&&T.push(U):T.push(A[I][P])}A[I]=T}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,-null,A));if(null!=k.excludeCells){for(var I=[],T=0;T<A.length;T++)0>k.excludeCells.indexOf(A[T].id)&&I.push(A[T]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var T=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(U){return U!=T},T))}else{var P=this.model.getCell(k[I]);null!=P&&A.push(P)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&+Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(O++,this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==O?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var U=document.createElement("div");+U.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var O=U.getElementsByTagName("a"),T=!1,X=0;X<O.length;X++)I=O[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(O[X].setAttribute("href",this.updateCustomLink(k,I)),T=!0);T&&this.labelChanged(A,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(U){}return A};+Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var U=A[I],O;for(O in U)this.updateCustomLinkAction(k,U[O],"cells"),this.updateCustomLinkAction(k,U[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var U=[],O=0;O<A[I].length;O++)if("*"==A[I][O])U.push(A[I][O]);else{var T=k[A[I][O]];null!=T?""!=T&&U.push(T):U.push(A[I][O])}A[I]=U}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,+null,A));if(null!=k.excludeCells){for(var I=[],U=0;U<A.length;U++)0>k.excludeCells.indexOf(A[U].id)&&I.push(A[U]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var U=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(T){return T!=U},U))}else{var O=this.model.getCell(k[I]);null!=O&&A.push(O)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;-for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,T){var P=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var U=0,X={},aa=0;aa<k.length;aa++)0<k[aa].length&&(X[k[aa]]=!0,U++);for(aa=0;aa<A.length;aa++)if(I&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=-k.length)){for(var sa=pa=0;sa<ja.length&&pa<U;sa++)null!=X[ja[sa]]&&pa++;pa=pa==U}pa&&(1!=T||this.isCellVisible(A[aa]))&&P.push(A[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);I=[];if(0<P.length){P=P.split(" ");for(var U={},X=0;X<P.length;X++)if(null==A||null!=A[P[X]])U[P[X]]=!0,I.push(P[X]);-A=U}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);if(0<P.length){P=P.split(" ");for(var U=0;U<P.length;U++)null==I[P[U]]&&(I[P[U]]=!0,A.push(P[U]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var T=this.getTagsForCell(k[I]),-P=T.split(" "),U=!1,X=0;X<A.length;X++){var aa=mxUtils.trim(A[X]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(T=0<T.length?T+" "+aa:aa,U=!0)}U&&this.setAttributeForCell(k[I],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var T=this.getTagsForCell(k[I]);if(0<T.length){for(var P=T.split(" "),U=!1,X=0;X<A.length;X++){var aa=mxUtils.indexOf(P,A[X]);0<=aa&&(P.splice(aa,1),U=!0)}U&&this.setAttributeForCell(k[I],-"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,T){for(var P=0;P<k.length;P++)this.highlightCell(k[P],-A,I,T)};Graph.prototype.highlightCell=function(k,A,I,T,P){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var U=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),U=new mxCellHighlight(this,A,P,!1),null!=T&&(U.opacity=T),U.highlight(k),window.setTimeout(function(){null!=U.shape&&(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},-1200)},I));return U};Graph.prototype.addSvgShadow=function(k,A,I,T){I=null!=I?I:!1;T=null!=T?T:!0;var P=k.ownerDocument,U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");U.setAttribute("id",this.shadowId);var X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");U.appendChild(X);-X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");-U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");U.appendChild(X);X=k.getElementsByTagName("defs");-0==X.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=X[0];P.appendChild(U);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&T&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),-null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==+for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,U){var O=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var T=0,X={},aa=0;aa<k.length;aa++)0<k[aa].length&&(X[k[aa]]=!0,T++);for(aa=0;aa<A.length;aa++)if(I&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=+k.length)){for(var sa=pa=0;sa<ja.length&&pa<T;sa++)null!=X[ja[sa]]&&pa++;pa=pa==T}pa&&(1!=U||this.isCellVisible(A[aa]))&&O.push(A[aa])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],U=0;U<k.length;U++){var O=this.getTagsForCell(k[U]);I=[];if(0<O.length){O=O.split(" ");for(var T={},X=0;X<O.length;X++)if(null==A||null!=A[O[X]])T[O[X]]=!0,I.push(O[X]);+A=T}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},U=0;U<k.length;U++){var O=this.getTagsForCell(k[U]);if(0<O.length){O=O.split(" ");for(var T=0;T<O.length;T++)null==I[O[T]]&&(I[O[T]]=!0,A.push(O[T]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var U=this.getTagsForCell(k[I]),+O=U.split(" "),T=!1,X=0;X<A.length;X++){var aa=mxUtils.trim(A[X]);""!=aa&&0>mxUtils.indexOf(O,aa)&&(U=0<U.length?U+" "+aa:aa,T=!0)}T&&this.setAttributeForCell(k[I],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var U=this.getTagsForCell(k[I]);if(0<U.length){for(var O=U.split(" "),T=!1,X=0;X<A.length;X++){var aa=mxUtils.indexOf(O,A[X]);0<=aa&&(O.splice(aa,1),T=!0)}T&&this.setAttributeForCell(k[I],+"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,U){for(var O=0;O<k.length;O++)this.highlightCell(k[O],+A,I,U)};Graph.prototype.highlightCell=function(k,A,I,U,O){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var T=null;null!=k&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+O),T=new mxCellHighlight(this,A,O,!1),null!=U&&(T.opacity=U),T.highlight(k),window.setTimeout(function(){null!=T.shape&&(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},+1200)},I));return T};Graph.prototype.addSvgShadow=function(k,A,I,U){I=null!=I?I:!1;U=null!=U?U:!0;var O=k.ownerDocument,T=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");T.setAttribute("id",this.shadowId);var X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");T.appendChild(X);+X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feOffset"):O.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");T.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");+T.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feComposite"):O.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");T.appendChild(X);X=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");T.appendChild(X);X=k.getElementsByTagName("defs");+0==X.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"defs"):O.createElement("defs"),null!=k.firstChild?k.insertBefore(O,k.firstChild):k.appendChild(O)):O=X[0];O.appendChild(T);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),+null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var I=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=@@ -3453,33 +3453,33 @@ this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultPar"/ibm.xml"];mxStencilRegistry.libraries.ibmcloud=[STENCIL_PATH+"/ibm_cloud.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"];mxStencilRegistry.libraries.salesforce=-[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,T,P,U,X,aa,ja,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);-null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var ma=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,T,P,U){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ma.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I){function T(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,-Math.min(parseInt(Ba.value),parseInt(wa.value))))}function P(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=+[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,U,O,T,X,aa,ja,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);+null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var la=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,U,O,T){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return la.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I){function U(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,+Math.min(parseInt(Ba.value),parseInt(wa.value))))}function O(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=ia.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=oa.checked;k.lastPrintSheetsAcross=x.value;k.lastPrintSheetsDown=M.value;var Fa={};Fa.border=parseInt(Q.value);Fa.scale=parseInt(V.value)/100;Fa.grid=ia.checked;Fa.transparent=ka.checked;Fa.includeCopy=oa.checked;Fa.sheetsAcross=parseInt(x.value);Fa.sheetsDown=parseInt(M.value);Fa.pagesFrom=parseInt(wa.value);Fa.pagesTo=parseInt(Ba.value);Fa.allPages=sa.checked;Fa.selection=Ea.checked;Fa.pageView=ra.checked;Fa.crop=ya.checked;Fa.fit=-Ca.checked;return null!=I?I(!ua,Fa):k.print(!ua,Fa)}var U=k.editor.graph,X=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));X.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",+Ca.checked;return null!=I?I(!ua,Fa):k.print(!ua,Fa)}var T=k.editor.graph,X=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));X.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name","pages-printdialog");aa.appendChild(sa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){sa.checked=!0});aa.appendChild(A);mxUtils.br(aa);var qa=sa.cloneNode(!0);aa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");aa.appendChild(A);mxEvent.addListener(A,"click",function(){qa.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type",-"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ba,"change",T);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=+"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",U);mxEvent.addListener(Ba,"change",U);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(pa,Math.max(1,k.lastPrintPagesFromInput)),Ba.value=Math.min(pa,Math.max(1,k.lastPrintPagesToInput))):(wa.value=ja,Ba.value=ja);wa.setAttribute("max",pa);Ba.setAttribute("max",pa);za=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=ja;Ba.value=ja;qa.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";-za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&X.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";U.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");U.isEnabled()&&-(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(U.isEnabled()||1<pa)&&X.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=-"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");U.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));U.appendChild(A);mxEvent.addListener(U,"click",function(){ra.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");-U.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));U.appendChild(A);mxEvent.addListener(U,"click",function(){ya.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=-"2px";A.appendChild(Ca);U.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=+za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&X.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";T.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");T.isEnabled()&&+(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(T.isEnabled()||1<pa)&&X.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!T.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;T.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});T=document.createElement("div");T.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=+"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");T.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ra.checked=!0});X.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");+T.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ya.checked=!0});X.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=+"2px";A.appendChild(Ca);T.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(T,"click",function(ua){mxEvent.getSource(ua)!=Ca&&(Ca.checked=!Ca.checked)});var x=document.createElement("input");x.style.margin="0 2px";x.style.boxSizing="border-box";x.setAttribute("value",k.lastPrintSheetsAcross||"1");x.setAttribute("min","1");x.setAttribute("type","number");x.style.width="40px";Ra.appendChild(x);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Za.appendChild(A);mxUtils.write(La,mxResources.get("fitToBy"));var M=x.cloneNode(!0);M.setAttribute("value",k.lastPrintSheetsDown||"1");$a.appendChild(M);mxEvent.addListener(x,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(M,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?ya.checked=!0:k.lastPrintFitRadioChecked?Ca.checked=!0:ra.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));Da.appendChild(A);Ma.appendChild(Aa);Ma.appendChild(Ra);Ma.appendChild(Za);Ha.appendChild(La);Ha.appendChild($a);Ha.appendChild(Da);za.appendChild(Ma);za.appendChild(Ha);-aa.appendChild(za);U.appendChild(aa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;-U.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");U.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(V);mxUtils.br(U);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(ia);A=document.createElement("span");-A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));U.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(U.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),U.appendChild(A),-mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(A),mxEvent.addListener(A,-"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));X.appendChild(U);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&A.appendChild(U);PrintDialog.previewEnabled&&null==I&&(aa=mxUtils.button(mxResources.get("preview"),-function(){try{k.hideDialog(),P(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=I?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),P(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(U);X.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):+aa.appendChild(za);T.appendChild(aa);X.appendChild(T);T=document.createElement("div");T.style.borderTop="1px solid lightGray";T.style.whiteSpace="nowrap";T.style.paddingTop="12px";T.style.marginTop="12px";T.style.paddingLeft="8px";mxUtils.write(T,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;+T.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");T.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";T.appendChild(V);mxUtils.br(T);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;T.appendChild(ia);A=document.createElement("span");+A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));T.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(T.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),T.appendChild(A),+mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(T),T.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),T.appendChild(A),mxEvent.addListener(A,+"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));X.appendChild(T);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));T=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});T.className="geBtn";k.editor.cancelFirst&&A.appendChild(T);PrintDialog.previewEnabled&&null==I&&(aa=mxUtils.button(mxResources.get("preview"),+function(){try{k.hideDialog(),O(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=I?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),O(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(T);X.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Y=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 k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),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 la=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{la.getContext("2d").drawImage(Z,0,0);var k=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.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(k){}Editor.prototype.useCanvasForExport=+this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ma=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{ma.getContext("2d").drawImage(Z,0,0);var k=ma.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.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(k){}Editor.prototype.useCanvasForExport=!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.13";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.15";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;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))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");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"}};@@ -3489,7 +3489,7 @@ function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi."version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(f);if(null!=l&&"svg"==l.nodeName){l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily="initial";var t=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(l);c.hasAttribute("transform")&&t.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(t,c)}}catch(z){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var t=document.implementation.createHTMLDocument(""),-z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var J=K.selectorText.split(","),ea=0;ea<J.length;ea++)J[ea]="#"+l+" "+J[ea];K.selectorText=J.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';+z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var J=K.selectorText.split(","),da=0;da<J.length;da++)J[da]="#"+l+" "+J[da];K.selectorText=J.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};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.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=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;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;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(z){}try{var f=document.createElement("canvas"),@@ -3499,10 +3499,10 @@ f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalDatEditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var z=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(da){null!=da&&da()});z.spin=function(da,ca,W,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var ma=Date.now();null!=W&&(N=window.setTimeout(function(){z.stop();N=null;W({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,da);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(ea){null!=ea&&ea()});z.spin=function(ea,ca,W,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var la=Date.now();null!=W&&(N=window.setTimeout(function(){z.stop();N=null;W({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,ea);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),ha=document.createElement("div"),ha.className="geSpinnerStatus",ha.style.position="absolute",ha.style.whiteSpace="nowrap",ha.style.background="#4B4243",ha.style.color="white",ha.style.fontFamily=Editor.defaultHtmlFont,ha.style.fontSize="9pt",ha.style.padding="6px",ha.style.paddingLeft="10px",ha.style.paddingRight="10px",ha.style.zIndex=2E9,ha.style.left=Math.max(0,c)+"px",ha.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ha.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ha.style,-"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ha.innerHTML=mxUtils.htmlEntities(ca),da.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(ba=Math.max(0,ba-(Date.now()-ma)),Y=mxUtils.bind(this,function(la){this.spin(da,ca,W,ba);if(null!=la)try{la(),K=mxUtils.bind(this,function(){this.spin(da,ca,-W,ba);try{la()}catch(Z){null!=W&&W(Z)}})}catch(Z){null!=W&&W(Z)}}));this.stop();return Y});ha=!0}return ha};var ea=z.stop;z.stop=function(){ea.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=+"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ha.innerHTML=mxUtils.htmlEntities(ca),ea.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(ba=Math.max(0,ba-(Date.now()-la)),Y=mxUtils.bind(this,function(ma){this.spin(ea,ca,W,ba);if(null!=ma)try{ma(),K=mxUtils.bind(this,function(){this.spin(ea,ca,+W,ba);try{ma()}catch(Z){null!=W&&W(Z)}})}catch(Z){null!=W&&W(Z)}}));this.stop();return Y});ha=!0}return ha};var da=z.stop;z.stop=function(){da.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,z=this;f.getFunction=function(C){if(t.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var F=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<F&&z.movePage(F,F-1)};if(38==C.keyCode)return function(){0<F&&z.movePage(F,0)};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.movePage(F,F+1)};if(40==C.keyCode)return function(){F<@@ -3511,13 +3511,13 @@ mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetC=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var F=this.updatePageRoot(new DiagramPage(z[C]));null==F.getName()&&F.setName(mxResources.get("pageWithNumber",[C+1]));l.model.execute(new ChangePage(this,F,0==C?F:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,-l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;ea=null!=ea?ea:!Editor.defaultCompressed;var W=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=-"_blank";else W=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(ea){var ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());ma.appendChild(c)}else{ma=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(ma);if(Graph.decompress(ha)!=ma)return ma;ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());-mxUtils.setTextContent(ma,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(ma)}J?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),-ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=da&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",da));null!=ca&&-(ha=ha.cloneNode(!0),ha.setAttribute("border",ca));c=ea?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,W);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,W,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=-function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var J=K.getElementsByTagName("mxGraphModel"),ea=0<J.length?J[0]:null;J=K;null==ea&&l?(ea=mxUtils.getNodeValue(K),0<ea.length&&(ea=Graph.decompress(ea),null!=ea&&0<ea.length&&(J=K.cloneNode(!1),J.appendChild(mxUtils.parseXml(ea).documentElement)))):null==ea||l?J=K.cloneNode(!0):(J=K.cloneNode(!1),mxUtils.setTextContent(J,-Graph.compressNode(ea)));z.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&+l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;da=null!=da?da:!Editor.defaultCompressed;var W=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=+"_blank";else W=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(da){var la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());la.appendChild(c)}else{la=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(la);if(Graph.decompress(ha)!=la)return la;la=c.ownerDocument.createElement("diagram");la.setAttribute("name",mxResources.get("pageWithNumber",[1]));la.setAttribute("id",Editor.guid());+mxUtils.setTextContent(la,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(la)}J?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),+ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=ea&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",ea));null!=ca&&+(ha=ha.cloneNode(!0),ha.setAttribute("border",ca));c=da?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,W);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,W,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=+function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var J=K.getElementsByTagName("mxGraphModel"),da=0<J.length?J[0]:null;J=K;null==da&&l?(da=mxUtils.getNodeValue(K),0<da.length&&(da=Graph.decompress(da),null!=da&&0<da.length&&(J=K.cloneNode(!1),J.appendChild(mxUtils.parseXml(da).documentElement)))):null==da||l?J=K.cloneNode(!0):(J=K.cloneNode(!1),mxUtils.setTextContent(J,+Graph.compressNode(da)));z.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(C.root)),this.editor.graph.saveViewState(C.viewState,N,null,t),F=F.cloneNode(!1),F.appendChild(N)));c(F)}return z};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],t=0;t<c.length;t++){var z=c.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?l.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):z.toUpperCase()!=z?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(C){c[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var t in c[EditorUi.DIFF_UPDATE]){var z=@@ -3525,9 +3525,9 @@ c[EditorUi.DIFF_UPDATE][t];null!=z.name&&(z.name=this.anonymizeString(z.name));ndelete z.cells);mxUtils.isEmptyObject(z)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==-DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var W=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=-this.pages[0]){var ba=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());W.setBackgroundImage=this.editor.graph.setBackgroundImage;W.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?W.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&W.setBackgroundImage(ha.viewState.backgroundImage);W.getGlobalVariable=function(ma){return"page"==ma&&null!=ha?ha.getName():"pagenumber"==ma?1:-ba.apply(this,arguments)};document.body.appendChild(W.container);null!=ha&&W.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,J,ea);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,W,K,window.location.href,c,f,l,t,z,N,J,da,ca);W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var W=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=+this.pages[0]){var ba=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());W.setBackgroundImage=this.editor.graph.setBackgroundImage;W.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?W.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&W.setBackgroundImage(ha.viewState.backgroundImage);W.getGlobalVariable=function(la){return"page"==la&&null!=ha?ha.getName():"pagenumber"==la?1:+ba.apply(this,arguments)};document.body.appendChild(W.container);null!=ha&&W.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,J,da);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,W,K,window.location.href,c,f,l,t,z,N,J,ea,ca);W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var K=f.view.scale;C=Math.floor(F.x/K-f.view.translate.x);K=Math.floor(F.y/K-f.view.translate.y);F=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=z&&(z=z.replace(/&/g,"&"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+(null==z&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};@@ -3536,23 +3536,23 @@ EditorUi.prototype.getHtml2=function(c,f,l,t,z){f=window.DRAWIO_VIEWER_URL||Editz+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")+" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),l={},0<c.length)){var t=this.getHashObject(),z=null;this.fileNode=f;this.pages=[];for(var C=0;C<c.length;C++){null==c[C].getAttribute("id")&&c[C].setAttribute("id",C);f=new DiagramPage(c[C]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[C+1]));this.pages.push(f);if(null==t.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||null!=t.pageId&&f.getId()==t.pageId)z=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);-this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var J=K[C];N.setVisible(J,f[J.id]||!1)}}catch(ea){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();+this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var J=K[C];N.setVisible(J,f[J.id]||!1)}}catch(da){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,t,z,-C,F,N,K,J,ea,da,ca,W,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ma=this.getBaseFilename(!z),Y=ma+("xml"==c||"pdf"==c&&ea?".drawio":"")+"."+c;if("xml"==c){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,la,"text/xml")}else if("html"==c)la=this.getHtml2(this.getFileData(!0),this.editor.graph,ma),this.saveData(Y,c,la,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==-c?Y=ma+".png":"jpeg"==c&&(Y=ma+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(T,P){try{return this.createDownloadRequest(T,c,t,P,F,z,N,K,J,ea,da,void 0,void 0,!C,ca,W,ba,ha)}catch(U){this.handleError(U)}}));else{var Z=null,k=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;-if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else Y=ma+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();k(T)}),t)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,-J,ea,da,ca,W,ba,ha,ma,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha,ma,Y);f="";for(var la in c)l=c[la],null!=l&&(f+=la+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha,ma,Y){var la=this.editor.graph,Z=la.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&-(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=ea?(k=ea.from,A=ea.to):0==C&&(I="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=la.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:la.getExportVariables()};-K&&(z.grid={size:la.gridSize,steps:la.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:la.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:da&&isFinite(da)?da:null,h:ca&&isFinite(ca)?ca:null,crop:null!=W&&W?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:ma,+C,F,N,K,J,da,ea,ca,W,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var la=this.getBaseFilename(!z),Y=la+("xml"==c||"pdf"==c&&da?".drawio":"")+"."+c;if("xml"==c){var ma=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,ma,"text/xml")}else if("html"==c)ma=this.getHtml2(this.getFileData(!0),this.editor.graph,la),this.saveData(Y,c,ma,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==+c?Y=la+".png":"jpeg"==c&&(Y=la+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(U,O){try{return this.createDownloadRequest(U,c,t,O,F,z,N,K,J,da,ea,void 0,void 0,!C,ca,W,ba,ha)}catch(T){this.handleError(T)}}));else{var Z=null,k=mxUtils.bind(this,function(U){U.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;+if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(U){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(U))})))}else Y=la+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(U){this.spinner.stop();k(U)}),t)}}catch(U){this.handleError(U)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,+J,da,ea,ca,W,ba,ha,la,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha,la,Y);f="";for(var ma in c)l=c[ma],null!=l&&(f+=ma+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha,la,Y){var ma=this.editor.graph,Z=ma.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&+(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=da?(k=da.from,A=da.to):0==C&&(I="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=ma.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:ma.getExportVariables()};+K&&(z.grid={size:ma.gridSize,steps:ma.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:ma.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:ea&&isFinite(ea)?ea:null,h:ca&&isFinite(ca)?ca:null,crop:null!=W&&W?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:la,sheetsDown:Y}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,ea=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(W){ca===this.currentPage&&(200<=W.getStatus()&&300>=W.getStatus()?(this.updateDiagram(W.getText()),da()):this.handleError({message:mxResources.get("error")+" "+W.getStatus()}))}),mxUtils.bind(this,-function(W){this.handleError(W)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(ea,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ea()}));da();ea()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,da=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(W){ca===this.currentPage&&(200<=W.getStatus()&&300>=W.getStatus()?(this.updateDiagram(W.getText()),ea()):this.handleError({message:mxResources.get("error")+" "+W.getStatus()}))}),mxUtils.bind(this,+function(W){this.handleError(W)}))}),ea=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(da,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ea();da()}));ea();da()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,I){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var J=mxUtils.parseXml(K).documentElement;-if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var ea=J.attributes,da=0;da<ea.length;da++)z.setAttributeForCell(N,ea[da].nodeName,0<ea[da].nodeValue.length?ea[da].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var W=c.getAttribute("icon");if(null!=W){var ba=0<W.length?JSON.parse(W):-null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var ma=z.getCellGeometry(N);if(null!=ma){ma=ma.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?ma.x+=Y:"dy"==key?ma.y+=Y:"dw"==key?ma.width+=Y:"dh"==key?ma.height+=Y:ma[key]=parseFloat(ha[key])}z.model.setGeometry(N,ma)}}}catch(Z){null!=window.console&&console.log("Error in icon for "+-N.id+": "+Z)}}}else if("model"==c.nodeName){for(var la=c.firstChild;null!=la&&la.nodeType!=mxConstants.NODETYPE_ELEMENT;)la=la.nextSibling;null!=la&&(new mxCodec(c.firstChild)).decode(la,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):+if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var da=J.attributes,ea=0;ea<da.length;ea++)z.setAttributeForCell(N,da[ea].nodeName,0<da[ea].nodeValue.length?da[ea].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var W=c.getAttribute("icon");if(null!=W){var ba=0<W.length?JSON.parse(W):+null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var la=z.getCellGeometry(N);if(null!=la){la=la.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?la.x+=Y:"dy"==key?la.y+=Y:"dw"==key?la.width+=Y:"dh"==key?la.height+=Y:la[key]=parseFloat(ha[key])}z.model.setGeometry(N,la)}}}catch(Z){null!=window.console&&console.log("Error in icon for "++N.id+": "+Z)}}}else if("model"==c.nodeName){for(var ma=c.firstChild;null!=ma&&ma.nodeType!=mxConstants.NODETYPE_ELEMENT;)ma=ma.nextSibling;null!=ma&&(new mxCodec(c.firstChild)).decode(ma,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{C.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var z=new Date;l=z.getFullYear();t=z.getMonth()+1;var C=z.getDate(),F=z.getHours(),N=z.getMinutes();z=z.getSeconds();l=f+(" "+(l+"-"+t+"-"+C+"-"+F+"-"+N+"-"+z))}return l=mxResources.get("copyOf",[l])+c};EditorUi.prototype.logIfModified=function(c,f){try{null!=c&&f&&EditorUi.debug("File.closed",[c])}catch(l){}};EditorUi.prototype.fileLoaded=function(c,f,l){var t=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var z=!1;this.hideDialog();null!=t&&(t.removeListener(this.descriptorChangedListener),this.logIfModified(t,!0),t.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var C=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=t&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=@@ -3561,29 +3561,29 @@ mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxRec.getMode()){var F="1"==urlParams.sketch?"sketch":uiTheme;if(null==F)F="default";else if("sketch"==F||"min"==F)F+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(K){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||C():C()});f?c():(null!=N.fallbackFileData&&(N.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var K=new LocalFile(this,N.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(K)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else C();return z};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<c.length;C++){this.updatePageRoot(c[C]);var F=c[C].node.cloneNode(!1);F.removeAttribute("name");t.root=c[C].root;var N=z.encode(t);this.editor.graph.saveViewState(c[C].viewState,N,!0);N.removeAttribute("pageWidth");-N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,J,ea,da){return!da||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=J&&"y"!=J&&"width"!=J&&"height"!=J?da&&"mxCell"==K.nodeName&&"previous"==J?null:ea:Math.round(ea)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&+N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,J,da,ea){return!ea||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=J&&"y"!=J&&"width"!=J&&"height"!=J?ea&&"mxCell"==K.nodeName&&"previous"==J?null:da:Math.round(da)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var z=0;z<c.attributes.length;z++){var C=c.attributes[z].name,F=null!=f?f(c,C,c.attributes[z].value,!0):c.attributes[z].value;null!=F&&(t^=this.hashValue(C,f,l)+this.hashValue(F,f,l))}}if(null!=c.childNodes)for(z=0;z<c.childNodes.length;z++)t=(t<<5)-t+this.hashValue(c.childNodes[z],f,l)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(z=0;z<c.length;z++)f=(f<<5)-f+c.charCodeAt(z)<<0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,z,C,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));f.appendChild(l);return mxUtils.getXml(f,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var f=this.sidebar.palettes[c];if(null!=f){for(var l=0;l<f.length;l++)f[l].parentNode.removeChild(f[l]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!f){null==c&&(f=this.sidebar.palettes["L.scratchpad"],null==f&&(f=this.sidebar.palettes.search),null!=f&&(c=f[f.length-1].nextSibling));c=null!=c?c:l.firstChild.nextSibling.nextSibling;f=l.lastChild;var t=f.previousSibling;l.insertBefore(f,c);l.insertBefore(t,f)}};EditorUi.prototype.loadLibrary=function(c,f){var l=mxUtils.parseXml(c.getData());if("mxlibrary"==l.documentElement.nodeName){var t=JSON.parse(mxUtils.getTextContent(l.documentElement));this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var z=null;if(c.constructor!=StorageLibrary||-".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],this.openLibraries);break}z={file:c,images:f,title:l,expand:t};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var F=null,N=mxUtils.bind(this,function(Y,la){0==Y.length&&c.isEditable()?-(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),la.appendChild(F)):this.addLibraryEntries(Y,la)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;-l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");J.style.backgroundColor="inherit";t.style.position="relative";var ea=document.createElement("img");ea.className="geAdaptiveAsset";ea.setAttribute("src",Editor.crossImage);ea.setAttribute("title",mxResources.get("close"));ea.setAttribute("valign","absmiddle");ea.setAttribute("border","0");ea.style.position="relative";ea.style.top="2px";-ea.style.width="14px";ea.style.cursor="pointer";ea.style.margin="0 3px";var da=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(ea),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var la=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,la,mxResources.get("cancel"),mxResources.get("discardChanges")):la();mxEvent.consume(Y)}}));if(c.isEditable()){var ca=-this.editor.graph,W=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W),W=ea.cloneNode(!1),W.setAttribute("src",Editor.spinImage),W.setAttribute("title",mxResources.get("saving")),W.style.cursor="default",W.style.marginRight="2px",W.style.marginTop="-2px",J.insertBefore(W,J.firstChild),this.saveLibrary(c.getTitle(),-f,c,c.getMode(),!0,!0,function(){null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W)})):null==da&&(da=ea.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),J.insertBefore(da,J.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(la){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==da||c.isModified()||(da.parentNode.removeChild(da),da=null)});mxEvent.consume(la)})))}),ha=mxUtils.bind(this,-function(Y,la,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-la.x,-la.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,la.width,la.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));la={xml:Y,w:la.width,h:la.height};null!=k&&(la.title=k);f.push(la);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),-F=null)}),ma=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var la=ca.getSelectionCells(),Z=ca.view.getBounds(la);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ha(la,Z)}else this.showError(mxResources.get("error"),+".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],this.openLibraries);break}z={file:c,images:f,title:l,expand:t};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var F=null,N=mxUtils.bind(this,function(Y,ma){0==Y.length&&c.isEditable()?+(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),ma.appendChild(F)):this.addLibraryEntries(Y,ma)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;+l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");J.style.backgroundColor="inherit";t.style.position="relative";var da=document.createElement("img");da.className="geAdaptiveAsset";da.setAttribute("src",Editor.crossImage);da.setAttribute("title",mxResources.get("close"));da.setAttribute("valign","absmiddle");da.setAttribute("border","0");da.style.position="relative";da.style.top="2px";+da.style.width="14px";da.style.cursor="pointer";da.style.margin="0 3px";var ea=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(da),mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var ma=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=ea?this.confirm(mxResources.get("allChangesLost"),null,ma,mxResources.get("cancel"),mxResources.get("discardChanges")):ma();mxEvent.consume(Y)}}));if(c.isEditable()){var ca=+this.editor.graph,W=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W),W=da.cloneNode(!1),W.setAttribute("src",Editor.spinImage),W.setAttribute("title",mxResources.get("saving")),W.style.cursor="default",W.style.marginRight="2px",W.style.marginTop="-2px",J.insertBefore(W,J.firstChild),this.saveLibrary(c.getTitle(),+f,c,c.getMode(),!0,!0,function(){null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W)})):null==ea&&(ea=da.cloneNode(!1),ea.setAttribute("src",Editor.saveImage),ea.setAttribute("title",mxResources.get("save")),J.insertBefore(ea,J.firstChild),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(ma){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==ea||c.isModified()||(ea.parentNode.removeChild(ea),ea=null)});mxEvent.consume(ma)})))}),ha=mxUtils.bind(this,+function(Y,ma,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-ma.x,-ma.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,ma.width,ma.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));ma={xml:Y,w:ma.width,h:ma.height};null!=k&&(ma.title=k);f.push(ma);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),+F=null)}),la=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ma=ca.getSelectionCells(),Z=ca.view.getBounds(ma);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ha(ma,Z)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ca.isMouseDown&&-null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,ma(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",-ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(la,-Z,k,A,I,T,P,U,X){if(null!=la&&"image/"==Z.substring(0,6))la="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(la),la=[new mxCell("",new mxGeometry(0,0,I,T),la)],la[0].vertex=!0,ha(la,new mxRectangle(0,0,I,T),Y,mxEvent.isAltDown(Y)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==+null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,la(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",+ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ma,+Z,k,A,I,U,O,T,X){if(null!=ma&&"image/"==Z.substring(0,6))ma="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ma),ma=[new mxCell("",new mxGeometry(0,0,I,U),ma)],ma[0].vertex=!0,ha(ma,new mxRectangle(0,0,I,U),Y,mxEvent.isAltDown(Y)?null:O.substring(0,O.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);ba(Y);this.spinner.stop();aa=!0}catch(Ea){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Ba);-null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=X&&null!=P&&EditorUi.isVisioFilename(P)?this.importVisio(X,function(pa){ja(pa,"text/xml")},null,P):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(la,P)&&null!=X?this.isExternalDataComms()?-this.parseFile(X,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(la,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=-"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));ea=ea.cloneNode(!1);ea.setAttribute("src",Editor.editImage);ea.setAttribute("title",mxResources.get("edit"));J.insertBefore(ea,J.firstChild);mxEvent.addListener(ea,"click",l);l=ea.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",ma);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ma);this.isOffline()||".scratchpad"!=+null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=X&&null!=O&&EditorUi.isVisioFilename(O)?this.importVisio(X,function(pa){ja(pa,"text/xml")},null,O):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ma,O)&&null!=X?this.isExternalDataComms()?+this.parseFile(X,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(ma,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=+"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));da=da.cloneNode(!1);da.setAttribute("src",Editor.editImage);da.setAttribute("title",mxResources.get("edit"));J.insertBefore(da,J.firstChild);mxEvent.addListener(da,"click",l);l=da.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",la);".scratchpad"==c.title&&(this.addSelectionToScratchpad=la);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",J.insertBefore(l,J.firstChild))}t.appendChild(J);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==t.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=t.style&&(C+=t.style);f.appendChild(this.sidebar.createVertexTemplate(C,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var F=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==F.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(F,t.w,t.h,N,!0,null,!0))}}catch(K){N=null!=K.message?mxResources.get("error")+": "+K.message:String(K),C=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(C)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=@@ -3592,28 +3592,28 @@ Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.pronull,mxResources.get("close"),null,null,null,!0,null,null,z,l,t);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(z,C,F,N){C||(z=new ChangePageSetup(this,t?F:null,z),z.ignoreColor=!t,null!=N&&t&&(z.shadowVisible=N),this.editor.graph.model.execute(z))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,f,l,t,z){c=new LibraryDialog(this,c,f,l,t,z);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),-!1);var J=mxResources.get("ok"),ea=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(J=mxResources.get("cancel"),ea=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var da=null!=z?null:null!=-C?C:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==da.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),-mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);null!=t&&t()}),ea,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){ma.innerText="";for(var Y=0;Y<W.length;Y++){var la=document.createElement("option");mxUtils.write(la,W[Y].displayName);la.value=Y;ma.appendChild(la);la=document.createElement("option");la.innerHTML=" ";mxUtils.write(la,"<"+W[Y].email+">");la.setAttribute("disabled","disabled");ma.appendChild(la)}la=-document.createElement("option");mxUtils.write(la,mxResources.get("addAccount"));la.value=W.length;ma.appendChild(la)}var W=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var ma=document.createElement("select");ma.style.width="100%";ca();mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){var Y=ma.value,la=W.length!=Y;la&&this.drive.setUser(W[Y]);-this.drive.authorize(la,mxUtils.bind(this,function(){la||(W=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(ma);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,+!1);var J=mxResources.get("ok"),da=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(J=mxResources.get("cancel"),da=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var ea=null!=z?null:null!=+C?C:window.location.hash;if(null!=ea&&("#G"==ea.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ea.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){ea="#U"==ea.substring(0,2)?ea.substring(45,ea.lastIndexOf("%26ex")):ea.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),+mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ea);null!=t&&t()}),da,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){la.innerText="";for(var Y=0;Y<W.length;Y++){var ma=document.createElement("option");mxUtils.write(ma,W[Y].displayName);ma.value=Y;la.appendChild(ma);ma=document.createElement("option");ma.innerHTML=" ";mxUtils.write(ma,"<"+W[Y].email+">");ma.setAttribute("disabled","disabled");la.appendChild(ma)}ma=+document.createElement("option");mxUtils.write(ma,mxResources.get("addAccount"));ma.value=W.length;la.appendChild(ma)}var W=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var la=document.createElement("select");la.style.width="100%";ca();mxEvent.addListener(la,"change",mxUtils.bind(this,function(){var Y=la.value,ma=W.length!=Y;ma&&this.drive.setUser(W[Y]);+this.drive.authorize(ma,mxUtils.bind(this,function(){ma||(W=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(la);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?F=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof K&&0<K.length&&(F=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):-null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,J,l,ea,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,+null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,J,l,da,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var J=!1;if(!(this.bannerShowing||this["hideBanner"+-c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var ea=z?500:1E3;J=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var da=document.createElement("div");da.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+-";"+J;mxUtils.setPrefixedStyle(da.style,"transform",F);mxUtils.setPrefixedStyle(da.style,"transition","all "+ea+"ms ease");da.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(da.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(da.style,"transform-origin",K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText=-"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";da.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";da.appendChild(ca)}mxUtils.write(da,f);document.body.appendChild(da);this.bannerShowing=+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var da=z?500:1E3;J=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var ea=document.createElement("div");ea.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex++";"+J;mxUtils.setPrefixedStyle(ea.style,"transform",F);mxUtils.setPrefixedStyle(ea.style,"transition","all "+da+"ms ease");ea.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(ea.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(ea.style,"transform-origin",K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText=+"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";ea.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";ea.appendChild(ca)}mxUtils.write(ea,f);document.body.appendChild(ea);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var W=document.createElement("input");W.setAttribute("type","checkbox");W.setAttribute("id","geDoNotShowAgainCheckbox");W.style.marginRight="6px";if(!t){f.appendChild(W);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);-da.style.paddingBottom=z?"16px":"30px";da.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=da.parentNode&&(da.parentNode.removeChild(da),this.bannerShowing=!1,W.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var ma=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,-function(){ha()}),ea)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){var la=mxEvent.getSource(Y);la!=W&&la!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):ma()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",N)}),ea/2);window.setTimeout(ma,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=+ea.style.paddingBottom=z?"16px":"30px";ea.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=ea.parentNode&&(ea.parentNode.removeChild(ea),this.bannerShowing=!1,W.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var la=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",F);window.setTimeout(mxUtils.bind(this,+function(){ha()}),da)});mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){var ma=mxEvent.getSource(Y);ma!=W&&ma!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):la()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(ea.style,"transform",N)}),da/2);window.setTimeout(la,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,z){var C="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,f,l,z);this.saveData(t,C,c.substring(c.lastIndexOf(",")+1),"image/"+l,!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(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,z,C){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var F=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(N?parseInt(N[2],10):!1)?!1:C}if(C||this.isOffline()){F.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));C?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(K){}}else this.createEchoRequest(c,f,l,t,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=-l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(ea,da,ca,W){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,-450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ea,l,t,null,N);else if(null!=ea&&0<ea.length){var ma=mxUtils.bind(this,function(Y){try{this.exportFile(c,ea,l,t,da,Y)}catch(la){this.handleError(la)}});null!=W?ma(W):this.pickFolder(da,ma)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||-z.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(ea,da,ca){K(ea.value,da,ea,ca);this.hideDialog(null,null,J.container)}),z,c,l,t);this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;+l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(da,ea,ca,W){try{if("_blank"==ea)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,+450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(ea==App.MODE_DEVICE||"download"==ea)this.doSaveLocalFile(c,da,l,t,null,N);else if(null!=da&&0<da.length){var la=mxUtils.bind(this,function(Y){try{this.exportFile(c,da,l,t,ea,Y)}catch(ma){this.handleError(ma)}});null!=W?la(W):this.pickFolder(ea,la)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||+z.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(da,ea,ca){K(da.value,ea,da,ca);this.hideDialog(null,null,J.container)}),z,c,l,t);this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(C=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):t.document.write(z+c+"</body></html>"):t.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=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(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){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=@@ -3627,181 +3627,181 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(N){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var K=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",K);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,z){this.isLocalFileSave()?this.saveLocalFile(l,c,t,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,F){return this.createEchoRequest(l,C,t,z,f,F)}),l,z,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,z,C,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,-function(J,ea,da,ca){if("_blank"==ea||null!=J&&0<J.length){var W=l("_blank"==ea?null:J,ea==App.MODE_DEVICE||"download"==ea||null==ea||"_blank"==ea?"0":"1");null!=W&&(ea==App.MODE_DEVICE||"download"==ea||"_blank"==ea?W.simulate(document,"_blank"):(da=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,ea,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&W.send(mxUtils.bind(this,function(){this.spinner.stop();-if(200<=W.getStatus()&&299>=W.getStatus())try{this.exportFile(W.getText(),J,C,!0,ea,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ca?da(ca):this.pickFolder(ea,da)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,ea,da){N(J.value,ea,J,da);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");+function(J,da,ea,ca){if("_blank"==da||null!=J&&0<J.length){var W=l("_blank"==da?null:J,da==App.MODE_DEVICE||"download"==da||null==da||"_blank"==da?"0":"1");null!=W&&(da==App.MODE_DEVICE||"download"==da||"_blank"==da?W.simulate(document,"_blank"):(ea=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,da,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&W.send(mxUtils.bind(this,function(){this.spinner.stop();+if(200<=W.getStatus()&&299>=W.getStatus())try{this.exportFile(W.getText(),J,C,!0,da,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ca?ea(ca):this.pickFolder(da,ea)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,da,ea){N(J.value,da,J,ea);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=-function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(T){Editor.addRetryToError(T,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W)}));this.handleError(T)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var ma=this.editor.graph.addForeignObjectWarning;-Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=this.editor.graph.createSvgImageExport(z),la=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Y,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,ea,da);this.editor.graph.addForeignObjectWarning=ma;t&&this.editor.graph.addSvgShadow(la);var Z=this.getBaseFilename()+(z?".drawio":"")+".svg";W=null!=W?W:mxUtils.bind(this,function(T){this.isLocalFileSave()||T.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",T,"image/svg+xml"):-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});var k=mxUtils.bind(this,function(T){this.spinner.stop();z&&T.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,null,null,c,F));W(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(T))});this.editor.graph.mathEnabled&&this.editor.addMathCss(la);var A=mxUtils.bind(this,function(T){Editor.replaceSvgDataUris&&-C&&EditorUi.embedSvgImages(T);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(T,ea,k):k(T)}),I=mxUtils.bind(this,function(T){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(T,A,this.thumbImageCache)):A(T)});ca?this.embedFonts(la,I):(this.editor.addFontCss(la),I(la))}catch(T){this.handleError(T)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(da,ca,W,ba,ha){var ma=mxUtils.createElementNs(c.ownerDocument,-mxConstants.NS_SVG,"image");ma.setAttribute("x",ca);ma.setAttribute("y",W+.5);ma.setAttribute("width",ba.width);ma.setAttribute("height",ba.height);null==ma.setAttributeNS?ma.setAttribute("xlink:href",ha):ma.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ha);da.replaceChild(ma,da.lastChild);N()}function z(){if(F<ea.length)ea[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,-function(){counter--;0==counter&&l(c)}),K={},J={},ea=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(da){var ca=da.getElementsByTagName("div");if(0<ca.length)try{var W=ca[0].cloneNode(!0),ba=parseInt(W.style.marginLeft),ha=parseInt(W.style.paddingTop),ma=W.getElementsByTagName("div")[1],Y=ca=!1,la=W.style.alignItems,Z=W.style.justifyContent;if(null!=W.style.writingMode){var k=W.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==W.style.width||-Y&&"1px"==W.style.height;if(!Y&&"1px"==W.style.height||Y&&"1px"==W.style.width)W.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(W.style.justifyContent="unsafe flex-start");W.style.paddingTop="";W.style.marginLeft="";var I=W.outerHTML,T=K[I];null==T&&(W.style.position="absolute",W.style.visibility="hidden",document.body.appendChild(W),k=1,k="1px"==W.style.width?ma.offsetWidth:parseInt(W.style.width),A=1,A="1px"==W.style.height?ma.offsetHeight:parseInt(W.style.height),document.body.removeChild(W),-T=new mxRectangle(ba,ha,k,A),K[I]=T);"1px"==W.style.height&&("unsafe center"==la?ha-=T.height/2:"unsafe flex-end"==la&&(ha-=T.height));if("1px"==W.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==la)ba-=T.width/2;else if(!Y&&"unsafe flex-end"==Z||Y&&(!ca&&"unsafe flex-end"==la||ca&&"unsafe flex-start"==la))ba-=T.width;T=new mxRectangle(ba,ha,T.width,T.height+parseInt(ma.style.fontSize)/4);ea.push(mxUtils.bind(this,function(P){var U=J[I];null==U?Graph.htmlToPng(I,T.width,T.height,mxUtils.bind(this,-function(X){t(da,ba,ha,T,X);J[I]=X;P()}),C):(t(da,ba,ha,T,U),P())}))}catch(P){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&-(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);-var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==-C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?-"blank"===C.value?"_blank":z:null},getEditInput:function(){return l},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=C):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage+-"')");F.innerText="";F.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);-z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});-mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),-"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){var W=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==W||""==W.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,-null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+W.getHash(),c=!1);c&&null!=W&&null!=W.getTitle()&&W.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(W.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),l="");ea&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());da&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=W&&W.getMode()!=App.MODE_GITHUB&&W.getMode()!=App.MODE_GITLAB)?-EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){this.getBasenames();var W={};""!=z&&z!=mxConstants.NONE&&(W.highlight=z);"auto"!==t&&(W.target=t);J||(W.lightbox=!1);W.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(W.zoom=l/100);l=[];F&&(l.push("pages"),-W.resize=!0,null!=this.pages&&null!=this.currentPage&&(W.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),W.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(W["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),W.toolbar=l.join(" "));null!=ea&&0<ea.length&&(W.edit=ea);null!=c?W.url=c:W.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(W))+-'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";da(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace=-"nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");-C=N.cloneNode(!0);C.setAttribute("value","copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var J=this.getCurrentFile();null==l&&null!=J&&J.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")),F.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var ea=this.addLinkSection(z),da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));-da.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));da.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");da.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(da);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,-":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value="100%";z.appendChild(W);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),ma=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),la=this.addCheckbox(z,mxResources.get("lightbox"),-!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,la);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(la,"change",function(){la.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&la.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,W.value,ea.getTarget(),ea.getColor(),ba.checked,-ha.checked,ma.checked,Y.checked,la.checked,null!=Z?Z.getLink():null,null!=da?da.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,ea){var da=document.createElement("div");da.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";da.appendChild(ca);-var W=document.createElement("select");c=30;W.className="geBtn";W.style.marginBottom="8px";W.style.marginLeft="0px";W.style.width="100%";W.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),W.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value",-"auth");W.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");W.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",F),W.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));da.appendChild(W);mxUtils.br(da);W.focus();var ba=null,ha=null;if(null!=f||null!=-l)c+=30,mxUtils.write(da,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",da.appendChild(ba),mxUtils.write(da,mxResources.get("height")+":"),ha=document.createElement("input"),ha.setAttribute("type","text"),ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginBottom="10px",ha.value=l+"px",da.appendChild(ha),-mxUtils.br(da);var ma=this.addLinkSection(da,t),Y=J?this.addCheckbox(da,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var la=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),la=this.addCheckbox(da,mxResources.get("selectedPage")+": "+f));var Z=document.createElement("select");Z.style.maxWidth="260px";Z.style.marginLeft="8px";Z.style.marginTop=-"16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);ea&&(mxUtils.write(da,mxResources.get("appearance")+":"),da.appendChild(Z),mxUtils.br(da),-c+=30);var k=this.addCheckbox(da,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(da,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var T=this.addCheckbox(da,mxResources.get("layers"),!0);T.style.marginLeft=I.style.marginLeft;T.style.marginTop="8px";var P=this.addCheckbox(da,mxResources.get("tags"),!0);P.style.marginLeft=I.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?-(T.removeAttribute("disabled"),I.removeAttribute("disabled"),P.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,da,mxUtils.bind(this,function(){K(ma.getTarget(),ma.getColor(),null==la?!1:la.checked,k.checked,A.getLink(),T.checked,null!=ba?ba.value:null,null!=-ha?ha.value:null,P.checked,W.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):null==W.parentNode;ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.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:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");-K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var J=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ea=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var da=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom=-"16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,W=parseInt(K.value)||0;l(!J.checked,null!=ea?ea.checked:!1,null!=da?da.checked:!1,ca,W)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;var J=document.createElement("div");J.style.whiteSpace="nowrap";var ea=this.editor.graph,da="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");-mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,mxResources.get("zoom")+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value=this.lastExportZoom||"100%";J.appendChild(W);mxUtils.write(J,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");-ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";J.appendChild(ba);mxUtils.br(J);var ha=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,ea.isSelectionEmpty()),ma=document.createElement("input");ma.style.marginTop="16px";ma.style.marginRight="8px";ma.style.marginLeft="24px";ma.setAttribute("disabled","disabled");ma.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft=-"8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!ea.isSelectionEmpty()||"selectionOnly"!=c[ca]){var la=document.createElement("option");mxUtils.write(la,mxResources.get(c[ca]));la.setAttribute("value",c[ca]);Y.appendChild(la)}K?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(Y),mxUtils.br(J),da+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==Y.value&&(ha.checked=!0)})):C&&(J.appendChild(ma),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),da+=-30,mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled","disabled")}));ea.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",da-=30):(Y.value="diagram",ma.setAttribute("checked","checked"),ma.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),-!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),-C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(k);mxUtils.br(J);da+=26;var A=this.addCheckbox(J,mxResources.get("shadow"),ea.shadowVisible),I=null;if("png"==N||"jpeg"==N||"webp"==N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var T=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+-":",F,null,null,"jpeg"!=N&&"webp"!=N),P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){T.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")},ea=document.createElement("option"),ea.setAttribute("value","allPages"),mxUtils.write(ea,mxResources.get("allPages")),P.appendChild(ea),ea=document.createElement("option"),ea.setAttribute("value","currentPage"),mxUtils.write(ea,mxResources.get("currentPage")),P.appendChild(ea),-T.style.marginBottom="12px",P.style.marginBottom="16px",J.appendChild(P),mxUtils.br(J),da+=20,null!=this.lastEmbedInclude&&(P.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",F),F()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");f&&(U.checked=null!=this.lastEmbedImages?-this.lastEmbedImages:!0,J.appendChild(U),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(X),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),da+=50);var aa=document.createElement("select");aa.style.maxWidth="260px";aa.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");-F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin="7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(aa),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),da+=50);l=new CustomDialog(this,-J,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=W.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=P.value;z(W.value,Z.checked,!ha.checked,A.checked,T.checked,U.checked&&f,ba.value,ma.checked,("png"==N||"svg"==N)&&"currentPage"==P.value,aa.value,null!=I?I.checked:null,null!=k?k.value:null,Y.value,X.checked)}),null,l,t);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);W.focus();mxClient.IS_GC||mxClient.IS_FF||-5<=document.documentMode?W.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&-t,!t),ea=this.addCheckbox(C,l),da=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,da),W=ca.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=W.style.marginLeft;ha.style.marginBottom="12px";ha.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(ba&&ha.removeAttribute("disabled"),W.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),W.setAttribute("disabled",-"disabled"));W.checked&&da.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,ea.checked,da.checked,ca.getLink(),ha.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,z,C,F,N){function K(W){var ba=" ",ha="";t&&(ba=" 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!=ea?"&page="+ea:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var ma="";l&&(ma=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+W+'"'+ma+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var J=this.editor.graph.getGraphBounds(),ea=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(W){var ba=t?this.getFileData(!0):-null;W=this.createImageDataUri(W,ba,"png");K(W)}),null,null,null,mxUtils.bind(this,function(W){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+da+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=-ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var J=0;J<K.length;J++){var ea=K[J].getAttribute("href");null!=ea&&"#"==ea.charAt(0)&&"_blank"==K[J].getAttribute("target")&&K[J].removeAttribute("target")}t&&-N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var da=" ",ca="";t&&(da="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"+(z?"&edit=_blank":"")+(C?"&layers=1":-"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(W){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(W))+'"'+(""!=ca?' style="'+ca+'"':"")+da+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.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('"++function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(T){Editor.addRetryToError(T,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W)}));this.handleError(T)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var la=this.editor.graph.addForeignObjectWarning;+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=mxUtils.lightDarkColorSupported,ma=mxUtils.preferDarkColor;if("light"==da||"dark"==da)mxUtils.lightDarkColorSupported=!1,mxUtils.preferDarkColor="dark"==da;var Z=this.editor.graph.createSvgImageExport(z),k=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Z,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,da,ea);mxUtils.lightDarkColorSupported=Y;mxUtils.preferDarkColor=ma;this.editor.graph.addForeignObjectWarning=+la;t&&this.editor.graph.addSvgShadow(k);var A=this.getBaseFilename()+(z?".drawio":"")+".svg";W=null!=W?W:mxUtils.bind(this,function(T){this.isLocalFileSave()||T.length<=MAX_REQUEST_SIZE?this.saveData(A,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});var I=mxUtils.bind(this,function(T){this.spinner.stop();z&&T.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,+null,null,c,F));W(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(T))});this.editor.graph.mathEnabled&&this.editor.addMathCss(k);var U=mxUtils.bind(this,function(T){Editor.replaceSvgDataUris&&C&&EditorUi.embedSvgImages(T);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(T,da,I):I(T)}),O=mxUtils.bind(this,function(T){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(T,+U,this.thumbImageCache)):U(T)});ca?this.embedFonts(k,O):(this.editor.addFontCss(k),O(k))}catch(T){this.handleError(T)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(ea,ca,W,ba,ha){var la=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");la.setAttribute("x",ca);la.setAttribute("y",W+.5);la.setAttribute("width",ba.width);la.setAttribute("height",ba.height);null==la.setAttributeNS?la.setAttribute("xlink:href",ha):la.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",+ha);ea.replaceChild(la,ea.lastChild);N()}function z(){if(F<da.length)da[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,function(){counter--;0==counter&&l(c)}),K={},J={},da=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(ea){var ca=ea.getElementsByTagName("div");if(0<ca.length)try{var W=ca[0].cloneNode(!0),ba=parseInt(W.style.marginLeft),ha=parseInt(W.style.paddingTop),+la=W.getElementsByTagName("div")[1],Y=ca=!1,ma=W.style.alignItems,Z=W.style.justifyContent;if(null!=W.style.writingMode){var k=W.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==W.style.width||Y&&"1px"==W.style.height;if(!Y&&"1px"==W.style.height||Y&&"1px"==W.style.width)W.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(W.style.justifyContent="unsafe flex-start");W.style.paddingTop="";W.style.marginLeft="";var I=W.outerHTML,U=K[I];+null==U&&(W.style.position="absolute",W.style.visibility="hidden",document.body.appendChild(W),k=1,k="1px"==W.style.width?la.offsetWidth:parseInt(W.style.width),A=1,A="1px"==W.style.height?la.offsetHeight:parseInt(W.style.height),document.body.removeChild(W),U=new mxRectangle(ba,ha,k,A),K[I]=U);"1px"==W.style.height&&("unsafe center"==ma?ha-=U.height/2:"unsafe flex-end"==ma&&(ha-=U.height));if("1px"==W.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==ma)ba-=U.width/2;else if(!Y&&"unsafe flex-end"==+Z||Y&&(!ca&&"unsafe flex-end"==ma||ca&&"unsafe flex-start"==ma))ba-=U.width;U=new mxRectangle(ba,ha,U.width,U.height+parseInt(la.style.fontSize)/4);da.push(mxUtils.bind(this,function(O){var T=J[I];null==T?Graph.htmlToPng(I,U.width,U.height,mxUtils.bind(this,function(X){t(ea,ba,ha,U,X);J[I]=X;O()}),C):(t(ea,ba,ha,U,T),O())}))}catch(O){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=+function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=+function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));+C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,+300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?"blank"===C.value?"_blank":z:null},getEditInput:function(){return l},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=function(c,f){function l(){var N=document.createElement("div");N.style.width="100%";N.style.height="100%";N.style.boxSizing=+"border-box";null!=C&&C!=mxConstants.NONE?(N.style.border="1px solid black",N.style.backgroundColor=C):(N.style.backgroundPosition="center center",N.style.backgroundRepeat="no-repeat",N.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var z=document.createElement("option");+z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")++")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);+mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=+function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){var W=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==W||""==W.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+W.getHash(),c=!1);c&&null!=W&&null!=W.getTitle()&&W.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(W.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),+l="");da&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());ea&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=W&&W.getMode()!=App.MODE_GITHUB&&W.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){this.getBasenames();+var W={};""!=z&&z!=mxConstants.NONE&&(W.highlight=z);"auto"!==t&&(W.target=t);J||(W.lightbox=!1);W.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(W.zoom=l/100);l=[];F&&(l.push("pages"),W.resize=!0,null!=this.pages&&null!=this.currentPage&&(W.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),W.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(W["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),W.toolbar=l.join(" "));null!=da&&0<da.length&&(W.edit=+da);null!=c?W.url=c:W.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(W))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";ea(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":+window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";+var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");C=N.cloneNode(!0);C.setAttribute("value","copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));+F.appendChild(K);var J=this.getCurrentFile();null==l&&null!=J&&J.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")),F.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var da=this.addLinkSection(z),+ea=document.createElement("select");ea.style.maxWidth="260px";ea.style.marginLeft="8px";ea.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));ea.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected",+"selected");ea.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(ea);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value="100%";z.appendChild(W);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=+this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),la=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),ma=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,ma);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(ma,"change",function(){ma.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&+ma.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,W.value,da.getTarget(),da.getColor(),ba.checked,ha.checked,la.checked,Y.checked,ma.checked,null!=Z?Z.getLink():null,null!=ea?ea.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,da){var ea=document.createElement("div");+ea.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";ea.appendChild(ca);var W=document.createElement("select");c=30;W.className="geBtn";W.style.marginBottom="8px";W.style.marginLeft="0px";W.style.width="100%";W.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",+ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),W.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");W.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");W.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",+F),W.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));ea.appendChild(W);mxUtils.br(ea);W.focus();var ba=null,ha=null;if(null!=f||null!=l)c+=30,mxUtils.write(ea,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value=+"100%",ea.appendChild(ba),mxUtils.write(ea,mxResources.get("height")+":"),ha=document.createElement("input"),ha.setAttribute("type","text"),ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginBottom="10px",ha.value=l+"px",ea.appendChild(ha),mxUtils.br(ea);var la=this.addLinkSection(ea,t),Y=J?this.addCheckbox(ea,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var ma=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?+this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ma=this.addCheckbox(ea,mxResources.get("selectedPage")+": "+f));var Z=document.createElement("select");Z.style.maxWidth="260px";Z.style.marginLeft="8px";Z.style.marginTop="16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));Z.appendChild(f);f=document.createElement("option");+f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);da&&(mxUtils.write(ea,mxResources.get("appearance")+":"),ea.appendChild(Z),mxUtils.br(ea),c+=30);var k=this.addCheckbox(ea,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(ea,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var U=this.addCheckbox(ea,mxResources.get("layers"),!0);U.style.marginLeft=I.style.marginLeft;+U.style.marginTop="8px";var O=this.addCheckbox(ea,mxResources.get("tags"),!0);O.style.marginLeft=I.style.marginLeft;O.style.marginBottom="16px";O.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?(U.removeAttribute("disabled"),I.removeAttribute("disabled"),O.removeAttribute("disabled")):(U.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled",+"disabled")});t=new CustomDialog(this,ea,mxUtils.bind(this,function(){K(la.getTarget(),la.getColor(),null==ma?!1:ma.checked,k.checked,A.getLink(),U.checked,null!=ba?ba.value:null,null!=ha?ha.value:null,O.checked,W.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):null==W.parentNode;la.focus()};EditorUi.prototype.showRemoteExportDialog=+function(c,f,l,t,z){var C=document.createElement("div");C.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:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||+"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var J=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),da=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;+var ea=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ea&&(ea.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,W=parseInt(K.value)||0;l(!J.checked,null!=da?da.checked:!1,null!=ea?ea.checked:!1,ca,W)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;+var J=document.createElement("div");J.style.whiteSpace="nowrap";var da=this.editor.graph,ea="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,mxResources.get("zoom")+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value=this.lastExportZoom||+"100%";J.appendChild(W);mxUtils.write(J,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";J.appendChild(ba);mxUtils.br(J);var ha=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,da.isSelectionEmpty()),la=document.createElement("input");la.style.marginTop="16px";la.style.marginRight="8px";la.style.marginLeft="24px";la.setAttribute("disabled",+"disabled");la.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!da.isSelectionEmpty()||"selectionOnly"!=c[ca]){var ma=document.createElement("option");mxUtils.write(ma,mxResources.get(c[ca]));ma.setAttribute("value",c[ca]);Y.appendChild(ma)}K?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(Y),mxUtils.br(J),ea+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==+Y.value&&(ha.checked=!0)})):C&&(J.appendChild(la),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),ea+=30,mxEvent.addListener(ha,"change",function(){ha.checked?la.removeAttribute("disabled"):la.setAttribute("disabled","disabled")}));da.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",ea-=30):(Y.value="diagram",la.setAttribute("checked","checked"),la.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=+ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);+"svg"==N&&mxUtils.lightDarkColorSupported?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(k);mxUtils.br(J);ea+=26;var A=this.addCheckbox(J,mxResources.get("shadow"),da.shadowVisible),I=null;if("png"==N||"jpeg"==N||"webp"==+N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ea+=30;var U=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),O=document.createElement("select");O.style.maxWidth="260px";O.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){U.checked?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")},da=document.createElement("option"),da.setAttribute("value","allPages"),mxUtils.write(da,mxResources.get("allPages")),+O.appendChild(da),da=document.createElement("option"),da.setAttribute("value","currentPage"),mxUtils.write(da,mxResources.get("currentPage")),O.appendChild(da),U.style.marginBottom="12px",O.style.marginBottom="16px",J.appendChild(O),mxUtils.br(J),ea+=20,null!=this.lastEmbedInclude&&(O.value=this.lastEmbedInclude),mxEvent.addListener(U,"change",F),F()):U.style.marginBottom="16px";var T=document.createElement("input");T.style.marginBottom="16px";T.style.marginRight="8px";T.setAttribute("type","checkbox");+var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");f&&(T.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,J.appendChild(T),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(X),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),ea+=50);var aa=document.createElement("select");aa.style.maxWidth="260px";aa.style.marginLeft=+"8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin=+"7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(aa),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),ea+=50);l=new CustomDialog(this,J,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=W.value;this.lastEmbedImages=T.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=O.value;z(W.value,Z.checked,!ha.checked,A.checked,U.checked,T.checked&&f,ba.value,la.checked,("png"==N||"svg"==N)&&"currentPage"==O.value,aa.value,+null!=I?I.checked:null,null!=k?k.value:null,Y.value,X.checked)}),null,l,t);this.showDialog(l.container,340,ea,!0,!0,null,null,null,null,!0);W.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?W.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";+C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),da=this.addCheckbox(C,l),ea=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,ea),W=ca.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=W.style.marginLeft;ha.style.marginBottom="12px";ha.style.marginTop="8px";mxEvent.addListener(ea,"change",function(){ea.checked?+(ba&&ha.removeAttribute("disabled"),W.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));W.checked&&ea.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,da.checked,ea.checked,ca.getLink(),ha.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=+function(c,f,l,t,z,C,F,N){function K(W){var ba=" ",ha="";t&&(ba=" 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!=da?"&page="+da:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",+ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var la="";l&&(la=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+W+'"'+la+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var J=this.editor.graph.getGraphBounds(),da=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(W){var ba=t?this.getFileData(!0):null;W=this.createImageDataUri(W,ba,"png");K(W)}),null,null,null,mxUtils.bind(this,function(W){N({message:mxResources.get("unknownError")})}),+null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ea="";l&&(ea="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+ea+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};+EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var J=0;J<K.length;J++){var da=K[J].getAttribute("href");null!=da&&"#"==da.charAt(0)&&"_blank"==K[J].getAttribute("target")&&K[J].removeAttribute("target")}t&&N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var ea=" ",ca="";t&&(ea="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"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(W){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(W))+'"'+(""!=ca?' style="'+ca+'"':"")+ea+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ca+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ca&&N.setAttribute("style",ca),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var t=parseFloat(c.getAttribute("scale"));!isNaN(t)&&0<t&&(f=t)}c.hasAttribute("border")&&(t=parseInt(c.getAttribute("border")),!isNaN(t)&&0<t&&(l=t))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,t,z){try{var C=this.editor.graph,F=null;if(null!=l&&0<l.length)C=this.createTemporaryGraph(C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(J){return"page"==J?K.getName():"pagenumber"==J?1:N.apply(this,arguments)};document.body.appendChild(C.container);-C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ea=J.toDataURL("image/png");ea=Editor.writeGraphModelToPng(ea,"tEXt","mxfile",encodeURIComponent(F));c(ea.substring(ea.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(da){null!=f&&f(da)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,C.shadowVisible,null,-C,z,null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){N=null!=N?N:!0;ea=null!=ea?ea:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,J,ea,null,null,C,null,K,null,f.shadowVisible||da,null,ca,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(C,null,null,0==ea);null!=c&&C.setAttribute("content",c);null!=+C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var da=J.toDataURL("image/png");da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(F));c(da.substring(da.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ea){null!=f&&f(ea)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,C.shadowVisible,null,+C,z,null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){N=null!=N?N:!0;da=null!=da?da:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,J,da,null,null,C,null,K,null,f.shadowVisible||ea,null,ca,"diagram");(f.shadowVisible||ea)&&f.addSvgShadow(C,null,null,0==da);null!=c&&C.setAttribute("content",c);null!=l&&C.setAttribute("resource",l);var W=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){W(ha)})):W(ba)}));else return W(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,ea,da,-ca)}));this.handleError(ba)}))){var W=this.editor.graph.isSelectionEmpty();l=null!=l?l:W;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,ea)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),-null,l,c||1,f,t,null,null,C,F,J,da,ca)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<-c.length){K.model.beginUpdate();try{var J=mxUtils.parseXml(c);c={};var ea=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=ea&&"mxfile"==ea.nodeName&&null!=this.pages){var da=ea.getElementsByTagName("diagram");if(1==da.length&&!C){if(ea=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(c[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=da[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,-ca))}}else if(0<da.length){C=[];var W=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[da[0].getAttribute("id")]=this.pages[0].getId(),ca=da[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),ea=Editor.parseDiagramNode(da[0]),t=!1,W=1);for(;W<da.length;W++){var ba=da[W].getAttribute("id");da[W].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(da[W]));c[ba]=da[W].getAttribute("id");var ma=this.pages.length;-null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[ma+1]));K.model.execute(new ChangePage(this,ha,ha,ma,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=ea&&"mxGraphModel"===ea.nodeName){N=K.importGraphModel(ea,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),W=0;W<N.length;W++)this.updatePageLinksForCell(c,N[W]);var Y=K.parseBackgroundImage(ea.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var la=new ChangePageSetup(this,-null,Y);la.ignoreColor=!0;K.model.execute(la)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,da,ea,+ca)}));this.handleError(ba)}))){var W=this.editor.graph.isSelectionEmpty();l=null!=l?l:W;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,da)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),+null,l,c||1,f,t,null,null,C,F,J,ea,ca)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<+c.length){K.model.beginUpdate();try{var J=mxUtils.parseXml(c);c={};var da=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=da&&"mxfile"==da.nodeName&&null!=this.pages){var ea=da.getElementsByTagName("diagram");if(1==ea.length&&!C){if(da=Editor.parseDiagramNode(ea[0]),null!=this.currentPage&&(c[ea[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=ea[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,+ca))}}else if(0<ea.length){C=[];var W=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[ea[0].getAttribute("id")]=this.pages[0].getId(),ca=ea[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),da=Editor.parseDiagramNode(ea[0]),t=!1,W=1);for(;W<ea.length;W++){var ba=ea[W].getAttribute("id");ea[W].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(ea[W]));c[ba]=ea[W].getAttribute("id");var la=this.pages.length;+null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[la+1]));K.model.execute(new ChangePage(this,ha,ha,la,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=da&&"mxGraphModel"===da.nodeName){N=K.importGraphModel(da,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),W=0;W<N.length;W++)this.updatePageLinksForCell(c,N[W]);var Y=K.parseBackgroundImage(da.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var ma=new ChangePageSetup(this,+null,Y);ma.ignoreColor=!0;K.model.execute(ma)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,z=t.getLinkForCell(f);null!=z&&t.setLinkForCell(f,this.updatePageLink(c,z));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var C=l.getElementsByTagName("a"),F=!1,N=0;N<C.length;N++)z=C[N].getAttribute("href"),null!=z&&(C[N].setAttribute("href",this.updatePageLink(c,z)),F=!0);F&&t.labelChanged(f,l.innerHTML)}for(N=0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var z=0;z<t.actions.length;z++){var C=t.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var F=C.open.substring(C.open.indexOf(",")+1);l=c[F];null!=l?C.open="data:page/id,"+l:null==this.getPageById(F)&&delete C.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,z){var C=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){t=null!=t?t:c.name;var N=mxUtils.bind(this,-function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var ea=t.lastIndexOf(".");if(0<=ea&&ea<t.length)t.substring(ea+1).toUpperCase();else{var da=t.lastIndexOf("/");0<=da&&da<t.length&&(t=t.substring(da+1))}}catch(W){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;-J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var W=ca.response;if("text/xml"==W.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(ma){N({message:mxResources.get("errorLoadingFile")})}});+function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var da=t.lastIndexOf(".");if(0<=da&&da<t.length)t.substring(da+1).toUpperCase();else{var ea=t.lastIndexOf("/");0<=ea&&ea<t.length&&(t=t.substring(ea+1))}}catch(W){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;+J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var W=ca.response;if("text/xml"==W.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(la){N({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(W)}else this.doImportVisio(W,f,N,t)}catch(ha){N(ha)}else try{""==ca.responseType||"text"==ca.responseType?N({message:ca.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ca.response))}catch(ha){N({})}});ca.send(J)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(W){N(W)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,N))}),C)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){C(N)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),f)}};EditorUi.prototype.convertLucidChart=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&-K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(ea){}}catch(ea){null!=window.console&&console.error(ea),C(ea)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",+K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(da){}}catch(da){null!=window.console&&console.error(da),C(da)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,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",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",-c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ea=mxUtils.trim(K.getText());this.generateMermaidImage(ea,null,mxUtils.bind(this,function(da,ca,W){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",ea),f(ea,da,ca,W))}),N)}),N,mxUtils.bind(this,function(da){3>-t++?C.clear()&&z():N(da)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(ea){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?+c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var da=mxUtils.trim(K.getText());this.generateMermaidImage(da,null,mxUtils.bind(this,function(ea,ca,W){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",da),f(da,ea,ca,W))}),N)}),N,mxUtils.bind(this,function(ea){3>+t++?C.clear()&&z():N(ea)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(da){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=-K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var ea=parseFloat(J[0].getAttribute("width")),da=parseFloat(J[0].getAttribute("height"));if(isNaN(ea)||isNaN(da))try{var ca=J[0].getAttribute("viewBox").split(/\s+/);ea=parseFloat(ca[2]);da=parseFloat(ca[3])}catch(W){ea=ea||100,da=da||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),-ea,da)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(W){t(W)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,+K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var da=parseFloat(J[0].getAttribute("width")),ea=parseFloat(J[0].getAttribute("height"));if(isNaN(da)||isNaN(ea))try{var ca=J[0].getAttribute("viewBox").split(/\s+/);da=parseFloat(ca[2]);ea=parseFloat(ca[3])}catch(W){da=da||100,ea=ea||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),+da,ea)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(W){t(W)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,J){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|J>>6;c4=J&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==-f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var ea=new Image;ea.onload=function(){try{var da=ea.width,ca=ea.height;if(0==da&&0==ca){var W=K.result,ba=W.indexOf(","),ha=decodeURIComponent(escape(atob(W.substring(ba+1)))),ma=mxUtils.parseXml(ha).getElementsByTagName("svg");0<ma.length&&(da=parseFloat(ma[0].getAttribute("width")),ca=parseFloat(ma[0].getAttribute("height")))}l(K.result,da,ca)}catch(Y){t(Y)}};ea.src=K.result};K.onerror=function(J){t(J)}}else t(N)};+f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var da=new Image;da.onload=function(){try{var ea=da.width,ca=da.height;if(0==ea&&0==ca){var W=K.result,ba=W.indexOf(","),ha=decodeURIComponent(escape(atob(W.substring(ba+1)))),la=mxUtils.parseXml(ha).getElementsByTagName("svg");0<la.length&&(ea=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(K.result,ea,ca)}catch(Y){t(Y)}};da.src=K.result};K.onerror=function(J){t(J)}}else t(N)};F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=-J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var ea=this.importXml(J,f,l,C,!0,N);if(0<ea.length)return ea}catch(ca){}this.loadImage(c,-mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ha,ma,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ma,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var W=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ba=Math.round(ca.width*W);ca=Math.round(ca.height*+J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var da=this.importXml(J,f,l,C,!0,N);if(0<da.length)return da}catch(ca){}this.loadImage(c,+mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ha,la,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),la,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var W=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ba=Math.round(ca.width*W);ca=Math.round(ca.height*W);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,C,null,N))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));-K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var da=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=da.width;z.geometry.height=da.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};+K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var ea=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=ea.width;z.geometry.height=ea.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;-this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,ea){J=ea.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,ea.async("string").then(function(da){0==-da.indexOf("<mxfile ")?f(da):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=ea))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(ea){4==ea.readyState&&(200<=ea.status&&299>=ea.status?f(ea.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||-this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,ea,da){J=null!=J?J:!0;var ca=!1,W=null,ba=mxUtils.bind(this,function(ha){var ma=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):ma=this.importXml(ha,l,t,J,null,null!=da?mxEvent.isControlDown(da):null);null!=N&&N(ma)});"image"==f.substring(0,5)?(K=-!1,"image/png"==f.substring(0,9)&&(ea=ea?null:this.extractGraphModelFromPng(c),null!=ea&&0<ea.length&&(W=this.importXml(ea,l,t,J,null,null!=da?mxEvent.isControlDown(da):null),K=!0)),K||(K=this.editor.graph,ea=c.indexOf(";"),0<ea&&(c=c.substring(0,ea)+c.substring(c.indexOf(",",ea+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),ea="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(ea+="editableCssRules=.*;"),-W=[K.insertVertex(null,null,"",l,t,z,C,ea+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),-413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(W)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=da?mxEvent.isControlDown(da):null));ca||null==N||N(W);return W};EditorUi.prototype.importFiles=-function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var W=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ma=ea||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>ma){ha=!0;break}var la=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(X,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=-X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(W=!1,pa=ja=0);return this.importFile(X,aa,ja,pa,sa,qa,wa,Ba,za,W,da,ca)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(X){Z.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,-I=A,T=[],P=mxUtils.bind(this,function(X,aa){T[X]=aa;if(0==--I){this.spinner.stop();if(null!=N)N(T);else{var ja=[];Z.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var pa=T[X]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),U=0;U<A;U++)mxUtils.bind(this,function(X){var aa=c[X];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),-qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=da?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?P(X,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");+this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,da){J=da.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,da.async("string").then(function(ea){0==+ea.indexOf("<mxfile ")?f(ea):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=da))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(da){4==da.readyState&&(200<=da.status&&299>=da.status?f(da.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||+this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,da,ea){J=null!=J?J:!0;var ca=!1,W=null,ba=mxUtils.bind(this,function(ha){var la=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):la=this.importXml(ha,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null);null!=N&&N(la)});"image"==f.substring(0,5)?(K=+!1,"image/png"==f.substring(0,9)&&(da=da?null:this.extractGraphModelFromPng(c),null!=da&&0<da.length&&(W=this.importXml(da,l,t,J,null,null!=ea?mxEvent.isControlDown(ea):null),K=!0)),K||(K=this.editor.graph,da=c.indexOf(";"),0<da&&(c=c.substring(0,da)+c.substring(c.indexOf(",",da+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),da="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(da+="editableCssRules=.*;"),+W=[K.insertVertex(null,null,"",l,t,z,C,da+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),+413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(W)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=ea?mxEvent.isControlDown(ea):null));ca||null==N||N(W);return W};EditorUi.prototype.importFiles=+function(c,f,l,t,z,C,F,N,K,J,da,ea,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var W=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var la=da||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>la){ha=!0;break}var ma=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(X,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=+X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(W=!1,pa=ja=0);return this.importFile(X,aa,ja,pa,sa,qa,wa,Ba,za,W,ea,ca)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(X){Z.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,+I=A,U=[],O=mxUtils.bind(this,function(X,aa){U[X]=aa;if(0==--I){this.spinner.stop();if(null!=N)N(U);else{var ja=[];Z.getModel().beginUpdate();try{for(X=0;X<U.length;X++){var pa=U[X]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),T=0;T<A;T++)mxUtils.bind(this,function(X){var aa=c[X];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),+qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=ea?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?O(X,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");if(0<Ma.length){var Ha=Ma[0],Aa=Ha.getAttribute("width"),Ra=Ha.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ra=null!=Ra&&"%"!=Ra.charAt(Ra.length-1)?parseFloat(Ra):NaN;var Za=Ha.getAttribute("viewBox");if(null==Za||0==Za.length)Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);else if(isNaN(Aa)||isNaN(Ra)){var La=Za.split(" ");3<La.length&&(Aa=parseFloat(La[2]),Ra=parseFloat(La[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var $a=Math.min(1,Math.min(t/Math.max(1,Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+X*k,l+X*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",-sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):P(X,mxUtils.bind(this,function(){return z(ra,"text/xml",f+X*k,l+X*k,0,0,aa.name)}))}else P(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=da?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;P(X,mxUtils.bind(this,function(){return z(ya,"text/xml",f+X*k,l+X*k,Ca.width,Ca.height,aa.name)}));-qa=!0}}qa||(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(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){P(X,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var Za=ba&&this.isResampleImageSize(aa.size,-ea)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+X*k,l+X*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,ea,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+X*k,l+X*k,240,160,aa.name,function(Ma){P(X,function(){return Ma})},aa)}catch(Ma){P(X,mxUtils.bind(this,function(){return null})),null!=window.console&&-console.error(Ma,aa)}else P(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+X*k,l+X*k,240,160,aa.name,function(pa){P(X,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(U)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;la()},K)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&+sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):O(X,mxUtils.bind(this,function(){return z(ra,"text/xml",f+X*k,l+X*k,0,0,aa.name)}))}else O(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=ea?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;O(X,mxUtils.bind(this,function(){return z(ya,"text/xml",f+X*k,l+X*k,Ca.width,Ca.height,aa.name)}));+qa=!0}}qa||(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(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){O(X,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var Za=ba&&this.isResampleImageSize(aa.size,+da)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+X*k,l+X*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,da,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+X*k,l+X*k,240,160,aa.name,function(Ma){O(X,function(){return Ma})},aa)}catch(Ma){O(X,mxUtils.bind(this,function(){return null})),null!=window.console&&+console.error(Ma,aa)}else O(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+X*k,l+X*k,240,160,aa.name,function(pa){O(X,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(T)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;ma()},K)}else ma()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,!0)},function(C){z(C,!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?226:200,!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,-F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var ea=Math.max(N/z,K/z);if(1<ea){var da=Math.round(N/ea),ca=Math.round(K/ea),W=document.createElement("canvas");W.width=da;W.height=ca;W.getContext("2d").drawImage(c,0,0,da,ca);var ba=W.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=da;ha.height=ca;var ma=ha.toDataURL();ba!==ma&&(f=ba,N=da,K=ca)}}}catch(Y){}t&&J!=f&&z>+F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var da=Math.max(N/z,K/z);if(1<da){var ea=Math.round(N/da),ca=Math.round(K/da),W=document.createElement("canvas");W.width=ea;W.height=ca;W.getContext("2d").drawImage(c,0,0,ea,ca);var ba=W.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=ea;ha.height=ca;var la=ha.toDataURL();ba!==la&&(f=ba,N=ea,K=ca)}}}catch(Y){}t&&J!=f&&z>this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});-f.cellEditor.editPlantUmlData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",T.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,T.format,function(U,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==T.format)f.labelChanged(k,"<pre>"+U+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(U),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=-X,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:P,format:T.format}))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",T.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,T.config,-function(U,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",U,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,X),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:P,config:T.config},null,2))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=-function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var T=f.getCellStyle(k);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(P){c.handleError(P)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var T=this.getGraphBounds();-c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(P){c.handleError(P)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,+f.cellEditor.editPlantUmlData=function(k,A,I){var U=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",U.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(O,U.format,function(T,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==U.format)f.labelChanged(k,"<pre>"+T+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(T),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=+X,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:O,format:U.format}))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,I){var U=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",U.data,function(O){null!=O&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(O,U.config,+function(T,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",T,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,X),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:O,config:U.config},null,2))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=+function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var U=f.getCellStyle(k);"1"==mxUtils.getValue(U,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(O){c.handleError(O)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var U=this.getGraphBounds();+c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!U.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(O){c.handleError(O)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var I=k.indexOf(",");if(0<I)for(k=k.substring(I+1),A=A.getProperty("patches"),I=0;I<A.length;I++)if(null!=A[I][EditorUi.DIFF_UPDATE]&&null!=A[I][EditorUi.DIFF_UPDATE][k]||null!=A[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[I][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var I=F.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=A?c.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/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 N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var T=A;A=function(P,U,X){if(null==U){var aa=mxEvent.getSource(P);"a"==aa.nodeName.toLowerCase()&&(U=aa.getAttribute("href"))}null!=-U&&f.isCustomLink(U)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&f.customLinkClicked(U,X)&&mxEvent.consume(P);null!=T&&T(P,U,X)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);-f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var ea=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())ea.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,-A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var T=f.getModel().getGeometry(A);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(k,-["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(k,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;-this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var da=f.getExportVariables;f.getExportVariables=function(){var k=da.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var U=A;A=function(O,T,X){if(null==T){var aa=mxEvent.getSource(O);"a"==aa.nodeName.toLowerCase()&&(T=aa.getAttribute("href"))}null!=+T&&f.isCustomLink(T)&&(mxEvent.isTouchEvent(O)||!mxEvent.isPopupTrigger(O))&&f.customLinkClicked(T,X)&&mxEvent.consume(O);null!=U&&U(O,T,X)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);+f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var da=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())da.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,+A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var U=f.getModel().getGeometry(A);null!=U&&null!=U.points&&0<U.points.length&&this.addMenuItems(k,+["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);U=c.getSelectionState();null!=U.mergeCell?this.addMenuItem(k,"mergeCells"):(1<U.style.colspan||1<U.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var ea=f.getExportVariables;f.getExportVariables=function(){var k=ea.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var W=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;W!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),-f.view.validate());W=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var T=A.getAttribute("href");if(null==T||!f.isCustomLink(T)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(T),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};-var ma=this.actions.get("print");ma.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ma.visible=ma.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,+f.view.validate());W=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var U=A.getAttribute("href");if(null==U||!f.isCustomLink(U)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(U),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};+var la=this.actions.get("print");la.setEnabled(!mxClient.IS_IOS||!navigator.standalone);la.visible=la.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=-A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(T){null!=I&&(I.parentNode.removeChild(I),I=null);T.stopPropagation();-T.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(T){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(T){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,aa,ja,pa,sa){f.insertImage(U,pa,sa)},function(){},function(U){return"image/"==U.type.substring(0,-6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var P=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(U){var X=Math.max(1,U.width);U=Math.max(1,U.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,X)),aa/Math.max(1,U));f.insertImage(decodeURIComponent(P),X*aa,U*aa)})):document.execCommand("insertHTML",-!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ma=this.editor.graph.view;var Y=mxSettings.getUnit();ma.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:-Y;ma.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ma.unit);this.refresh()}if("1"==urlParams.styledev){ma=document.getElementById("geFooter");null!=ma&&(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)})),ma.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,-mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:la.apply(this,arguments)}}ma=document.getElementById("geInfo");null!=ma&&ma.parentNode.removeChild(ma);if(Graph.fileSupport&&+A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(U){null!=I&&(I.parentNode.removeChild(I),I=null);U.stopPropagation();+U.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(U){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(U){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<U.dataTransfer.files.length)this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,function(T,X,aa,ja,pa,sa){f.insertImage(T,pa,sa)},function(){},function(T){return"image/"==T.type.substring(0,+6)},function(T){for(var X=0;X<T.length;X++)T[X]()},mxEvent.isControlDown(U));else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var O=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(T){var X=Math.max(1,T.width);T=Math.max(1,T.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,X)),aa/Math.max(1,T));f.insertImage(decodeURIComponent(O),X*aa,T*aa)})):document.execCommand("insertHTML",+!1,U.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(U.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(U.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/plain"));U.stopPropagation();U.preventDefault()})))}));if(Editor.isSettingsEnabled()){la=this.editor.graph.view;var Y=mxSettings.getUnit();la.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:+Y;la.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,la.unit);this.refresh()}if("1"==urlParams.styledev){la=document.getElementById("geFooter");null!=la&&(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)})),la.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,+mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var ma=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:ma.apply(this,arguments)}}la=document.getElementById("geInfo");null!=la&&la.parentNode.removeChild(la);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,-"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,T=f.view.translate,P=f.view.scale,U=A.x/P-T.x,X=A.y/P-T.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(X=U=null),this.importFiles(I,U,X,this.maxImageSize,-null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(X=U=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,U,X,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);-var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(ja=I[0].getAttribute("src"),null==ja&&(ja=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(I=A.getElementsByTagName("a"),null!=I&&1==I.length?ja=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,U,X,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=-ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",U,X,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+-aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,U,X,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),U,X,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();-this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),P=parseInt(this.div.offsetHeight),-U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-P))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ma=Editor.currentTheme,"simple"==ma||"sketch"==ma)Editor.currentTheme="",this.doSetCurrentTheme(ma,-mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);ma=!1;null!=urlParams.dark?ma=urlParams.dark:(ma="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ma&&"auto"!=mxSettings.settings.darkMode||(ma=mxSettings.settings.darkMode));"auto"==ma&&-this.isAutoDarkModeSupported()&&(ma=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ma?"1"==ma:ma);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&+"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,U=f.view.translate,O=f.view.scale,T=A.x/O-U.x,X=A.y/O-U.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(X=T=null),this.importFiles(I,T,X,this.maxImageSize,+null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(X=T=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,T,X,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);+var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(ja=I[0].getAttribute("src"),null==ja&&(ja=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(I=A.getElementsByTagName("a"),null!=I&&1==I.length?ja=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,T,X,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=+ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",T,X,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="++aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,T,X,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),T,X,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();+this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,U=parseInt(this.div.offsetTop),O=parseInt(this.div.offsetHeight),+T=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(U,T-O))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(la=Editor.currentTheme,"simple"==la||"sketch"==la)Editor.currentTheme="",this.doSetCurrentTheme(la,+mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);la=!1;null!=urlParams.dark?la=urlParams.dark:(la="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||la&&"auto"!=mxSettings.settings.darkMode||(la=mxSettings.settings.darkMode));"auto"==la&&+this.isAutoDarkModeSupported()&&(la=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof la?"1"==la:la);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius="5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,-mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var ea=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",ea=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",+mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var da=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",da=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==C&&null==F||mxEvent.consume(J);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,-function(K,J,ea,da,ca,W){c.insertImage(K,ca,W)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,+function(K,J,da,ea,ca,W){c.insertImage(K,ca,W)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML=" ";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize="none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML=" ";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||@@ -3873,21 +3873,21 @@ this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCellC.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&(N=!0,F=K)}catch(ba){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(ba){var ha=-this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var ma=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,ma,ma));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var J=!1,ea="";ea=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==-z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var da=ea.lastIndexOf("%3E");0<=da&&da<ea.length-3&&(ea=ea.substring(0,da+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(ea))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,ea=-K)}catch(ba){}try{if(null!=ea&&0<ea.length){if(0==ea.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{ea=(new MiroImporter).importMiroJson(JSON.parse(ea)),this.pasteXml(ea,t,J,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(ea,t,J,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var W=this.editor.graph;W.lastPasteXml=null;W.pasteCounter=+this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var la=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,la,la));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var J=!1,da="";da=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==+z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var ea=da.lastIndexOf("%3E");0<=ea&&ea<da.length-3&&(da=da.substring(0,ea+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(da))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,da=+K)}catch(ba){}try{if(null!=da&&0<da.length){if(0==da.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{da=(new MiroImporter).importMiroJson(JSON.parse(da)),this.pasteXml(da,t,J,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(da,t,J,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var W=this.editor.graph;W.lastPasteXml=null;W.pasteCounter=0}}catch(ba){this.handleError(ba)}}}f.innerHTML=" "};EditorUi.prototype.showPrintDialog=function(c,f){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+-1:1,F=mxUtils.bind(this,function(ma,Y,la,Z){var k=ma.useCssTransforms,A=ma.currentTranslate,I=ma.currentScale,T=ma.view.translate,P=ma.view.scale;ma.useCssTransforms&&(ma.useCssTransforms=!1,ma.currentTranslate=new mxPoint(0,0),ma.currentScale=1,ma.view.translate=new mxPoint(0,0),ma.view.scale=1);var U=ma.getGraphBounds(),X=0,aa=0,ja=mxRectangle.fromRectangle(ma.pageFormat),pa=f.fit||f.crop||!ma.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*ma.pageScale);ja.height=Math.ceil(ja.height*ma.pageScale);-var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(U.height/ma.view.scale),ja.width*qa/(U.width/ma.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&ma.pageVisible?(sa=ma.getPageLayout(),X-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(U=t.getBoundingBox(t.getSelectionCells())),ja.width=(U.width+1)*qa/ma.view.scale,ja.height=(U.height+1)*qa/ma.view.scale);ja.width=Math.ceil(1*-ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(ma,qa,null,0,X,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;X=f.border;isNaN(X)||(Y.pageMargin=X);f.selection&&(Y.isCellVisible=function(ra){return ma.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),-ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=ma.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)++1:1,F=mxUtils.bind(this,function(la,Y,ma,Z){var k=la.useCssTransforms,A=la.currentTranslate,I=la.currentScale,U=la.view.translate,O=la.view.scale;la.useCssTransforms&&(la.useCssTransforms=!1,la.currentTranslate=new mxPoint(0,0),la.currentScale=1,la.view.translate=new mxPoint(0,0),la.view.scale=1);var T=la.getGraphBounds(),X=0,aa=0,ja=mxRectangle.fromRectangle(la.pageFormat),pa=f.fit||f.crop||!la.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*la.pageScale);ja.height=Math.ceil(ja.height*la.pageScale);+var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(T.height/la.view.scale),ja.width*qa/(T.width/la.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&la.pageVisible?(sa=la.getPageLayout(),X-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(T=t.getBoundingBox(t.getSelectionCells())),ja.width=(T.width+1)*qa/la.view.scale,ja.height=(T.height+1)*qa/la.view.scale);ja.width=Math.ceil(1*+ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(la,qa,null,0,X,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;X=f.border;isNaN(X)||(Y.pageMargin=X);f.selection&&(Y.isCellVisible=function(ra){return la.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),+ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=la.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)+'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Ea=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ma,Ha,Aa){Ea.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};-f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.open(null,null,la,!0,Z,ja,f.selection?ma.getSelectionCells():null)}else{U=ma.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";Y.backgroundColor=U;Y.autoOrigin=pa;f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.appendGraph(ma,qa,-X,aa,la,!0,Z,ja,f.selection?ma.getSelectionCells():null);la=ma.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<la.length;ja++)X=la[ja].name,aa=la[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(X)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&-(ma.useCssTransforms=k,ma.currentTranslate=A,ma.currentScale=I,ma.view.translate=T,ma.view.scale=P);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var ea=J;ea<=C;ea++){var da=this.pages[ea];N=da==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);-N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,W=null;null==da.viewState&&null==da.root&&this.updatePageRoot(da);null!=da.viewState&&(K=da.viewState.pageVisible,J=da.viewState.mathEnabled,ca=da.viewState.background,W=da.viewState.backgroundImage,N.pageFormat=da.viewState.pageFormat,N.gridSize=da.viewState.gridSize);null!=W&&null!=W.originalSrc&&(W=this.createImageForPageLink(W.originalSrc,da));N.background=ca;N.backgroundImage=null!=-W?new mxImage(W.src,W.width,W.height,W.x,W.y):null;N.pageVisible=K;N.mathEnabled=J;var ba=N.getGraphBounds;N.getGraphBounds=function(){var ma=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var la=this.view.translate,Z=this.view.scale;ma=mxRectangle.fromRectangle(ma);ma.add(new mxRectangle((la.x+Y.x)*Z,(la.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return ma};var ha=N.getGlobalVariable;N.getGlobalVariable=function(ma){return"page"==ma?da.getName():"pagenumber"==ma?-ea+1:"pagecount"==ma?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(da);N.model.setRoot(da.root)}z=F(N,z,ea!=C,da.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),+f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.open(null,null,ma,!0,Z,ja,f.selection?la.getSelectionCells():null)}else{T=la.background;if(null==T||""==T||T==mxConstants.NONE)T="#ffffff";Y.backgroundColor=T;Y.autoOrigin=pa;f.grid&&(Y.gridSize=la.gridSize,Y.gridSteps=la.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:la.view.gridColor);Y.appendGraph(la,qa,+X,aa,ma,!0,Z,ja,f.selection?la.getSelectionCells():null);ma=la.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<ma.length;ja++)X=ma[ja].name,aa=ma[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(X)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&+(la.useCssTransforms=k,la.currentTranslate=A,la.currentScale=I,la.view.translate=U,la.view.scale=O);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var da=J;da<=C;da++){var ea=this.pages[da];N=ea==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);+N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,W=null;null==ea.viewState&&null==ea.root&&this.updatePageRoot(ea);null!=ea.viewState&&(K=ea.viewState.pageVisible,J=ea.viewState.mathEnabled,ca=ea.viewState.background,W=ea.viewState.backgroundImage,N.pageFormat=ea.viewState.pageFormat,N.gridSize=ea.viewState.gridSize);null!=W&&null!=W.originalSrc&&(W=this.createImageForPageLink(W.originalSrc,ea));N.background=ca;N.backgroundImage=null!=+W?new mxImage(W.src,W.width,W.height,W.x,W.y):null;N.pageVisible=K;N.mathEnabled=J;var ba=N.getGraphBounds;N.getGraphBounds=function(){var la=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var ma=this.view.translate,Z=this.view.scale;la=mxRectangle.fromRectangle(la);la.add(new mxRectangle((ma.x+Y.x)*Z,(ma.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return la};var ha=N.getGlobalVariable;N.getGlobalVariable=function(la){return"page"==la?ea.getName():"pagenumber"==la?+da+1:"pagecount"==la?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(ea);N.model.setRoot(ea.root)}z=F(N,z,da!=C,ea.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):@@ -3911,38 +3911,38 @@ this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();tf){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,J){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,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var J=K.data,ea=null,da=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):+"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,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var J=K.data,da=null,ea=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ca=!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[J])}catch(ra){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));return}if("prompt"==J.action){this.spinner.stop();var W=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",-value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(W.container,300,80,!0,!1);W.init();return}if("draft"==J.action){var ba=da(J.xml);this.spinner.stop();W=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();+value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(W.container,300,80,!0,!1);W.init();return}if("draft"==J.action){var ba=ea(J.xml);this.spinner.stop();W=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):null,J.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):null);this.showDialog(W.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&-this.actions.get("exit").funct()}));try{W.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ha=1==J.enableRecent,ma=1==J.enableSearch,Y=1==J.enableCustomTemp;W=new NewDialog(this,!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,-libs:Ma,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,ma?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",-docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(W.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));W.init();return}if("textContent"==J.action){var la=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:la,message:J}),"*");return}if("status"==+this.actions.get("exit").funct()}));try{W.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ha=1==J.enableRecent,la=1==J.enableSearch,Y=1==J.enableCustomTemp;W=new NewDialog(this,!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,+libs:Ma,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,la?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",+docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(W.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));W.init();return}if("textContent"==J.action){var ma=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:ma,message:J}),"*");return}if("status"==J.action){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==J.action){var Z=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){null!=J.viewport&&(this.embedViewport=J.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==J.action){W=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),W=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=W&&this.restoreScrollState(W);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);-return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,T=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){T(ra,Ma)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,-"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),P=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);T(ra)}),U=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():-this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==U){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(I.container);-I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ma=I.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<J.layerIds.length;Ca++)Aa[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){P(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){P(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,-J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?T("data:image/png;base64,"+ra.getText()):P(null)}),-mxUtils.bind(this,function(){P(null)}))}}else if(X=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;+return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,U=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){U(ra,Ma)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,+"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),O=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);U(ra)}),T=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():+this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=T){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==T){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(I.container);+I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ma=I.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<J.layerIds.length;Ca++)Aa[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){O(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){O(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,+J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=T?"&pageId="+T:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):O(null)}),+mxUtils.bind(this,function(){O(null)}))}}else if(X=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=J.background?J.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";J.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(Ma=J.theme);if("xmlsvg"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=J.theme&&(Ma=J.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,J.embedImages,ya,J.scale,J.border,J.shadow,Ma)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||J.shadow,null,Ma),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){J.embedImages||null==J.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){aa.apply(this,arguments);X()}}l=!0;this.setFileData(J.xml);l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==J.action){ca=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var ja=Editor.sketchMode;this.doSetSketchMode(J.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=-"";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;ea=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*+"";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;da=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,J.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),-this.embedFilenameSpan=ba);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=da(J.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?+this.embedFilenameSpan=ba);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=ea(J.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,K.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,ya,null,ca)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",-f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=ea&&ea()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==-J.substring(0,34)?(da="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),da)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&-299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=da(J),Ea(J,K)):this.loadDescriptor(J,-mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,ea){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:ea}),"*")}}};EditorUi.prototype.createEmbedButton=+f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=da&&da()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==+J.substring(0,34)?(ea="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),ea)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&+299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=ea(J),Ea(J,K)):this.loadDescriptor(J,+mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,da){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:da}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?@@ -3951,23 +3951,23 @@ mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct)new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",-function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,ea=null,da=null,ca=-null,W=null,ba=null,ha=null,ma="whiteSpace=wrap;html=1;",Y=null,la=null,Z="",k="auto",A="auto",I=!1,T=null,P=null,U=40,X=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";la=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=-l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?W=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?ea=Aa:"parentstyle"==Ha?ma=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==-Ha&&0<Aa.length&&"-"!=Aa?ca=Aa:"styles"==Ha&&0<Aa.length&&"-"!=Aa?da=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?J=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?la=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?I="true"==Aa:"left"==Ha&&0<Aa.length?T=Aa:"top"==Ha&&0<Aa.length?P=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):-"edgespacing"==Ha?U=parseFloat(Aa):"nodespacing"==Ha?X=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),la==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==+function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,da=null,ea=null,ca=+null,W=null,ba=null,ha=null,la="whiteSpace=wrap;html=1;",Y=null,ma=null,Z="",k="auto",A="auto",I=!1,U=null,O=null,T=40,X=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";ma=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=+l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?W=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?da=Aa:"parentstyle"==Ha?la=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==+Ha&&0<Aa.length&&"-"!=Aa?ca=Aa:"styles"==Ha&&0<Aa.length&&"-"!=Aa?ea=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?J=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?ma=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?I="true"==Aa:"left"==Ha&&0<Aa.length?U=Aa:"top"==Ha&&0<Aa.length?O=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):+"edgespacing"==Ha?T=parseFloat(Aa):"nodespacing"==Ha?X=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),ma==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==N[Ea[Za].to]&&(N[Ea[Za].to]={});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,-sa,0,0),ea||"whiteSpace=wrap;html=1;");M.collapsed=I;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,I);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=W&&null!=ha){var V=ha[M.getAttribute(W)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ca&&null!=da){var ia=da[M.getAttribute(ca)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,-J);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);la=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=-null!=la?0:qa;Ca=null!=la?0:wa;null!=T&&null!=Da.getAttribute(T)&&(Da.geometry.x=$a+parseFloat(Da.getAttribute(T)));null!=P&&null!=Da.getAttribute(P)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(P)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=-A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+X}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=la?(la.style=K.replacePlaceholders(la,ma,J),K.addCell(Da,la),z.push(la)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);+sa,0,0),da||"whiteSpace=wrap;html=1;");M.collapsed=I;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,I);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=W&&null!=ha){var V=ha[M.getAttribute(W)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ca&&null!=ea){var ia=ea[M.getAttribute(ca)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,+J);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);ma=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=+null!=ma?0:qa;Ca=null!=ma?0:wa;null!=U&&null!=Da.getAttribute(U)&&(Da.geometry.x=$a+parseFloat(Da.getAttribute(U)));null!=O&&null!=Da.getAttribute(O)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(O)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=+A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+X}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=ma?(ma.style=K.replacePlaceholders(ma,la,J),K.addCell(Da,ma),z.push(ma)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,J);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,J)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,J));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,J):K.createCurrentEdgeStyle();eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,J));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=-ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=U;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());+ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=T;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=X;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==-za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=X;cb.parallelEdgeSpacing=U;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,X),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,+za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=X;cb.parallelEdgeSpacing=T;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,X),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*X;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||@@ -3975,29 +3975,29 @@ f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParthis.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("smartFit").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);l=this.actions.get("autoMode");l.setEnabled(l.isEnabled()&&"atlas"!=Editor.currentTheme);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&-this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var O=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){O.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),l=this.getSelectionState(),t=this.isDiagramActive(),z="1"==+this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var c=this.openLibraries;this.openLibraries=null;if(null!=c)for(var f=0;f<c.length;f++)this.libraryLoaded(c[f].file,c[f].images,c[f].title,null!=c[f].div?"none"!=c[f].div.style.display:c[f].expand)};var P=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){P.apply(this,arguments);var c=this.editor.graph,f=this.getCurrentFile(),l=this.getSelectionState(),t=this.isDiagramActive(),z="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=f&&f.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&z);this.actions.get("redo").setEnabled(this.canRedo()&&z);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(t);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("editConnectionPoints").setEnabled(t&&0==l.edges.length&&1==l.vertices.length);this.actions.get("editImage").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.cells.length);this.actions.get("pageSetup").setEnabled(t);this.actions.get("shadowVisible").setEnabled(t);this.actions.get("connectionArrows").setEnabled(t);this.actions.get("connectionPoints").setEnabled(t);this.actions.get("copyStyle").setEnabled(t&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=this.copiedStyle&&t&&0<l.cells.length);this.actions.get("editGeometry").setEnabled(0<l.vertices.length);this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var R=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);R.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=-!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),ea=K.getGraphBounds(),da=Math.floor(ea.width*z/K.view.scale),ca=Math.floor(ea.height*z/K.view.scale);if(J.length<=MAX_REQUEST_SIZE&&da*ca<MAX_AREA)if(c.hideDialog(),-"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var W={globalVars:K.getExportVariables()};N&&(W.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(W))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+da+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,+!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),da=K.getGraphBounds(),ea=Math.floor(da.width*z/K.view.scale),ca=Math.floor(da.height*z/K.view.scale);if(J.length<=MAX_REQUEST_SIZE&&ea*ca<MAX_AREA)if(c.hideDialog(),+"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var W={globalVars:K.getExportVariables()};N&&(W.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(W))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+ea+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,null==t||"none"==t,!0,!1,!1,C,!0,!1,null,N,F):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(J){}this.remoteInvoke("getCustomLibraries",null,null,function(J){z.innerText="";if(0==J.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+-"</div>";else for(var ea=0;ea<J.length;ea++){var da=J[ea];C[da.id]&&(f[da.id]=da);var ca=this.addCheckbox(z,da.title,C[da.id]);(function(W,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[W.id]=W:delete f[W.id]})})(da,ca)}},mxUtils.bind(this,function(J){z.innerText="";var ea=document.createElement("div");ea.style.padding="8px";ea.style.textAlign="center";mxUtils.write(ea,mxResources.get("error")+": ");mxUtils.write(ea,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));-z.appendChild(ea)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,ea;for(ea in f)null==C[ea]&&(J++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,da)),this.showSidebar()}catch(W){this.handleError(W,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;-0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ea]));for(ea in C)f[ea]||this.closeLibrary(new RemoteLibrary(this,null,C[ea]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,+"</div>";else for(var da=0;da<J.length;da++){var ea=J[da];C[ea.id]&&(f[ea.id]=ea);var ca=this.addCheckbox(z,ea.title,C[ea.id]);(function(W,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[W.id]=W:delete f[W.id]})})(ea,ca)}},mxUtils.bind(this,function(J){z.innerText="";var da=document.createElement("div");da.style.padding="8px";da.style.textAlign="center";mxUtils.write(da,mxResources.get("error")+": ");mxUtils.write(da,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));+z.appendChild(da)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,da;for(da in f)null==C[da]&&(J++,mxUtils.bind(this,function(ea){this.remoteInvoke("getFileContent",[ea.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,ea)),this.showSidebar()}catch(W){this.handleError(W,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;+0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[da]));for(da in C)f[da]||this.closeLibrary(new RemoteLibrary(this,null,C[da]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,z){var C=!0,F=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(F);C&&t.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(F);-C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(J,ea){var da={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=ea?da.error={errResp:ea}:null!=J&&-(da.resp=J);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),+C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(J,da){var ea={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=da?ea.error={errResp:da}:null!=J&&+(ea.resp=J);this.remoteWin.postMessage(JSON.stringify(ea),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(J){l(null,"Invalid Call: An error occurred, "+J.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};t.onsuccess=mxUtils.bind(this,function(z){try{var C=t.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var N=-document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,ea,da=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),W=mxUtils.bind(this,function(){da++;ba()}),ba=mxUtils.bind(this,function(){try{if(da>=ea.length)ca();else{var ma=-ea[da];StorageFile.getFileContent(this,ma,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==ma&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ma]}),"*"):W()}),W)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(ma){try{this.setDatabaseItem(null,[{title:ma.title,size:ma.data.length,lastModified:Date.now(),type:ma.isLib?"L":"F"},{title:ma.title,data:ma.data}],W,W,["filesInfo","files"])}catch(Y){console.log(Y)}});-F=mxUtils.bind(this,function(ma){try{if(ma.source==N.contentWindow){var Y={};try{Y=JSON.parse(ma.data)}catch(la){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(ea=Y.resp[0],K=!1,ba()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):W())}}catch(la){console.log(la)}});+document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,da,ea=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),W=mxUtils.bind(this,function(){ea++;ba()}),ba=mxUtils.bind(this,function(){try{if(ea>=da.length)ca();else{var la=+da[ea];StorageFile.getFileContent(this,la,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==la&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[la]}),"*"):W()}),W)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(la){try{this.setDatabaseItem(null,[{title:la.title,size:la.data.length,lastModified:Date.now(),type:la.isLib?"L":"F"},{title:la.title,data:la.data}],W,W,["filesInfo","files"])}catch(Y){console.log(Y)}});+F=mxUtils.bind(this,function(la){try{if(la.source==N.contentWindow){var Y={};try{Y=JSON.parse(la.data)}catch(ma){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(da=Y.resp[0],K=!1,ba()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):W())}}catch(ma){console.log(ma)}});window.addEventListener("message",F)}})));c(C);C.onversionchange=function(){C.close()}}catch(F){null!=f?f(F):null!=window.console&&console.warn(F)}});t.onerror=f;t.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,t,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var F=C.transaction(z,"readwrite");F.oncomplete=l;F.onerror=t;for(C=0;C<z.length;C++)F.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);var C=z.transaction(t,"readwrite");C.oncomplete=f;C.onerror=l;for(z=0;z<t.length;z++)C.objectStore(t[z]).delete(c[z])}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";var C=z.transaction([t],"readonly").objectStore(t).get(c);C.onsuccess=function(){f(C.result)};C.onerror=l}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(F){null==F.target.result?c(C):(C.push(F.target.result.value),@@ -4006,33 +4006,33 @@ this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.protc.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,da,ea,ca,W,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z="<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();-var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,ma=0;ma<ba.length;ma++)"none"!=ba[ma].style.display&&ba[ma].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,ma,Y){function la(){ha.removeChild(A);ha.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:ma,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");-A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var T=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):la();t=null});T.className="geCommentEditBtn";I.appendChild(T);var P=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);la();ma(ba);t=null});mxEvent.addListener(A,"keydown",-mxUtils.bind(this,function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(P.click(),mxEvent.consume(U)):27==U.keyCode&&(T.click(),mxEvent.consume(U)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";I.appendChild(P);ha.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var ma=b.timeSince(ba);null==ma&&(ma=mxResources.get("lessThanAMinute"));-mxUtils.write(ha,mxResources.get("timeAgo",[ma],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function O(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,ma,Y,la){function Z(aa,+var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,la=0;la<ba.length;la++)"none"!=ba[la].style.display&&ba[la].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,la,Y){function ma(){ha.removeChild(A);ha.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:la,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");+A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):ma();t=null});U.className="geCommentEditBtn";I.appendChild(U);var O=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);ma();la(ba);t=null});mxEvent.addListener(A,"keydown",+mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(O.click(),mxEvent.consume(T)):27==T.keyCode&&(U.click(),mxEvent.consume(T)))}));O.focus();O.className="geCommentEditBtn gePrimaryBtn";I.appendChild(O);ha.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var la=b.timeSince(ba);null==la&&(la=mxResources.get("lessThanAMinute"));+mxUtils.write(ha,mxResources.get("timeAgo",[la],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function P(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,la,Y,ma){function Z(aa,ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});X.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=I;aa(ba);return{pdiv:pa,-replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();O(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(la||!ba.isResolved){N.style.display="none";var I=-document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",ba.id);I.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var T=document.createElement("div");T.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;T.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";T.appendChild(P);var U=document.createElement("div");-U.className="geCommentUsername";mxUtils.write(U,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));P.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",ba.id);S(ba,U);P.appendChild(U);I.appendChild(T);T=document.createElement("div");T.className="geCommentTxt";mxUtils.write(T,ba.content||"");I.appendChild(T);ba.isLocked&&(I.style.opacity="0.5");T=document.createElement("div");T.className="geCommentActions";var X=document.createElement("ul");-X.className="geCommentActionsList";T.appendChild(X);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);P=b.getCurrentUser();null==P||null==ba.user||P.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,I,function(){G(I);ba.editComment(ba.content,function(){R(I)},function(ja){O(I);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),+replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();P(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(ma||!ba.isResolved){N.style.display="none";var I=+document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",ba.id);I.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var O=document.createElement("img");O.className="geCommentUserImg";O.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;U.appendChild(O);O=document.createElement("div");O.className="geCommentHeaderTxt";U.appendChild(O);var T=document.createElement("div");+T.className="geCommentUsername";mxUtils.write(T,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));O.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ba.id);S(ba,T);O.appendChild(T);I.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,ba.content||"");I.appendChild(U);ba.isLocked&&(I.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var X=document.createElement("ul");+X.className="geCommentActionsList";U.appendChild(X);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);O=b.getCurrentUser();null==O||null==ba.user||O.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,I,function(){G(I);ba.editComment(ba.content,function(){R(I)},function(ja){P(I);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){G(I);ba.deleteComment(function(aa){if(!0===aa){aa=I.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=I.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(I);I.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==-F.getElementsByTagName("div").length?"block":"none"}},function(aa){O(I);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=-"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);da||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});I.appendChild(T);null!=ma?F.insertBefore(I,ma.nextSibling):F.appendChild(I);for(ma=0;null!=ba.replies&&-ma<ba.replies.length;ma++)T=ba.replies[ma],T.isResolved=ba.isResolved,c(T,ba.replies,null,Y+1,la);null!=t&&(t.comment.id==ba.id?(la=ba.content,ba.content=t.comment.content,H(ba,I,t.saveCallback,t.deleteOnCancel),ba.content=la):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "++F.getElementsByTagName("div").length?"block":"none"}},function(aa){P(I);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=+"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);ea||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});I.appendChild(U);null!=la?F.insertBefore(I,la.nextSibling):F.appendChild(I);for(la=0;null!=ba.replies&&+la<ba.replies.length;la++)U=ba.replies[la],U.isResolved=ba.isResolved,c(U,ba.replies,null,Y+1,ma);null!=t&&(t.comment.id==ba.id?(ma=ba.content,ba.content=t.comment.content,H(ba,I,t.saveCallback,t.deleteOnCancel),ba.content=ma):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var C=EditorUi.compactUi?"26px":"30px",F=document.createElement("div");F.className="geCommentsList";F.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";F.style.bottom=parseInt(C)+7+"px";z.appendChild(F);var N=document.createElement("span");N.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(N,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var J=C.cloneNode();J.style.backgroundImage="url("+Editor.plusImage+")";J.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(J,-"click",function(ba){function ha(){H(ma,Y,function(la){G(Y);b.addComment(la,function(Z){la.id=Z;ca.push(la);R(Y)},function(Z){O(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),Y=c(ma,ca,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(J)}var ea=C.cloneNode();ea.classList.add("geToggleItem");ea.style.backgroundImage="url("+Editor.checkImage+")";ea.setAttribute("title",mxResources.get("showResolved"));-var da=!1;mxEvent.addListener(ea,"click",function(ba){(da=!da)?ea.classList.add("geActiveItem"):ea.classList.remove("geActiveItem");W();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(ea);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(ba){W();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=+"click",function(ba){function ha(){H(la,Y,function(ma){G(Y);b.addComment(ma,function(Z){ma.id=Z;ca.push(ma);R(Y)},function(Z){P(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var la=b.newComment("",b.getCurrentUser()),Y=c(la,ca,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(J)}var da=C.cloneNode();da.classList.add("geToggleItem");da.style.backgroundImage="url("+Editor.checkImage+")";da.setAttribute("title",mxResources.get("showResolved"));+var ea=!1;mxEvent.addListener(da,"click",function(ba){(ea=!ea)?da.classList.add("geActiveItem"):da.classList.remove("geActiveItem");W();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(da);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(ba){W();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ca=[],W=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;-ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(ma){b.handleError(ma)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ma){function Y(la){if(null!=la){la.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<la.length;Z++)Y(la[Z].replies)}}ma.sort(function(la,-Z){return new Date(la.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ca=ma;for(ma=0;ma<ca.length;ma++)Y(ca[ma].replies),c(ca[ma],ca,null,0,da);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(ma){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});-W();this.refreshComments=W;K=mxUtils.bind(this,function(){function ba(Z){var k=ma[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),ma={},Y=0;Y<ha.length;Y++){var la=ha[Y];ma[la.getAttribute("data-commentId")]=la}for(Y=0;Y<ca.length;Y++)ba(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=-new mxRectangle(0,0,260,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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,O){var R=document.createElement("div");R.style.textAlign="center";O=null!=O?O:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=-O+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";+ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(la){b.handleError(la)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(la){function Y(ma){if(null!=ma){ma.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<ma.length;Z++)Y(ma[Z].replies)}}la.sort(function(ma,+Z){return new Date(ma.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ca=la;for(la=0;la<ca.length;la++)Y(ca[la].replies),c(ca[la],ca,null,0,ea);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(la){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(la&&la.message?": "+la.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});+W();this.refreshComments=W;K=mxUtils.bind(this,function(){function ba(Z){var k=la[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),la={},Y=0;Y<ha.length;Y++){var ma=ha[Y];la[ma.getAttribute("data-commentId")]=ma}for(Y=0;Y<ca.length;Y++)ba(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=+new mxRectangle(0,0,260,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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,P){var R=document.createElement("div");R.style.textAlign="center";P=null!=P?P:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=+P+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";null!=H&&(p.innerHTML=H+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var l=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(f.checked)});G.appendChild(l);null!=B?(l.innerHTML=B+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||G.appendChild(p);R.appendChild(G);S?(G.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(f),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),c.appendChild(u),R.appendChild(c),mxEvent.addListener(u,"click",function(t){f.checked=!f.checked;mxEvent.consume(t)})):G.style.marginTop="12px";this.init=function(){l.focus()};this.container=R},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};HeadlessEditorUi.prototype.updateActionStates=function(){};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.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};@@ -4100,7 +4100,7 @@ EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxRm=mxEvent.getClientY(b);e.popup(g,m,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var g=this.createTab(),m=b.getName()||mxResources.get("untitled"),u=b.getId();g.setAttribute("title",m+(null!=u?" ("+u+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,m);g.appendChild(e);this.addTabListeners(b,g);return g};EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var g=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(S){this.renamePage(b);mxEvent.consume(S)}));var m=document.createElement("div");m.className="geTabMenuButton";m.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";m.style.backgroundSize="10px";e.appendChild(m);var u=!1,p=!1,B=mxUtils.bind(this,function(S){u=null!=this.currentMenu;p=b==this.currentPage;this.scrollToPage(b);g.isMouseDown||p||this.selectPage(b)}),H=mxUtils.bind(this,function(S){if(g.isEnabled()&&!g.isMouseDown&&(p&&(mxEvent.isTouchEvent(S)||mxEvent.getSource(S)==m)||mxEvent.isPopupTrigger(S))&&(g.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(S)||!u)){var G=new mxPopupMenu(this.createPageMenu(b));G.div.className+=" geMenubarMenu";G.smartSeparators=!0;G.showDisabled=!0;G.autoExpand=!0;G.hideMenu=mxUtils.bind(this,-function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var O=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(O,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};+function(){mxPopupMenu.prototype.hideMenu.apply(G,arguments);this.resetCurrentMenu();G.destroy()});var P=mxEvent.getClientX(S),R=mxEvent.getClientY(S);G.popup(P,R,null,S);this.setCurrentMenu(G,e)}mxEvent.consume(S)});mxEvent.addGestureListeners(m,B,null,H);mxEvent.addGestureListeners(e,B,null,H)};EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(g,m){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||g.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),m));g.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),m);g.addSeparator(m);this.currentPage==b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("move"));g.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),m);g.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),m)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.oldIndex;m.oldIndex=m.newIndex;m.newIndex=e;return m};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){e=m.previous;m.previous=m.name;m.name=e;return m};mxCodecRegistry.register(b)})();@@ -4108,50 +4108,50 @@ b&&1<this.pages.length&&this.menus.addSubmenu("movePage",g,m,mxResources.get("mob.beforeDecode=function(e,g,m){m.ui=e.ui;m.relatedPage=m.ui.getPageById(g.getAttribute("relatedPage"));if(null==m.relatedPage){var u=g.ownerDocument.createElement("diagram");u.setAttribute("id",g.getAttribute("relatedPage"));u.setAttribute("name",g.getAttribute("name"));m.relatedPage=new DiagramPage(u);u=g.getAttribute("viewState");null!=u&&(m.relatedPage.viewState=JSON.parse(u),g.removeAttribute("viewState"));g=g.cloneNode(!0);u=g.firstChild;if(null!=u)for(m.relatedPage.root=e.decodeCell(u,!1),m=u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nodeType==mxConstants.NODETYPE_ELEMENT){var p=u.getAttribute("id");null==e.lookup(p)&&e.decodeCell(u)}u.parentNode.removeChild(u);u=m}}return g};b.afterDecode=function(e,g,m){m.index=m.previousIndex;return m};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(m,u,p,B,H){u=null!=u?u:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),m));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),G=0;G<p.length;G++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[G]),"treeFolding","0")&&this.foldTreeCell(m,p[G]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=function(m,u){this.model.beginUpdate();try{var p=[];this.traverse(u,!0,mxUtils.bind(this,function(H,S){var G=null!=S&&this.isTreeEdge(S);G&&p.push(S);H==u||null!=S&&!G||p.push(H);return(null==S||G)&&(H==u||!this.model.isCollapsed(H))}));this.model.setCollapsed(u,m);for(var B=0;B<p.length;B++)this.model.setVisible(p[B],!m)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(m){return!this.isEdgeIgnored(m)};Graph.prototype.getTreeEdges=function(m,u,p,B,H,S){return this.model.filterCells(this.getEdges(m,u,p,B,H,S),mxUtils.bind(this,-function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var la=!1;null!=Y&&(la=-"1"==l.getCurrentCellStyle(Y).treeMoving);return la}function p(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),la="tree"==(null!=la?la.style:l.getCellStyle(Y)).containerType);return la}function B(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),l.view.getState(Y),la=null!=(null!=la?la.style:l.getCellStyle(Y)).childLayout);return la}function H(Y){Y=l.view.getState(Y);if(null!=Y){var la=l.getIncomingTreeEdges(Y.cell);if(0<la.length&&(la=l.view.getState(la[0]),null!=la&&(la=-la.absolutePoints,null!=la&&0<la.length&&(la=la[la.length-1],null!=la)))){if(la.y==Y.y&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(la.y==Y.y+Y.height&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(la.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,la){la=null!=la?la:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],-l.model.getTerminal(k[0],!0),!0);var I=H(Y),T=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=la?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=la?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=T.x,A[1].geometry.y-=T.y);var P=l.view.getState(Y),U=l.view.scale;if(null!=P){var X=mxRectangle.fromRectangle(P);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?X.x+=(la?Y.geometry.width+10:-A[1].geometry.width--10)*U:X.y+=(la?Y.geometry.height+10:-A[1].geometry.height-10)*U;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=T=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,-qa.x))/U),T=10+Math.max(T,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/U))}}ja?T=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(la?1:-1)*k,(la?1:-1)*T)}}}return l.addCells(A,-Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var la=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,T=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(X,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&T.push(aa);(null==aa||ja)&&T.push(X);return null==aa||ja});var P=Y.geometry.width+40,-U=Y.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,U=-U):la==mxConstants.DIRECTION_WEST?(P=-P,U=0):la==mxConstants.DIRECTION_EAST&&(U=0);l.moveCells(T,P,U);return l.addCells(k,A)}finally{l.model.endUpdate()}}function O(Y,la){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=la);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);-null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var T=Z.geometry;la=[];l.view.currentRoot==Z&&(T=new mxRectangle);for(var P=0;P<k.length;P++){var U=l.model.getTerminal(k[P],!1);null!=U&&la.push(U)}var X=l.view.getBounds(la),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x-T.x+10,I[1].geometry.y+=-I[1].geometry.height-T.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x+-T.x+10,I[1].geometry.y-=I[1].geometry.height+T.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+T.x+40):I[1].geometry.x+(I[1].geometry.width-T.x+40),I[1].geometry.y=null==X?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ja-aa.y+-T.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}-function R(Y,la,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!la&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||la&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(T,P){return la?T.x+T.width-P.x-P.width:T.y+T.height-P.y-P.height})}return k}function c(Y,la){var Z=H(Y),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;-(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=la?f.actions.get("selectParent").funct():Z==la?(la=l.getOutgoingTreeEdges(Y),null!=la&&0<la.length&&l.setSelectionCell(l.model.getTerminal(la[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=la==mxConstants.DIRECTION_NORTH||la==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=-this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,la,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){la=l.getSelectionCell();var k=l.getOutgoingTreeEdges(la);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(la).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,-Z)):0<l.model.getEdgeCount(la)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(la);if(null!=Y&&0<Y.length){la=[];for(var Z=0;Z<Y.length;Z++)la.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(la)}else l.setSelectionCells(l.model.getChildren(la))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var la=-l.getSelectionCell();if(l.isEnabled()&&null!=la){var Z=[];mxEvent.isControlDown(Y)||l.traverse(la,!0,function(k,A){var I=null!=A&&l.isTreeEdge(A);I&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||I)&&Z.push(k);return null==A||I});if(0==Z.length||1==Z.length&&Z[0]==la)Z=l.model.getDescendants(la);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var la=l.getSelectionCell();l.isEnabled()&&null!=la&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la),-null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(la)));-l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,la){la=null!=la?la:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));la&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(T,P){var U=null!=P&&l.isTreeEdge(P);U&&I.push(P);(null==P||U)&&I.push(T);return null==P||U});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),-Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,la,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,la){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var T=F.call(this,-Y,la);if(T.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var P=l.getIncomingTreeEdges(T[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==P.length&&0<I.length){var U=this.cloneCell(I[0]);this.addEdge(U,l.getDefaultParent(),this.model.getTerminal(I[0],!0),T[k])}}}finally{this.model.endUpdate()}return T};var N=l.moveCells;l.moveCells=function(Y,la,Z,k,A,I,T){for(var P=null,U=[],X=0;X<Y.length;X++)(u(Y[X])||m(Y[X]))&&!B(Y[X])&&this.isCellCollapsed(Y[X])?U=U.concat(this.getSubtree(Y[X])):U.push(Y[X]);Y=-mxUtils.removeDuplicates(U);this.model.beginUpdate();try{U=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(X=0;X<Y.length;X++)if(m(Y[X])||l.model.isEdge(Y[X])&&null==l.model.getTerminal(Y[X],!0)){A=l.model.getParent(Y[X]);break}if(null!=U&&A!=U&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(U);null!=sa&&(la=(sa.getCenterX()--pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}P=N.apply(this,arguments);if(null!=P&&null!=Y&&P.length==Y.length)for(X=0;X<P.length;X++)if(this.model.isEdge(P[X]))m(U)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[X],!0))&&this.model.setTerminal(P[X],U,!0);else if(m(Y[X])&&(ja=l.getIncomingTreeEdges(Y[X]),0<ja.length))if(!k)m(U)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],U,!0);else if(0==l.getIncomingTreeEdges(P[X]).length){aa=-U;if(null==aa||aa==l.model.getParent(Y[X]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,P[X])}}finally{this.model.endUpdate()}return P};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,la,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var T=0;T<I.length;T++)if(A.isEdge(I[T])&&null==A.getTerminal(I[T],!0)){A.setTerminal(I[T],Y,!0);var P=l.getCellGeometry(I[T]);P.points=null;-null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return I}}var J={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ea={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},da=f.onKeyDown;f.onKeyDown=function(Y){try{var la=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=la){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?J[Y.keyCode]:mxEvent.isAltDown(Y)?-ea[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(la)&&(Z=null,0<l.getIncomingTreeEdges(la).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(la):O(la):13==Y.which&&(Z=S(la,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(la)),l.startEditingAtCell(la),mxEvent.consume(Y)):37==Y.keyCode?(c(la,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):-38==Y.keyCode?(c(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(la,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,la,Z,k,A,I,T){var P=l.getIncomingTreeEdges(Y);if(m(Y)){var U=H(Y),X=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,aa=la==mxConstants.DIRECTION_EAST||la==-mxConstants.DIRECTION_WEST;return U==la||0==P.length?O(Y,la):X==aa?G(Y):S(Y,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var la=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||A)&&0>mxUtils.indexOf(la,Z)&&la.push(Z);return null==k||A});return la};var W=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){W.apply(this,+function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var ma=!1;null!=Y&&(ma=+"1"==l.getCurrentCellStyle(Y).treeMoving);return ma}function p(Y){var ma=!1;null!=Y&&(Y=t.getParent(Y),ma=l.view.getState(Y),ma="tree"==(null!=ma?ma.style:l.getCellStyle(Y)).containerType);return ma}function B(Y){var ma=!1;null!=Y&&(Y=t.getParent(Y),ma=l.view.getState(Y),l.view.getState(Y),ma=null!=(null!=ma?ma.style:l.getCellStyle(Y)).childLayout);return ma}function H(Y){Y=l.view.getState(Y);if(null!=Y){var ma=l.getIncomingTreeEdges(Y.cell);if(0<ma.length&&(ma=l.view.getState(ma[0]),null!=ma&&(ma=+ma.absolutePoints,null!=ma&&0<ma.length&&(ma=ma[ma.length-1],null!=ma)))){if(ma.y==Y.y&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(ma.y==Y.y+Y.height&&Math.abs(ma.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(ma.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,ma){ma=null!=ma?ma:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],+l.model.getTerminal(k[0],!0),!0);var I=H(Y),U=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=ma?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=ma?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=U.x,A[1].geometry.y-=U.y);var O=l.view.getState(Y),T=l.view.scale;if(null!=O){var X=mxRectangle.fromRectangle(O);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?X.x+=(ma?Y.geometry.width+10:-A[1].geometry.width-+10)*T:X.y+=(ma?Y.geometry.height+10:-A[1].geometry.height-10)*T;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=U=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&ma!=qa.getCenterX()<O.getCenterX()||!ja&&ma!=qa.getCenterY()<O.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,+qa.x))/T),U=10+Math.max(U,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/T))}}ja?U=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&ma!=qa.getCenterX()<O.getCenterX()||!ja&&ma!=qa.getCenterY()<O.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(ma?1:-1)*k,(ma?1:-1)*U)}}}return l.addCells(A,+Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var ma=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,U=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(X,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&U.push(aa);(null==aa||ja)&&U.push(X);return null==aa||ja});var O=Y.geometry.width+40,+T=Y.geometry.height+40;ma==mxConstants.DIRECTION_SOUTH?O=0:ma==mxConstants.DIRECTION_NORTH?(O=0,T=-T):ma==mxConstants.DIRECTION_WEST?(O=-O,T=0):ma==mxConstants.DIRECTION_EAST&&(T=0);l.moveCells(U,O,T);return l.addCells(k,A)}finally{l.model.endUpdate()}}function P(Y,ma){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=ma);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);+null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var U=Z.geometry;ma=[];l.view.currentRoot==Z&&(U=new mxRectangle);for(var O=0;O<k.length;O++){var T=l.model.getTerminal(k[O],!1);null!=T&&ma.push(T)}var X=l.view.getBounds(ma),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x-U.x+10,I[1].geometry.y+=+I[1].geometry.height-U.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x+-U.x+10,I[1].geometry.y-=I[1].geometry.height+U.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+U.x+40):I[1].geometry.x+(I[1].geometry.width-U.x+40),I[1].geometry.y=null==X?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ja-aa.y+-U.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}+function R(Y,ma,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!ma&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||ma&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(U,O){return ma?U.x+U.width-O.x-O.width:U.y+U.height-O.y-O.height})}return k}function c(Y,ma){var Z=H(Y),k=ma==mxConstants.DIRECTION_EAST||ma==mxConstants.DIRECTION_WEST;+(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=ma?f.actions.get("selectParent").funct():Z==ma?(ma=l.getOutgoingTreeEdges(Y),null!=ma&&0<ma.length&&l.setSelectionCell(l.model.getTerminal(ma[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=ma==mxConstants.DIRECTION_NORTH||ma==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=+this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,ma,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){ma=l.getSelectionCell();var k=l.getOutgoingTreeEdges(ma);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(ma).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,+Z)):0<l.model.getEdgeCount(ma)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var ma=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(ma);if(null!=Y&&0<Y.length){ma=[];for(var Z=0;Z<Y.length;Z++)ma.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(ma)}else l.setSelectionCells(l.model.getChildren(ma))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var ma=+l.getSelectionCell();if(l.isEnabled()&&null!=ma){var Z=[];mxEvent.isControlDown(Y)||l.traverse(ma,!0,function(k,A){var I=null!=A&&l.isTreeEdge(A);I&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||I)&&Z.push(k);return null==A||I});if(0==Z.length||1==Z.length&&Z[0]==ma)Z=l.model.getDescendants(ma);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var ma=l.getSelectionCell();l.isEnabled()&&null!=ma&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(ma),+null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var ma=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(ma);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(ma)));+l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,ma){ma=null!=ma?ma:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));ma&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(U,O){var T=null!=O&&l.isTreeEdge(O);T&&I.push(O);(null==O||T)&&I.push(U);return null==O||T});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),+Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,ma,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(ma,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,ma){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var U=F.call(this,+Y,ma);if(U.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var O=l.getIncomingTreeEdges(U[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==O.length&&0<I.length){var T=this.cloneCell(I[0]);this.addEdge(T,l.getDefaultParent(),this.model.getTerminal(I[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var N=l.moveCells;l.moveCells=function(Y,ma,Z,k,A,I,U){for(var O=null,T=[],X=0;X<Y.length;X++)(u(Y[X])||m(Y[X]))&&!B(Y[X])&&this.isCellCollapsed(Y[X])?T=T.concat(this.getSubtree(Y[X])):T.push(Y[X]);Y=+mxUtils.removeDuplicates(T);this.model.beginUpdate();try{T=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(X=0;X<Y.length;X++)if(m(Y[X])||l.model.isEdge(Y[X])&&null==l.model.getTerminal(Y[X],!0)){A=l.model.getParent(Y[X]);break}if(null!=T&&A!=T&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(T);null!=sa&&(ma=(sa.getCenterX()-+pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}O=N.apply(this,arguments);if(null!=O&&null!=Y&&O.length==Y.length)for(X=0;X<O.length;X++)if(this.model.isEdge(O[X]))m(T)&&0>mxUtils.indexOf(O,this.model.getTerminal(O[X],!0))&&this.model.setTerminal(O[X],T,!0);else if(m(Y[X])&&(ja=l.getIncomingTreeEdges(Y[X]),0<ja.length))if(!k)m(T)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],T,!0);else if(0==l.getIncomingTreeEdges(O[X]).length){aa=+T;if(null==aa||aa==l.model.getParent(Y[X]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,O[X])}}finally{this.model.endUpdate()}return O};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,ma,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var U=0;U<I.length;U++)if(A.isEdge(I[U])&&null==A.getTerminal(I[U],!0)){A.setTerminal(I[U],Y,!0);var O=l.getCellGeometry(I[U]);O.points=null;+null!=O.getTerminalPoint(!0)&&O.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return I}}var J={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},da={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},ea=f.onKeyDown;f.onKeyDown=function(Y){try{var ma=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=ma){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?J[Y.keyCode]:mxEvent.isAltDown(Y)?+da[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(ma)&&(Z=null,0<l.getIncomingTreeEdges(ma).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(ma):P(ma):13==Y.which&&(Z=S(ma,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(ma)),l.startEditingAtCell(ma),mxEvent.consume(Y)):37==Y.keyCode?(c(ma,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):+38==Y.keyCode?(c(ma,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(ma,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(ma,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||ea.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,ma,Z,k,A,I,U){var O=l.getIncomingTreeEdges(Y);if(m(Y)){var T=H(Y),X=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,aa=ma==mxConstants.DIRECTION_EAST||ma==+mxConstants.DIRECTION_WEST;return T==ma||0==O.length?P(Y,ma):X==aa?G(Y):S(Y,ma!=mxConstants.DIRECTION_NORTH&&ma!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var ma=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(ma,k)&&ma.push(k);(null==k||A)&&0>mxUtils.indexOf(ma,Z)&&ma.push(Z);return null==k||A});return ma};var W=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){W.apply(this,arguments);(u(this.state.cell)||m(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(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),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ba=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ba.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){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 ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ha.apply(this,arguments);null!=-this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var ma=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,la){ma.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),u=this.graph,p=this;return m.concat([this.addEntry("tree container",+this.moveHandle&&(this.moveHandle.style.display=Y?"":"none")};var la=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(Y,ma){la.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var g=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var m=g.apply(this,arguments),u=this.graph,p=this;return m.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 H=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var S=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);B.insert(G);B.insert(H);B.insert(S);return p.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 H=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');H.vertex=!0;var S=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var O=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-O.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),G.style);R.geometry.relative=!0;R.edge=!0;H.insertEdge(R,!0);O.insertEdge(R,!1);var c=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var P=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');+P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),G.style);R.geometry.relative=!0;R.edge=!0;H.insertEdge(R,!0);P.insertEdge(R,!1);var c=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');c.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),G.style);f.geometry.relative=!0;f.edge=!0;H.insertEdge(f,!0);c.insertEdge(f,!1);var l=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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');-l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(R);B.insert(f);B.insert(t);B.insert(H);B.insert(S);B.insert(O);B.insert(c);B.insert(l);return p.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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');+l.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),G.style);t.geometry.relative=!0;t.edge=!0;H.insertEdge(t,!0);l.insertEdge(t,!1);B.insert(G);B.insert(R);B.insert(f);B.insert(t);B.insert(H);B.insert(S);B.insert(P);B.insert(c);B.insert(l);return p.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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');B.vertex=!0;return p.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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],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,80,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,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");H.geometry.setTerminalPoint(new mxPoint(-40,40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],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"};');B.vertex=!0;var H=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(H,"treeRoot","1");H.vertex=!0;var S=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");-G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var O=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');O.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=-!0;R.edge=!0;H.insertEdge(R,!0);O.insertEdge(R,!1);B.insert(G);B.insert(R);B.insert(H);B.insert(S);B.insert(O);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],+G.geometry.relative=!0;G.edge=!0;H.insertEdge(G,!0);S.insertEdge(G,!1);var P=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');P.vertex=!0;var R=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");R.geometry.relative=+!0;R.edge=!0;H.insertEdge(R,!0);P.insertEdge(R,!1);B.insert(G);B.insert(R);B.insert(H);B.insert(S);B.insert(P);return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree root",function(){var B=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.setAttributeForCell(B,"treeRoot","1");B.vertex=!0;return p.createVertexTemplateFromCells([B],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree division",function(){var B=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.setTerminalPoint(new mxPoint(0,0),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);return p.createVertexTemplateFromCells([B,H],B.geometry.width,B.geometry.height,B.value)}),this.addEntry("tree sub sections",function(){var B=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");B.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;B.insertEdge(H,!1);var S=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");S.vertex=!0;var G=new mxCell("",new mxGeometry(0,0,0,0),H.style);G.geometry.setTerminalPoint(new mxPoint(110,-40),!0);G.geometry.relative=!0;G.edge=!0;S.insertEdge(G,!1);return p.createVertexTemplateFromCells([H,G,B,S],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;@@ -4170,29 +4170,29 @@ B.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=EditorUi.prototype.setGraphEnabled=function(c){S.apply(this,arguments);if(c){var f=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=f&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=f&&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 G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,arguments);var c=this.editorUi;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var t=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(t.container,620,420,!0,!1);t.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var t=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(t.container,620,420,!0,!1);t.init()}));var f="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(t,z,C,F){t.addItem(C,null,mxUtils.bind(this,function(){var N=new CreateGraphDialog(c,C,F);c.showDialog(N.container,620,420,!0,!1);N.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){for(var C=0;C<f.length;C++)"-"==f[C]?t.addSeparator(z):l(t,z,mxResources.get(f[C])+"...",f[C])})))};EditorUi.prototype.installFormatToolbar=function(c){var f=-this.editor.graph,l=document.createElement("div");l.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%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var O=!1;EditorUi.prototype.initFormatWindow=-function(){if(!O&&null!=this.formatWindow){O=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=ea.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=+this.editor.graph,l=document.createElement("div");l.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%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var P=!1;EditorUi.prototype.initFormatWindow=+function(){if(!P&&null!=this.formatWindow){P=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=da.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing="border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(ja));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(ja,pa,sa,qa,wa,Ba){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Ba?(za.style.backgroundImage="url("+Ba+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,ja);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ea){Ea.preventDefault()}));mxEvent.addListener(za,"click",function(Ea){"disabled"!=za.getAttribute("disabled")&&pa(Ea);mxEvent.consume(Ea)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(ja=function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",ja),N.addListener("enabledChanged",ja),ja());return za}function l(ja,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top="0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}J=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?W:null);l([pa,f(mxResources.get("delete"),-F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([T,P],60),520<=m&&l([U,640<=m?f("",la.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",la,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?+F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([U,O],60),520<=m&&l([T,640<=m?f("",ma.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",ma,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=z&&(z.classList.add("geSimple"),z.classList.add("geMinimal"));z=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";C.style.bottom=z?"32px":"0px";this.sidebar=this.createSidebar(C);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&-null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var J=null,ea=new Menubar(F,K);F.statusContainer=F.createStatusContainer();-F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var da=F.hideCurrentMenu;F.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==+null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var J=null,da=new Menubar(F,K);F.statusContainer=F.createStatusContainer();+F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var ea=F.hideCurrentMenu;F.hideCurrentMenu=function(){ea.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",ja.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var W=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;-F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var ma=F.menus.get("viewZoom");if(null!=ma){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),-mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},la=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),T=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),P=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),U=f("",Y,!0,mxResources.get("fit")+-" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.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";var X=ea.addMenu("100%",ma.funct);X.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");X.className="geTabItem";X.style.height=F.tabContainerHeight+"px";X.style.position="absolute";X.style.display="0"!=urlParams.pages?"flex":"none";X.style.alignItems="center";X.style.justifyContent=+F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var la=F.menus.get("viewZoom");if(null!=la){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),+mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},ma=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),U=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),O=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),T=f("",Y,!0,mxResources.get("fit")++" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.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";var X=da.addMenu("100%",la.funct);X.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");X.className="geTabItem";X.style.height=F.tabContainerHeight+"px";X.style.position="absolute";X.style.display="0"!=urlParams.pages?"flex":"none";X.style.alignItems="center";X.style.justifyContent="center";X.style.paddingRight="11px";X.style.whiteSpace="nowrap";X.style.overflow="hidden";X.style.fontSize="11px";X.style.width="51px";X.style.right="0px";X.style.bottom="0px";X.style.boxSizing="content-box";X.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";X.style.backgroundPosition="right 6px top 15px";X.style.backgroundRepeat="no-repeat";X.style.backgroundSize="10px";X.style.zIndex="1";C.appendChild(X);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(X);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(X.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}C.appendChild(K);C.appendChild(F.diagramContainer);z.appendChild(C);F.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);C.appendChild(F.tabContainer);t();F.addListener("lockedChanged",t);mxEvent.addListener(window,"resize",function(){t();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.chatWindow&&F.menus.chatWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.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)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};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\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\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\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\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\nanimations=Animations\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\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\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\ncreateBlankDiagram=Create Blank Diagram\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\ndeleteAll=Delete all\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\ndescribeYourDiagram=Describe your diagram\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\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\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\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\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\nhighContrast=High Contrast\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\nimproveContrast=Improve Contrast\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://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\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\nlanguageCode=Language Code\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\nlocked=Locked\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\nmodern=Modern\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}\nmyDrive=My Drive\nmyFiles=My Files\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\npageTabs=Page Tabs\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\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\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\nrequirementDiagram=Requirement Diagram\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\nselectedPage=Selected Page\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\nsequenceDiagram=Sequence Diagram\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\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. 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\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\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\nswap=Swap\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\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\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\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\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?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};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\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\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\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\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\nanimations=Animations\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\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\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\ncreateBlankDiagram=Create Blank Diagram\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\ndeleteAll=Delete all\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\ndescribeYourDiagram=Describe your diagram\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\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\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\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\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\nhighContrast=High Contrast\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\nimproveContrast=Improve Contrast\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://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\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\nlanguageCode=Language Code\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\nlocked=Locked\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\nmodern=Modern\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}\nmyDrive=My Drive\nmyFiles=My Files\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\npageTabs=Page Tabs\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\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\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\nrequirementDiagram=Requirement Diagram\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\nselectedPage=Selected Page\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\nsequenceDiagram=Sequence Diagram\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\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. 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\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\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\nswap=Swap\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\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\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\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\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?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\nremove=Remove\nselectPgLyr=Select Page and Layers\nerrGenPreview=There was an error generating a diagram preview. Please consult technical support.\nattAccessErr=Diagram attachment access error: cannot display diagram\nwidthIntOrFixed=Width must be a valid integer or of value \'fixed\'\ndupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected\ncantDupPickDiffName=Could not duplicate diagram. Please choose a different name.\nownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.\ncantDupTryLater=Could not duplicate diagram. Please try again later.\ncantEditLnkd=Cannot edit linked diagram\ndiagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?\ndiagInTemps=draw.io diagrams in templates\ndiagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.\nconfDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];Editor.currentTheme="";window.uiTheme="";GraphViewer=function(b,e,g){this.init(b,e,g)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="1"==urlParams.dev?"https://test.draw.io/":"https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl=window.DRAWIO_BASE_URL+"/";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.darkMode=null;GraphViewer.prototype.init=function(b,e,g){GraphViewer.initCss();this.graphConfig=null!=g?g:{};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=@@ -4202,7 +4202,7 @@ null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.installDarkModeListener();if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var H=this.graph.view.getDrawPane().ownerSVGElement;null!=this.graphConfig.border?H.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(H.style.padding="8px");H.style.forcedColorAdjust="none";H.style.boxSizing="border-box";H.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var t=this.view.graphBounds,z=this.view.translate;H.setAttribute("viewBox",t.x+z.x-this.panDx+" "+(t.y+z.y-this.panDy)+" "+(t.width+1)+" "+(t.height+1));this.container.style.backgroundColor=H.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",t))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(t){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");var S=this.editor.extractGraphModel(this.xmlNode,!0);if(null!=S&&S!=e)try{this.xml=mxUtils.getXml(S),this.xmlNode=S,this.xmlDocument=S.ownerDocument}catch(t){}this.graph.getImageFromBundles=function(t){return m.getImageUrl(t)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);-if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(S=0;S<G.length;S++)if(this.pageId==G[S].getAttribute("id")){this.currentPage=S;break}var O=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:O.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=+if("mxfile"==this.xmlNode.nodeName){var G=this.xmlNode.getElementsByTagName("diagram");if(0<G.length){if(null!=this.pageId)for(S=0;S<G.length;S++)if(this.pageId==G[S].getAttribute("id")){this.currentPage=S;break}var P=this.graph.getGlobalVariable;this.graph.getGlobalVariable=function(t){var z=G[m.currentPage];return"page"==t?z.getAttribute("name")||"Page-"+(m.currentPage+1):"pagenumber"==t?m.currentPage+1:"pagecount"==t?G.length:P.apply(this,arguments)}}}this.diagrams=[];var R=null;this.selectPage=function(t){this.handlingResize||(this.currentPage=mxUtils.mod(t,this.diagrams.length),this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(t){t=this.getIndexById(t);var z=0<=t;z&&this.selectPage(t);return z};S=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=R&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),R=this.xmlNode)});var c=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(t){if(null!=t&&Graph.isPageLink(t.src)){var z=t.src,C=z.indexOf(",");0<C&&(C=m.getIndexById(z.substring(C+1)),0<=C&&(t=m.getImageForGraphModel(Editor.parseDiagramNode(m.diagrams[C])),t.originalSrc=z))}c.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(t){var z=f.apply(this,arguments);t=this.backgroundImage;if(null!=t){var C=this.view.translate,F=this.view.scale;z=mxRectangle.fromRectangle(z);z.add(new mxRectangle((C.x+t.x)*F,(C.y+t.y)*F,t.width*F,t.height*F))}return z};this.addListener("xmlNodeChanged",S);S();urlParams.page=m.currentPage;S=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,S=this.setLayersVisible(),this.fireEvent(new mxEventObject("graphInitialized")),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8),this.installBackgroundColorHandler(),GraphViewer.viewerInitialized(this)}finally{this.graph.getModel().endUpdate()}this.responsive||@@ -4236,21 +4236,21 @@ this.toolbarZIndex;e.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.damxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ca||200)}),B=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,ca||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ca){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ca){B(100);mxEvent.consume(ca)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,W){this.startX=W.getGraphX();this.startY=W.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ca,W){},mouseUp:function(ca,W){mxEvent.isTouchEvent(W.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<-S&&Math.abs(this.startX-W.getGraphX())<S&&Math.abs(this.startY-W.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,O=mxUtils.bind(this,function(ca,W,ba,ha){ca=this.createToolbarButton(ca,W,ba,ha);e.appendChild(ca);G++;return ca}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=-"4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=O(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(t);var N=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,-mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(O(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||-"Zoom Out"),O(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),O(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"==C){if(this.layersEnabled){var K=O(mxUtils.bind(this,function(ca){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,+S&&Math.abs(this.startX-W.getGraphX())<S&&Math.abs(this.startY-W.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,P=mxUtils.bind(this,function(ca,W,ba,ha){ca=this.createToolbarButton(ca,W,ba,ha);e.appendChild(ca);G++;return ca}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=+"4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=P(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(t);var N=P(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,+mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(P(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||+"Zoom Out"),P(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),P(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"==C){if(this.layersEnabled){var K=P(mxUtils.bind(this,function(ca){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ba=this.graph.getGraphBounds(),ha=this.graph.view;0>ba.x||0>ba.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale}):null!=this.graph.originalViewState&&0<ba.x/ha.scale+this.graph.originalViewState.translate.x-ha.translate.x&&0<ba.y/ha.scale+this.graph.originalViewState.translate.y-ha.translate.y&&(ha.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ca=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var W=mxUtils.getDocumentScrollOrigin(document);c.style.left=W.x+ca.left-1+"px";c.style.top=W.y+ca.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":-"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=O(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,+"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=P(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ca=J.getBoundingClientRect();var W=mxUtils.getDocumentScrollOrigin(document);-l.style.left=W.x+ca.left-1+"px";l.style.top=W.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&O(mxUtils.bind(this,-function(){try{this.showLightbox()}catch(ca){alert(ca.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=O(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",-g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var ea=b.style.border,da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?+l.style.left=W.x+ca.left-1+"px";l.style.top=W.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&P(mxUtils.bind(this,+function(){try{this.showLightbox()}catch(ca){alert(ca.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=P(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",+g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var da=b.style.border,ea=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ca=b.getBoundingClientRect(),W=mxUtils.getScrollOrigin(document.body);W="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-W.x,top:-W.y};ca={left:ca.left-W.left,top:ca.top-W.top,bottom:ca.bottom-W.top,right:ca.right-W.left};e.style.left=ca.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ca.bottom-1+"px":"inline"!=-this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==ea&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=ea});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=-ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&da()})).observe(b)};+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==da&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=da});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=+ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ea):ea();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&ea()})).observe(b)};GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var u=document.createElement("div");u.style.borderRight="1px solid #d0d0d0";u.style.display="inline-flex";u.style.alignItems="center";u.style.padding="6px";mxEvent.addListener(u,"click",b);null!=g&&u.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(u,"mouseenter",function(){u.style.backgroundColor="light-dark(#dddddd,#333333)"}),mxEvent.addListener(u,"mouseleave",function(){u.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),u.style.cursor="pointer"):mxUtils.setOpacity(u,30);u.appendChild(b);return u};GraphViewer.prototype.disableButton=function(b,e){var g=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=g&&(mxUtils.setOpacity(g.elem,30),mxEvent.removeListener(g.elem,"click",g.handler),mxEvent.addListener(g.elem,"mouseenter",function(){g.elem.style.backgroundColor="#eee"}),e&&g.elem.setAttribute("title",e))};@@ -4263,9 +4263,9 @@ GraphViewer.prototype.showLocalLightbox=function(b){var e=document.createElementg.className="geAdaptiveAsset";var m=mxUtils.bind(this,function(){p.setDarkMode(this.isDarkMode())});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.removeListener("darkModeChanged",m);p.destroy()}));urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";urlParams.dark=this.isDarkMode()?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null!=b)try{var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));u.noCloseBtn=!0;urlParams["toolbar-config"]=encodeURIComponent(JSON.stringify(u))}catch(f){}if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};u=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var p=new EditorUi(new Editor(!0),document.createElement("div"),!0);this.addListener("darkModeChanged",m);p.editor.editBlankUrl=this.editBlankUrl;p.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=u;p.refresh=function(){};var B=mxUtils.bind(this,function(f){27==f.keyCode&&p.destroy()}),H=this.initialOverflow,-S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var G=p.editor.graph,O=G.container;O.style.overflow="hidden";this.lightboxChrome&&null==b?(O.style.border="1px solid #c0c0c0",O.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=-"none");var R=this;G.getImageFromBundles=function(f){return R.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return R.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(O.style,"border-radius","4px");O.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,-function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),O.style.outline="none",O.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(O)):(document.body.appendChild(O),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(O.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=+S=p.destroy;p.destroy=function(){null==b&&(mxEvent.removeListener(document.documentElement,"keydown",B),document.body.removeChild(e),document.body.removeChild(g),document.body.style.overflow=H,GraphViewer.resizeSensorEnabled=!0,S.apply(this,arguments))};var G=p.editor.graph,P=G.container;P.style.overflow="hidden";this.lightboxChrome&&null==b?(P.style.border="1px solid #c0c0c0",P.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",B)):(e.style.display="none",g.style.display=+"none");var R=this;G.getImageFromBundles=function(f){return R.getImageUrl(f)};var c=p.createTemporaryGraph;p.createTemporaryGraph=function(){var f=c.apply(this,arguments);f.getImageFromBundles=function(l){return R.getImageUrl(l)};return f};this.graphConfig.move&&(G.isMoveCellsEvent=function(f){return!0});mxUtils.setPrefixedStyle(P.style,"border-radius","4px");P.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";this.addClickHandler(G,p);window.setTimeout(mxUtils.bind(this,+function(){try{mxEvent.addListener(e,"click",function(){p.destroy()}),P.style.outline="none",P.style.zIndex=this.lightboxZIndex,g.style.zIndex=this.lightboxZIndex,null!=b?(b.innerHTML="",b.appendChild(P)):(document.body.appendChild(P),document.body.appendChild(g)),p.setFileData(this.xml),mxUtils.setPrefixedStyle(P.style,"transform","rotateY(0deg)"),p.chromelessToolbar.style.bottom="60px",p.chromelessToolbar.style.zIndex=this.lightboxZIndex,(b||document.body).appendChild(p.chromelessToolbar),p.getEditBlankXml=mxUtils.bind(this,function(){return this.xml}),this.showLayers(G,this.graph),p.lightboxFit(),p.chromelessResize()}catch(f){p.handleError(f,null,function(){p.destroy()})}}),0);return p};Dialog.prototype.getDocumentSize=function(){return new mxRectangle(0,0,Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0))};GraphViewer.prototype.updateTitle=function(b,e){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",e||b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",e||b))};GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(g){e.innerText=g.message,null!=window.console&&console.error(g)}})};@@ -4281,7 +4281,7 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n\tfilter: invert(1);\n}GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function u(){this.q=[];this.add=function(t){this.q.push(t)};var f,l;this.call=function(){f=0;for(l=this.q.length;f<l;f++)this.q[f].call()}}function p(f,l){return f.currentStyle?f.currentStyle[l]:window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue(l):f.style[l]}function B(f,l){if(!f.resizedAttached)f.resizedAttached=new u,f.resizedAttached.add(l);else if(f.resizedAttached){f.resizedAttached.add(l);return}f.resizeSensor=document.createElement("div");f.resizeSensor.className="resize-sensor";f.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";f.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>';-f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,ea,da,ca;l=function(){if((da=f.offsetWidth)!=J||(ca=f.offsetHeight)!=ea)N=!0,J=da,ea=ca;F()};var W=function(ba,-ha,ma){ba.attachEvent?ba.attachEvent("on"+ha,ma):ba.addEventListener(ha,ma)};W(t,"scroll",l);W(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var O=Object.prototype.toString.call(g),R="[object Array]"===O||"[object NodeList]"===O||"[object HTMLCollection]"===-O||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){O=0;for(var c=g.length;O<c;O++)B(g[O],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();+f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,da,ea,ca;l=function(){if((ea=f.offsetWidth)!=J||(ca=f.offsetHeight)!=da)N=!0,J=ea,da=ca;F()};var W=function(ba,+ha,la){ba.attachEvent?ba.attachEvent("on"+ha,la):ba.addEventListener(ha,la)};W(t,"scroll",l);W(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var P=Object.prototype.toString.call(g),R="[object Array]"===P||"[object NodeList]"===P||"[object HTMLCollection]"===+P||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){P=0;for(var c=g.length;P<c;P++)B(g[P],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();diff --git a/src/main/webapp/resources/dia.txt b/src/main/webapp/resources/dia.txtindex a681ca79a..e948aa9fd 100644--- a/src/main/webapp/resources/dia.txt+++ b/src/main/webapp/resources/dia.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_am.txt b/src/main/webapp/resources/dia_am.txtindex 9a5e9e8b8..af8f00e7a 100644--- a/src/main/webapp/resources/dia_am.txt+++ b/src/main/webapp/resources/dia_am.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_ar.txt b/src/main/webapp/resources/dia_ar.txtindex 277db3e3b..84f61b60f 100644--- a/src/main/webapp/resources/dia_ar.txt+++ b/src/main/webapp/resources/dia_ar.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_bg.txt b/src/main/webapp/resources/dia_bg.txtindex ae7438443..8bb6ecb17 100644--- a/src/main/webapp/resources/dia_bg.txt+++ b/src/main/webapp/resources/dia_bg.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_bn.txt b/src/main/webapp/resources/dia_bn.txtindex 43c9cd75b..e39ea2d5b 100644--- a/src/main/webapp/resources/dia_bn.txt+++ b/src/main/webapp/resources/dia_bn.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_bs.txt b/src/main/webapp/resources/dia_bs.txtindex bb81c468b..7ccb486d0 100644--- a/src/main/webapp/resources/dia_bs.txt+++ b/src/main/webapp/resources/dia_bs.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_ca.txt b/src/main/webapp/resources/dia_ca.txtindex 7288add95..eff65c363 100644--- a/src/main/webapp/resources/dia_ca.txt+++ b/src/main/webapp/resources/dia_ca.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Altres usuaris estan editant aquest diagramafirstTimeGD=Primer cop que accediu a aquest fitxer?drawioGDAppNotInstalled=L'aplicació draw.io de Google Drive no està instal·lada, primer instal·leu-laConfDC415Error=Desar esborranys està bloquejat. Si teniu l'aplicació "Attachment Checker for Confluence", actualitzeu-la a la darrera versió.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_cs.txt b/src/main/webapp/resources/dia_cs.txtindex 527187f59..1b04a4d99 100644--- a/src/main/webapp/resources/dia_cs.txt+++ b/src/main/webapp/resources/dia_cs.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_da.txt b/src/main/webapp/resources/dia_da.txtindex 1b1202302..f6455387b 100644--- a/src/main/webapp/resources/dia_da.txt+++ b/src/main/webapp/resources/dia_da.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_de.txt b/src/main/webapp/resources/dia_de.txtindex 26b1c6a15..13f73f90b 100644--- a/src/main/webapp/resources/dia_de.txt+++ b/src/main/webapp/resources/dia_de.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Andere Benutzer bearbeiten dieses Diagramm.firstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Entfernen+selectPgLyr=Seite und Ebenen auswählen+errGenPreview=Beim Generieren eines Diagrammaspekts ist ein Fehler aufgetreten. Bitte wenden Sie sich an den technischen Support.+attAccessErr=Diagramm-Anhang Zugriffsfehler: Diagramm kann nicht dargestellt werden+widthIntOrFixed=Die Breite muss eine gültige ganze Zahl oder der Wert 'fixed' sein.+dupDisabledPgLyrSlct=Die Duplizierung von Diagrammen ist deaktiviert, wenn Seite und Ebenen ausgewählt sind.+cantDupPickDiffName=Diagramm konnte nicht dupliziert werden. Bitte geben Sie einen anderen Namen ein.+ownPgAccessDupErr=Zugriffsbeschränkung der beinhaltenden Seite: Diagramm kann nicht dupliziert werden.+cantDupTryLater=Diagramm konnte nicht dupliziert werden. Bitte versuchen Sie es später.+cantEditLnkd=Bearbeiten des verknüpften Diagramms nicht möglich+diagEditOwnPgOnlyOpen=Das verknüpfte Diagramm kann nur auf der Original-Seite bearbeitet werden. Möchten Sie die Original-Seite zum Bearbeiten des Diagramms öffnen?+diagInTemps=draw.io Diagramme in Vorlagen+diagInTempsCantEdit=Diagramme in Seitenvorlagen können nicht bearbeitet werden. Sie können nur auf Seiten und Blog-Posts bearbeitet werden.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_el.txt b/src/main/webapp/resources/dia_el.txtindex 81e18b7df..9e2b9d76a 100644--- a/src/main/webapp/resources/dia_el.txt+++ b/src/main/webapp/resources/dia_el.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_eo.txt b/src/main/webapp/resources/dia_eo.txtindex 41579cf36..cd57d94f4 100644--- a/src/main/webapp/resources/dia_eo.txt+++ b/src/main/webapp/resources/dia_eo.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_es.txt b/src/main/webapp/resources/dia_es.txtindex a315e6a8f..4ac780f1e 100644--- a/src/main/webapp/resources/dia_es.txt+++ b/src/main/webapp/resources/dia_es.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_et.txt b/src/main/webapp/resources/dia_et.txtindex 3264d0556..81aa6bbd4 100644--- a/src/main/webapp/resources/dia_et.txt+++ b/src/main/webapp/resources/dia_et.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_eu.txt b/src/main/webapp/resources/dia_eu.txtindex 8573134c6..453a4cb56 100644--- a/src/main/webapp/resources/dia_eu.txt+++ b/src/main/webapp/resources/dia_eu.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Beste erabiltzaile bat(zuk) diagrama hau editatzen ari dirafirstTimeGD=Fitxategi hau atzitzen duzun lehen aldia?drawioGDAppNotInstalled=draw.io Google Drive aplikazioa ez dago instalatuta, mesedez instalatu lehenikConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_fa.txt b/src/main/webapp/resources/dia_fa.txtindex 045b45302..4d51c00c8 100644--- a/src/main/webapp/resources/dia_fa.txt+++ b/src/main/webapp/resources/dia_fa.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_fi.txt b/src/main/webapp/resources/dia_fi.txtindex ab06fb6c6..db994a6bc 100644--- a/src/main/webapp/resources/dia_fi.txt+++ b/src/main/webapp/resources/dia_fi.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_fil.txt b/src/main/webapp/resources/dia_fil.txtindex bef7415aa..9597d2832 100644--- a/src/main/webapp/resources/dia_fil.txt+++ b/src/main/webapp/resources/dia_fil.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_fr.txt b/src/main/webapp/resources/dia_fr.txtindex 17bc52710..1b81ab976 100644--- a/src/main/webapp/resources/dia_fr.txt+++ b/src/main/webapp/resources/dia_fr.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=D'autres utilisateur(s) éditent ce diagrammefirstTimeGD=Première fois d'accès à ce fichier ?drawioGDAppNotInstalled=L'application Google Drive draw.io n'est pas installée, veuillez l'installer d'abordConfDC415Error=La sauvegarde des brouillons est bloquée. Si vous avez l'application "Attachment Checker for Confluence", veuillez mettre à jour vers la dernière version.+remove=Retirer+selectPgLyr=Sélectionner la page et les couches+errGenPreview=Erreur lors de la génération de l''aperçu du diagramme Veuillez consulter le soutien technique.+attAccessErr=Erreur d'accès au diagramme joint: impossible d'afficher le diagramme+widthIntOrFixed=La largeur doit être un entier valide ou une valeur 'fixed'+dupDisabledPgLyrSlct=La reproduction d'un diagramme est désactivée lorsqu'une page et des couches sont sélectionnées.+cantDupPickDiffName=Impossible de copier le diagramme. Choisir un autre nom.+ownPgAccessDupErr=Restriction d'accès: impossible de copier le diagramme.+cantDupTryLater=Impossible de copier le diagramme. Réessayer plus tard.+cantEditLnkd=Impossible de modifier le diagramme lié+diagEditOwnPgOnlyOpen=Le diagramme peut seulement être modifié à partir de la page hôte. Aimeriez-vous ouvrir la page hôte pour modifier le diagramme?+diagInTemps=Diagrammes draw.io dans les modèles+diagInTempsCantEdit=Les diagrammes ne peuvent pas être modifiés dans un modèle de page. Ils peuvent seulement être modifiés dans les pages et les billets de blogue.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_gl.txt b/src/main/webapp/resources/dia_gl.txtindex c657894f6..9bda2a76f 100644--- a/src/main/webapp/resources/dia_gl.txt+++ b/src/main/webapp/resources/dia_gl.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_gu.txt b/src/main/webapp/resources/dia_gu.txtindex aa55811fb..118b975e5 100644--- a/src/main/webapp/resources/dia_gu.txt+++ b/src/main/webapp/resources/dia_gu.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_he.txt b/src/main/webapp/resources/dia_he.txtindex ab5051521..c9d57dc27 100644--- a/src/main/webapp/resources/dia_he.txt+++ b/src/main/webapp/resources/dia_he.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_hi.txt b/src/main/webapp/resources/dia_hi.txtindex 3232383a1..24fa7734f 100644--- a/src/main/webapp/resources/dia_hi.txt+++ b/src/main/webapp/resources/dia_hi.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_hr.txt b/src/main/webapp/resources/dia_hr.txtindex bdff3d0e0..feed33ece 100644--- a/src/main/webapp/resources/dia_hr.txt+++ b/src/main/webapp/resources/dia_hr.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_hu.txt b/src/main/webapp/resources/dia_hu.txtindex 3d42e3674..38e7fa744 100644--- a/src/main/webapp/resources/dia_hu.txt+++ b/src/main/webapp/resources/dia_hu.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_i18n.txt b/src/main/webapp/resources/dia_i18n.txtindex 3a6f8fda0..bf135ebe9 100644--- a/src/main/webapp/resources/dia_i18n.txt+++ b/src/main/webapp/resources/dia_i18n.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=otherUsersEditingfirstTimeGD=firstTimeGDdrawioGDAppNotInstalled=drawioGDAppNotInstalledConfDC415Error=ConfDC415Error+remove=remove+selectPgLyr=selectPgLyr+errGenPreview=errGenPreview+attAccessErr=attAccessErr+widthIntOrFixed=widthIntOrFixed+dupDisabledPgLyrSlct=dupDisabledPgLyrSlct+cantDupPickDiffName=cantDupPickDiffName+ownPgAccessDupErr=ownPgAccessDupErr+cantDupTryLater=cantDupTryLater+cantEditLnkd=cantEditLnkd+diagEditOwnPgOnlyOpen=diagEditOwnPgOnlyOpen+diagInTemps=diagInTemps+diagInTempsCantEdit=diagInTempsCantEdit+confDirectEditDraftLost=confDirectEditDraftLostdiff --git a/src/main/webapp/resources/dia_id.txt b/src/main/webapp/resources/dia_id.txtindex f78b0cc1a..880348dd7 100644--- a/src/main/webapp/resources/dia_id.txt+++ b/src/main/webapp/resources/dia_id.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Pengguna lain sedang mengedit diagram inifirstTimeGD=Pertama kali mengakses berkas ini?drawioGDAppNotInstalled=Aplikasi Google Drive draw.io tidak terpasang, harap pasang terlebih dahuluConfDC415Error=Menyimpan draf diblokir. Bila Anda punya aplikasi "Pemeriksa Lampiran bagi Confluence", harap perbarui ke versi terakhir.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_it.txt b/src/main/webapp/resources/dia_it.txtindex 54093c619..5cc18f7bf 100644--- a/src/main/webapp/resources/dia_it.txt+++ b/src/main/webapp/resources/dia_it.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_ja.txt b/src/main/webapp/resources/dia_ja.txtindex 8b67fc66b..e36e9b870 100644--- a/src/main/webapp/resources/dia_ja.txt+++ b/src/main/webapp/resources/dia_ja.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_kn.txt b/src/main/webapp/resources/dia_kn.txtindex 6f783e2df..99a961b25 100644--- a/src/main/webapp/resources/dia_kn.txt+++ b/src/main/webapp/resources/dia_kn.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_ko.txt b/src/main/webapp/resources/dia_ko.txtindex 32db8540c..069f10b34 100644--- a/src/main/webapp/resources/dia_ko.txt+++ b/src/main/webapp/resources/dia_ko.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_lt.txt b/src/main/webapp/resources/dia_lt.txtindex 0a73d872a..4082162b4 100644--- a/src/main/webapp/resources/dia_lt.txt+++ b/src/main/webapp/resources/dia_lt.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_lv.txt b/src/main/webapp/resources/dia_lv.txtindex c031e6282..e8c46443d 100644--- a/src/main/webapp/resources/dia_lv.txt+++ b/src/main/webapp/resources/dia_lv.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_ml.txt b/src/main/webapp/resources/dia_ml.txtindex 3eb816a67..bc786f03b 100644--- a/src/main/webapp/resources/dia_ml.txt+++ b/src/main/webapp/resources/dia_ml.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_mr.txt b/src/main/webapp/resources/dia_mr.txtindex 832dec248..2608cf866 100644--- a/src/main/webapp/resources/dia_mr.txt+++ b/src/main/webapp/resources/dia_mr.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_ms.txt b/src/main/webapp/resources/dia_ms.txtindex a6e2659a2..91ab5aa0b 100644--- a/src/main/webapp/resources/dia_ms.txt+++ b/src/main/webapp/resources/dia_ms.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_my.txt b/src/main/webapp/resources/dia_my.txtindex 9766220fb..2bf741297 100644--- a/src/main/webapp/resources/dia_my.txt+++ b/src/main/webapp/resources/dia_my.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_nl.txt b/src/main/webapp/resources/dia_nl.txtindex 3ec7f0a08..c0f6437d2 100644--- a/src/main/webapp/resources/dia_nl.txt+++ b/src/main/webapp/resources/dia_nl.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Andere gebruiker(s) bewerken dit diagramfirstTimeGD=Eerste keer bezig met dit bestand?drawioGDAppNotInstalled=draw.io Google Drive app is niet geïnstalleerd. Installeer dit eerstConfDC415Error=Het opslaan van concepten wordt geblokkeerd. Als je de app "Attachment Checker for Confluence" hebt, update dan naar de nieuwste versie.+remove=Verwijderen+selectPgLyr=Pagina en lagen selecteren+errGenPreview=Er is een fout bij het genereren van een diagramvoorbeeld. Raadpleeg de technische ondersteuning.+attAccessErr=Toegangsfout diagrambijlage: kan diagram niet weergeven+widthIntOrFixed=Breedte moet een geheel getal zijn of van waarde 'vast'+dupDisabledPgLyrSlct=Het dupliceren van diagrammen is uitgeschakeld wanneer pagina's en lagen zijn geselecteerd+cantDupPickDiffName=Kan diagram niet dupliceren. Kies a.u.b. een andere naam.+ownPgAccessDupErr=Beperking in paginatoegang: diagram kan niet worden gedupliceerd.+cantDupTryLater=Kan diagram niet dupliceren. Probeer het later opnieuw.+cantEditLnkd=Gekoppeld diagram kan niet worden bewerkt+diagEditOwnPgOnlyOpen=Het diagram kan alleen worden bewerkt vanaf de bovenliggende pagina. Wil je de bovenliggende pagina openen om te bewerken?+diagInTemps=draw.io diagrammen in sjablonen+diagInTempsCantEdit=Diagrammen in paginasjablonen kunnen niet worden bewerkt. Ze kunnen alleen worden bewerkt op pagina's en blogposts.+confDirectEditDraftLost=Deze Confluence-pagina bevat niet-gepubliceerde wijzigingen. Het bewerken van het diagram vanuit de paginaweergave kan gegevensverlies veroorzaken. Bewerk eerst de Confluence-pagina en bewerk vervolgens het diagram.diff --git a/src/main/webapp/resources/dia_no.txt b/src/main/webapp/resources/dia_no.txtindex 6f767f109..1923c23f7 100644--- a/src/main/webapp/resources/dia_no.txt+++ b/src/main/webapp/resources/dia_no.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_pl.txt b/src/main/webapp/resources/dia_pl.txtindex bca28b1d5..d44aeec5f 100644--- a/src/main/webapp/resources/dia_pl.txt+++ b/src/main/webapp/resources/dia_pl.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_pt-br.txt b/src/main/webapp/resources/dia_pt-br.txtindex b2a35f443..3908f129a 100644--- a/src/main/webapp/resources/dia_pt-br.txt+++ b/src/main/webapp/resources/dia_pt-br.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_pt.txt b/src/main/webapp/resources/dia_pt.txtindex a367d78be..047855ba0 100644--- a/src/main/webapp/resources/dia_pt.txt+++ b/src/main/webapp/resources/dia_pt.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_ro.txt b/src/main/webapp/resources/dia_ro.txtindex 250fc7d5b..b051a1553 100644--- a/src/main/webapp/resources/dia_ro.txt+++ b/src/main/webapp/resources/dia_ro.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_ru.txt b/src/main/webapp/resources/dia_ru.txtindex 0257ad818..9c533e8c7 100644--- a/src/main/webapp/resources/dia_ru.txt+++ b/src/main/webapp/resources/dia_ru.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Другие пользователи редактируютfirstTimeGD=Первый раз обращаетесь к этому файлу?drawioGDAppNotInstalled=Приложение draw.io для Google Drive не установлено, пожалуйста, сначала установите егоConfDC415Error=Сохранение черновиков заблокировано. Если у вас есть приложение "Attachment Checker for Confluence", обновите его до последней версии.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_si.txt b/src/main/webapp/resources/dia_si.txtindex 5789b32e3..f49725cb8 100644--- a/src/main/webapp/resources/dia_si.txt+++ b/src/main/webapp/resources/dia_si.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_sk.txt b/src/main/webapp/resources/dia_sk.txtindex 65f9b61c0..3dcdc5ff2 100644--- a/src/main/webapp/resources/dia_sk.txt+++ b/src/main/webapp/resources/dia_sk.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_sl.txt b/src/main/webapp/resources/dia_sl.txtindex 94a9c1a9f..7ef07e583 100644--- a/src/main/webapp/resources/dia_sl.txt+++ b/src/main/webapp/resources/dia_sl.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_sr.txt b/src/main/webapp/resources/dia_sr.txtindex dafa294cc..df7c2738f 100644--- a/src/main/webapp/resources/dia_sr.txt+++ b/src/main/webapp/resources/dia_sr.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_sv.txt b/src/main/webapp/resources/dia_sv.txtindex 79aef87c0..ccb7c056e 100644--- a/src/main/webapp/resources/dia_sv.txt+++ b/src/main/webapp/resources/dia_sv.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_sw.txt b/src/main/webapp/resources/dia_sw.txtindex 9414327f2..1fc650c84 100644--- a/src/main/webapp/resources/dia_sw.txt+++ b/src/main/webapp/resources/dia_sw.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_ta.txt b/src/main/webapp/resources/dia_ta.txtindex a4d859984..b8ede5b1c 100644--- a/src/main/webapp/resources/dia_ta.txt+++ b/src/main/webapp/resources/dia_ta.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_te.txt b/src/main/webapp/resources/dia_te.txtindex 9b3414d54..91d27b0c6 100644--- a/src/main/webapp/resources/dia_te.txt+++ b/src/main/webapp/resources/dia_te.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_th.txt b/src/main/webapp/resources/dia_th.txtindex 480484cca..ee6824863 100644--- a/src/main/webapp/resources/dia_th.txt+++ b/src/main/webapp/resources/dia_th.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_tr.txt b/src/main/webapp/resources/dia_tr.txtindex 6ff2d0b0d..e3c525f75 100644--- a/src/main/webapp/resources/dia_tr.txt+++ b/src/main/webapp/resources/dia_tr.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_uk.txt b/src/main/webapp/resources/dia_uk.txtindex cd3ec3055..4707e3721 100644--- a/src/main/webapp/resources/dia_uk.txt+++ b/src/main/webapp/resources/dia_uk.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_vi.txt b/src/main/webapp/resources/dia_vi.txtindex da0586bf2..30dffb6be 100644--- a/src/main/webapp/resources/dia_vi.txt+++ b/src/main/webapp/resources/dia_vi.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_zh-tw.txt b/src/main/webapp/resources/dia_zh-tw.txtindex 7a63e0074..0c39f708a 100644--- a/src/main/webapp/resources/dia_zh-tw.txt+++ b/src/main/webapp/resources/dia_zh-tw.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=Other user(s) are editing this diagramfirstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/resources/dia_zh.txt b/src/main/webapp/resources/dia_zh.txtindex 746c76a79..baa58b8b0 100644--- a/src/main/webapp/resources/dia_zh.txt+++ b/src/main/webapp/resources/dia_zh.txt@@ -1294,3 +1294,17 @@ otherUsersEditing=其他用户正在编辑此绘图firstTimeGD=First time to access this file?drawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it firstConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.+remove=Remove+selectPgLyr=Select Page and Layers+errGenPreview=There was an error generating a diagram preview. Please consult technical support.+attAccessErr=Diagram attachment access error: cannot display diagram+widthIntOrFixed=Width must be a valid integer or of value 'fixed'+dupDisabledPgLyrSlct=Diagram duplication is disabled when page and layers are selected+cantDupPickDiffName=Could not duplicate diagram. Please choose a different name.+ownPgAccessDupErr=Owning page access restriction: cannot duplicate diagram.+cantDupTryLater=Could not duplicate diagram. Please try again later.+cantEditLnkd=Cannot edit linked diagram+diagEditOwnPgOnlyOpen=Diagram can only be edited from the page that owns it. Would you like to open the owning page for edit?+diagInTemps=draw.io diagrams in templates+diagInTempsCantEdit=Diagrams in page templates cannot be edited. They can only be edited on pages and blog posts.+confDirectEditDraftLost=This Confluence page has unpublished changes. Editing the diagram from page view may cause data loss. Please edit the Confluence page first and then edit the diagram.diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.jsindex e11d1e209..0b550782a 100644--- a/src/main/webapp/service-worker.js+++ b/src/main/webapp/service-worker.js@@ -1,2 +1,2 @@-if(!self.define){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/app.min.js",revision:"b2b7e40d452b5707a1a9d984a0a0542b"},{url:"js/extensions.min.js",revision:"b7348adb16856a4c46cf5d37f1925fe1"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"f760278d924467fb1d2289448c73fe27"},{url:"js/shapes-14-6-5.min.js",revision:"71913a30c93bc9aff182a3a2b3da1a21"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"57fe6012597666439de3e76c9bb681c1"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"1c4b010eb053bfb9aed1caee8a3d3689"},{url:"styles/atlas.css",revision:"05873c4bba51f571b1da549a967ea06c"},{url:"styles/dark.css",revision:"99dc5495d36d5ebaddababefde083c8c"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"4695f3bb1fac6fb6f049d44b78a14e63"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"c41221a9a51ff293f05ed13c7b142e5c"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"8af574bd1ae86be37b83b094a5011a4f"},{url:"plugins/cConf-1-4-8.js",revision:"5324b1040e93e7e271c98060c2ef3993"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"261a7494161cee976ecfb110ac7571d2"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"6542434cf3df5c60163e2767678f1bfc"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"30ff609b31d4a8c38da6c28e555947ea"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"03a8dcfc69612b44b6e75e6926a956fc"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"73927d303703a329ff06d681553e993d"},{url:"resources/dia_am.txt",revision:"8d60c82458b57bb9ccc7b0c4f6ed3f79"},{url:"resources/dia_ar.txt",revision:"e278657437cf14eeedbb3b641d3ba8c0"},{url:"resources/dia_bg.txt",revision:"61c2ef14ee768be21fcb22b1928f7cac"},{url:"resources/dia_bn.txt",revision:"45e3683c1150ad2e139f42fedaf9e7aa"},{url:"resources/dia_bs.txt",revision:"ed33364ad4282d0e29775ca2e2f351e0"},{url:"resources/dia_ca.txt",revision:"101dbe73020d8471a5208da4d8ae247e"},{url:"resources/dia_cs.txt",revision:"ba2fd4196222285218549625600a530f"},{url:"resources/dia_da.txt",revision:"b3eb739977ead9876a8afe0103ad7e36"},{url:"resources/dia_de.txt",revision:"fd7945d51201ff95e51d082750c67c39"},{url:"resources/dia_el.txt",revision:"faa7d843ef32aba9b9f11e367ca362d5"},{url:"resources/dia_eo.txt",revision:"619ff072153d5897b7184ee0fe925f18"},{url:"resources/dia_es.txt",revision:"1feb3c63ee76afc71ebec607c8a9347a"},{url:"resources/dia_et.txt",revision:"67482775f1ff0d1b2cb31f6226c519d3"},{url:"resources/dia_eu.txt",revision:"a7dce4832af9f1d0b4e5f5bf189ef328"},{url:"resources/dia_fa.txt",revision:"743a891d016470e8e0a3651be32fb3c5"},{url:"resources/dia_fi.txt",revision:"771de2b3741f25b4114e51c93ce1a866"},{url:"resources/dia_fil.txt",revision:"637b4984bb64580b4ef61e28ef7ca664"},{url:"resources/dia_fr.txt",revision:"ad7e62eb41228b929489d9427d206e82"},{url:"resources/dia_gl.txt",revision:"a89e3f7e7cb3b6867d3e74eb949894dd"},{url:"resources/dia_gu.txt",revision:"769be61a373049c5d3b358201f1acb65"},{url:"resources/dia_he.txt",revision:"238e53f20884ef57b1a9c06bd800b9ef"},{url:"resources/dia_hi.txt",revision:"755e1872b614c9a5b27c5459062c8320"},{url:"resources/dia_hr.txt",revision:"adf6788e96b0e3f0029cbae30a4faefb"},{url:"resources/dia_hu.txt",revision:"c645a78fdda2843acd6aa9d9bf60a6e8"},{url:"resources/dia_id.txt",revision:"9da16676fc1b33c61b4a025a352dc916"},{url:"resources/dia_it.txt",revision:"57b0f8eb2319f99f96b79507966f4e6f"},{url:"resources/dia_ja.txt",revision:"b4b10c93e53b13dbd3e407532813b9e0"},{url:"resources/dia_kn.txt",revision:"7cbbba0381a1a6cdeade3bc28ac01962"},{url:"resources/dia_ko.txt",revision:"943b020ff0430e9f81fe3e1875423b7d"},{url:"resources/dia_lt.txt",revision:"94aff34cd118d39d79abacf2a16aea7d"},{url:"resources/dia_lv.txt",revision:"325ed2d9ffa2ddc493d9ed10d46007ad"},{url:"resources/dia_ml.txt",revision:"fc666763d3fbff227411defda23b1942"},{url:"resources/dia_mr.txt",revision:"e8746ae5b0123155bdd837ae7f01b5f5"},{url:"resources/dia_ms.txt",revision:"e1600b30e6517d4dc4a7002ce675c641"},{url:"resources/dia_my.txt",revision:"4acfe58eb8f47895f188af8bfd33659c"},{url:"resources/dia_nl.txt",revision:"e9512982f5d9e89015435ee50d577bbc"},{url:"resources/dia_no.txt",revision:"6f0812d787ab931475343320d2547158"},{url:"resources/dia_pl.txt",revision:"3c7d08a5fefc693e6b6b4521a3c0a6cc"},{url:"resources/dia_pt-br.txt",revision:"5d7431a638a268dfedd3bc7f463e17d6"},{url:"resources/dia_pt.txt",revision:"981210fd60e7fd0831fcd6d26ca26f74"},{url:"resources/dia_ro.txt",revision:"1d77510ecd2b1b1c26640dfe77e00f48"},{url:"resources/dia_ru.txt",revision:"4c2d2f96df120afc4c3b3c58d0bc6ebc"},{url:"resources/dia_si.txt",revision:"2db82ba649f3ab7d578a73b247b06c4f"},{url:"resources/dia_sk.txt",revision:"4b9033183a2c90ccf0f75136fd7b14b0"},{url:"resources/dia_sl.txt",revision:"c27148e1c9480a35642162595480ff1f"},{url:"resources/dia_sr.txt",revision:"ef3562ada2e69e5d33609d58a677b6db"},{url:"resources/dia_sv.txt",revision:"7357682c42f6d47729b6b1784aaa5e9b"},{url:"resources/dia_sw.txt",revision:"377dd914bd645c2348e342bf55306439"},{url:"resources/dia_ta.txt",revision:"00ce65e244e159a2dcb93b9829a2e603"},{url:"resources/dia_te.txt",revision:"8aaca1c42eb1c027a77138f0fccc85c7"},{url:"resources/dia_th.txt",revision:"c2be3eae6995b41ba466651629c69143"},{url:"resources/dia_tr.txt",revision:"9571764eb899cc108c6fb2631d694ca3"},{url:"resources/dia_uk.txt",revision:"76e4f285ac8c648d3b3fbc6ab59aad17"},{url:"resources/dia_vi.txt",revision:"ced105b1a1ea57902c88fdd36ab041c0"},{url:"resources/dia_zh-tw.txt",revision:"ce0a47eca469dbb93e8c4f26aba7ea73"},{url:"resources/dia_zh.txt",revision:"a69a22b12a4ced3f62285b2521355755"},{url:"favicon.ico",revision:"83014b0f32b6c7b15b66cf3c6d6d7c16"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{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:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{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/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"7985b4d1692766a7db52cbdd10893ad9"},{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){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/app.min.js",revision:"1a856d27d3d67fa7ba1c5d49a3d77df8"},{url:"js/extensions.min.js",revision:"b7348adb16856a4c46cf5d37f1925fe1"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"f760278d924467fb1d2289448c73fe27"},{url:"js/shapes-14-6-5.min.js",revision:"71913a30c93bc9aff182a3a2b3da1a21"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"57fe6012597666439de3e76c9bb681c1"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"1c4b010eb053bfb9aed1caee8a3d3689"},{url:"styles/atlas.css",revision:"05873c4bba51f571b1da549a967ea06c"},{url:"styles/dark.css",revision:"99dc5495d36d5ebaddababefde083c8c"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"8c273e0538209709ae1235c20f112262"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"c41221a9a51ff293f05ed13c7b142e5c"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"8af574bd1ae86be37b83b094a5011a4f"},{url:"plugins/cConf-1-4-8.js",revision:"5324b1040e93e7e271c98060c2ef3993"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"261a7494161cee976ecfb110ac7571d2"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"6542434cf3df5c60163e2767678f1bfc"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"30ff609b31d4a8c38da6c28e555947ea"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"03a8dcfc69612b44b6e75e6926a956fc"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"42a4ae7a4de9465190f28fea6f5c520f"},{url:"resources/dia_am.txt",revision:"8f0d1d9b7812db92a93f2c6d433e07a6"},{url:"resources/dia_ar.txt",revision:"134401fa60d1c0bf84ee6c16fc505c15"},{url:"resources/dia_bg.txt",revision:"84715ae0c89e70874c47e6d3a3443e17"},{url:"resources/dia_bn.txt",revision:"684ce523efe22b33f86a675f4c6e4ef2"},{url:"resources/dia_bs.txt",revision:"dd6b857fcf0088b9663e627432fa7a88"},{url:"resources/dia_ca.txt",revision:"c0de34457558f97652ea92a6849db834"},{url:"resources/dia_cs.txt",revision:"120cf9f38b594bb9a626c803569e3f23"},{url:"resources/dia_da.txt",revision:"0fe263b0d2e3589a7587418650e34f6d"},{url:"resources/dia_de.txt",revision:"5b5fa3dfc98ae97a90753914effb320b"},{url:"resources/dia_el.txt",revision:"44d39b7d272f7f2bd445f0c6c0e68f12"},{url:"resources/dia_eo.txt",revision:"6f9e6f2660915427c12a0b7f64635fa7"},{url:"resources/dia_es.txt",revision:"c48ff9b60de9a9e0cfec83d1704baeb6"},{url:"resources/dia_et.txt",revision:"94195324961f9e1ff65d1a42f52856e4"},{url:"resources/dia_eu.txt",revision:"f63bc2d7bde667c685997bc86a537b44"},{url:"resources/dia_fa.txt",revision:"d0889f88a60c5988dc0339125bda451a"},{url:"resources/dia_fi.txt",revision:"6451d181f592b4ad11ac26e3a4d5ab74"},{url:"resources/dia_fil.txt",revision:"e86e9680e06a815aad177c048688cff7"},{url:"resources/dia_fr.txt",revision:"4194b0e428b1872d621698e367b16402"},{url:"resources/dia_gl.txt",revision:"d1cd37bcc7929fa4babe1ca198a93181"},{url:"resources/dia_gu.txt",revision:"694fff784dd524616c879a854d88ae68"},{url:"resources/dia_he.txt",revision:"4b063ae0aebe86cdb05add071f5b0ee6"},{url:"resources/dia_hi.txt",revision:"43c94ca21f4f03bbe55b0d2ba2be4b46"},{url:"resources/dia_hr.txt",revision:"8c265f964deec3e4e0a79fd91d3e9eb9"},{url:"resources/dia_hu.txt",revision:"f59b712a7f7e27dffcbc896a779685b2"},{url:"resources/dia_id.txt",revision:"c79c01c2db4677d9800f505fbbfa5058"},{url:"resources/dia_it.txt",revision:"6f142fd707a4099db0822a1d7db68ea0"},{url:"resources/dia_ja.txt",revision:"64a20b4916a8998be0f42d63562c7baa"},{url:"resources/dia_kn.txt",revision:"ff3d0232e27e2aa965c3bab5eded2cb3"},{url:"resources/dia_ko.txt",revision:"db718b3281604828aa651ba5a63c0339"},{url:"resources/dia_lt.txt",revision:"1be856b558cc9a645a9e258d69209f00"},{url:"resources/dia_lv.txt",revision:"ff269200edc2b4f45f8364e5588c75bd"},{url:"resources/dia_ml.txt",revision:"25e365fc609a3f41890626caf373c20b"},{url:"resources/dia_mr.txt",revision:"e9205e57e50f53c72e388cd38e59861e"},{url:"resources/dia_ms.txt",revision:"52f89e17fc25d2fe5681e2e9f9bfc8f5"},{url:"resources/dia_my.txt",revision:"efd905c0f6649871481a422787b6efaf"},{url:"resources/dia_nl.txt",revision:"535a29fcceaba4764144435ab6493a4c"},{url:"resources/dia_no.txt",revision:"16b441483de230be46e8408d3dba194d"},{url:"resources/dia_pl.txt",revision:"05d7a97404b03cb2395caa66d69607c4"},{url:"resources/dia_pt-br.txt",revision:"758ab749a0d77a9865f69396c392ab0d"},{url:"resources/dia_pt.txt",revision:"9aa63328bdea7fbaf55e85415da0c8f1"},{url:"resources/dia_ro.txt",revision:"0d7a9b7001c37e5c6e7d81d948106500"},{url:"resources/dia_ru.txt",revision:"0e3837f443d76fd69f738d75d7a7a7e6"},{url:"resources/dia_si.txt",revision:"15130554ca314fb7b7002ae4f6ab4bd6"},{url:"resources/dia_sk.txt",revision:"177abe3d377aefa3eed045c0752c8415"},{url:"resources/dia_sl.txt",revision:"5940f6acf98abf588b3f0297e81a29f5"},{url:"resources/dia_sr.txt",revision:"cefbc97890a94bfd1dbefd9cb0d0e641"},{url:"resources/dia_sv.txt",revision:"e96c9c01ebdb2820797c1eee22711d55"},{url:"resources/dia_sw.txt",revision:"875b87315bfc1cac4de49ebf19383433"},{url:"resources/dia_ta.txt",revision:"acb6a6d0001f261a7330234385014a8c"},{url:"resources/dia_te.txt",revision:"e20df7c06a79c46001ab0082698faee9"},{url:"resources/dia_th.txt",revision:"fe792ae8b06057614862bde11591d51a"},{url:"resources/dia_tr.txt",revision:"81aba33b847ad440bbd49de4ee25af5f"},{url:"resources/dia_uk.txt",revision:"091c107bfb18db4cd9180925273c9a5c"},{url:"resources/dia_vi.txt",revision:"fdfe28ebb439f69e7c814fde22767f6e"},{url:"resources/dia_zh-tw.txt",revision:"c73a94b343656865b20397e3cd4aee14"},{url:"resources/dia_zh.txt",revision:"2bd68d255eba4fe84d03bd7f34ad2d0b"},{url:"favicon.ico",revision:"83014b0f32b6c7b15b66cf3c6d6d7c16"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{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:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{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/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"7985b4d1692766a7db52cbdd10893ad9"},{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.mapdiff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.mapindex 86a924e80..26d8e259d 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/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/927160d1865e9fd38f7bf89cfd489e3f/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/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.skipWaiting();\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\": \"b2b7e40d452b5707a1a9d984a0a0542b\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"b7348adb16856a4c46cf5d37f1925fe1\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"f760278d924467fb1d2289448c73fe27\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"71913a30c93bc9aff182a3a2b3da1a21\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"57fe6012597666439de3e76c9bb681c1\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"1c4b010eb053bfb9aed1caee8a3d3689\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"05873c4bba51f571b1da549a967ea06c\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"99dc5495d36d5ebaddababefde083c8c\"\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\": \"4695f3bb1fac6fb6f049d44b78a14e63\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"c41221a9a51ff293f05ed13c7b142e5c\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"8af574bd1ae86be37b83b094a5011a4f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"5324b1040e93e7e271c98060c2ef3993\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"261a7494161cee976ecfb110ac7571d2\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"6542434cf3df5c60163e2767678f1bfc\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"30ff609b31d4a8c38da6c28e555947ea\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"03a8dcfc69612b44b6e75e6926a956fc\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"73927d303703a329ff06d681553e993d\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"8d60c82458b57bb9ccc7b0c4f6ed3f79\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e278657437cf14eeedbb3b641d3ba8c0\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"61c2ef14ee768be21fcb22b1928f7cac\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"45e3683c1150ad2e139f42fedaf9e7aa\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"ed33364ad4282d0e29775ca2e2f351e0\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"101dbe73020d8471a5208da4d8ae247e\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"ba2fd4196222285218549625600a530f\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"b3eb739977ead9876a8afe0103ad7e36\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"fd7945d51201ff95e51d082750c67c39\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"faa7d843ef32aba9b9f11e367ca362d5\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"619ff072153d5897b7184ee0fe925f18\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"1feb3c63ee76afc71ebec607c8a9347a\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"67482775f1ff0d1b2cb31f6226c519d3\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"a7dce4832af9f1d0b4e5f5bf189ef328\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"743a891d016470e8e0a3651be32fb3c5\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"771de2b3741f25b4114e51c93ce1a866\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"637b4984bb64580b4ef61e28ef7ca664\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"ad7e62eb41228b929489d9427d206e82\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"a89e3f7e7cb3b6867d3e74eb949894dd\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"769be61a373049c5d3b358201f1acb65\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"238e53f20884ef57b1a9c06bd800b9ef\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"755e1872b614c9a5b27c5459062c8320\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"adf6788e96b0e3f0029cbae30a4faefb\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"c645a78fdda2843acd6aa9d9bf60a6e8\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9da16676fc1b33c61b4a025a352dc916\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57b0f8eb2319f99f96b79507966f4e6f\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"b4b10c93e53b13dbd3e407532813b9e0\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7cbbba0381a1a6cdeade3bc28ac01962\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"943b020ff0430e9f81fe3e1875423b7d\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"94aff34cd118d39d79abacf2a16aea7d\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"325ed2d9ffa2ddc493d9ed10d46007ad\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"fc666763d3fbff227411defda23b1942\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"e8746ae5b0123155bdd837ae7f01b5f5\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"e1600b30e6517d4dc4a7002ce675c641\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"4acfe58eb8f47895f188af8bfd33659c\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"e9512982f5d9e89015435ee50d577bbc\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"6f0812d787ab931475343320d2547158\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"3c7d08a5fefc693e6b6b4521a3c0a6cc\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"5d7431a638a268dfedd3bc7f463e17d6\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"981210fd60e7fd0831fcd6d26ca26f74\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"1d77510ecd2b1b1c26640dfe77e00f48\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4c2d2f96df120afc4c3b3c58d0bc6ebc\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"2db82ba649f3ab7d578a73b247b06c4f\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"4b9033183a2c90ccf0f75136fd7b14b0\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"c27148e1c9480a35642162595480ff1f\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ef3562ada2e69e5d33609d58a677b6db\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"7357682c42f6d47729b6b1784aaa5e9b\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"377dd914bd645c2348e342bf55306439\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"00ce65e244e159a2dcb93b9829a2e603\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"8aaca1c42eb1c027a77138f0fccc85c7\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"c2be3eae6995b41ba466651629c69143\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"9571764eb899cc108c6fb2631d694ca3\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"76e4f285ac8c648d3b3fbc6ab59aad17\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"ced105b1a1ea57902c88fdd36ab041c0\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"ce0a47eca469dbb93e8c4f26aba7ea73\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"a69a22b12a4ced3f62285b2521355755\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"83014b0f32b6c7b15b66cf3c6d6d7c16\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\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\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\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/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"7985b4d1692766a7db52cbdd10893ad9\"\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","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/ce6020ca258d3eab725672f5deef7456/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/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.skipWaiting();\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\": \"1a856d27d3d67fa7ba1c5d49a3d77df8\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"b7348adb16856a4c46cf5d37f1925fe1\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"f760278d924467fb1d2289448c73fe27\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"71913a30c93bc9aff182a3a2b3da1a21\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"57fe6012597666439de3e76c9bb681c1\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"1c4b010eb053bfb9aed1caee8a3d3689\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"05873c4bba51f571b1da549a967ea06c\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"99dc5495d36d5ebaddababefde083c8c\"\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\": \"8c273e0538209709ae1235c20f112262\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"c41221a9a51ff293f05ed13c7b142e5c\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"8af574bd1ae86be37b83b094a5011a4f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"5324b1040e93e7e271c98060c2ef3993\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"261a7494161cee976ecfb110ac7571d2\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"6542434cf3df5c60163e2767678f1bfc\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"30ff609b31d4a8c38da6c28e555947ea\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"03a8dcfc69612b44b6e75e6926a956fc\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"42a4ae7a4de9465190f28fea6f5c520f\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"8f0d1d9b7812db92a93f2c6d433e07a6\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"134401fa60d1c0bf84ee6c16fc505c15\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"84715ae0c89e70874c47e6d3a3443e17\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"684ce523efe22b33f86a675f4c6e4ef2\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"dd6b857fcf0088b9663e627432fa7a88\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"c0de34457558f97652ea92a6849db834\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"120cf9f38b594bb9a626c803569e3f23\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"0fe263b0d2e3589a7587418650e34f6d\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"5b5fa3dfc98ae97a90753914effb320b\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"44d39b7d272f7f2bd445f0c6c0e68f12\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"6f9e6f2660915427c12a0b7f64635fa7\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"c48ff9b60de9a9e0cfec83d1704baeb6\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"94195324961f9e1ff65d1a42f52856e4\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"f63bc2d7bde667c685997bc86a537b44\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"d0889f88a60c5988dc0339125bda451a\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"6451d181f592b4ad11ac26e3a4d5ab74\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"e86e9680e06a815aad177c048688cff7\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"4194b0e428b1872d621698e367b16402\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"d1cd37bcc7929fa4babe1ca198a93181\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"694fff784dd524616c879a854d88ae68\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"4b063ae0aebe86cdb05add071f5b0ee6\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"43c94ca21f4f03bbe55b0d2ba2be4b46\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"8c265f964deec3e4e0a79fd91d3e9eb9\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"f59b712a7f7e27dffcbc896a779685b2\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"c79c01c2db4677d9800f505fbbfa5058\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"6f142fd707a4099db0822a1d7db68ea0\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"64a20b4916a8998be0f42d63562c7baa\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"ff3d0232e27e2aa965c3bab5eded2cb3\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"db718b3281604828aa651ba5a63c0339\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"1be856b558cc9a645a9e258d69209f00\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"ff269200edc2b4f45f8364e5588c75bd\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"25e365fc609a3f41890626caf373c20b\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"e9205e57e50f53c72e388cd38e59861e\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"52f89e17fc25d2fe5681e2e9f9bfc8f5\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"efd905c0f6649871481a422787b6efaf\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"535a29fcceaba4764144435ab6493a4c\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"16b441483de230be46e8408d3dba194d\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"05d7a97404b03cb2395caa66d69607c4\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"758ab749a0d77a9865f69396c392ab0d\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"9aa63328bdea7fbaf55e85415da0c8f1\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"0d7a9b7001c37e5c6e7d81d948106500\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"0e3837f443d76fd69f738d75d7a7a7e6\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"15130554ca314fb7b7002ae4f6ab4bd6\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"177abe3d377aefa3eed045c0752c8415\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"5940f6acf98abf588b3f0297e81a29f5\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"cefbc97890a94bfd1dbefd9cb0d0e641\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"e96c9c01ebdb2820797c1eee22711d55\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"875b87315bfc1cac4de49ebf19383433\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"acb6a6d0001f261a7330234385014a8c\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"e20df7c06a79c46001ab0082698faee9\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"fe792ae8b06057614862bde11591d51a\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"81aba33b847ad440bbd49de4ee25af5f\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"091c107bfb18db4cd9180925273c9a5c\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"fdfe28ebb439f69e7c814fde22767f6e\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"c73a94b343656865b20397e3cd4aee14\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"2bd68d255eba4fe84d03bd7f34ad2d0b\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"83014b0f32b6c7b15b66cf3c6d6d7c16\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\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\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\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/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"7985b4d1692766a7db52cbdd10893ad9\"\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","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}\ No newline at end of file